summaryrefslogtreecommitdiff
path: root/guile/email-key-rotation/dns.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guile/email-key-rotation/dns.scm')
-rw-r--r--guile/email-key-rotation/dns.scm13
1 files changed, 9 insertions, 4 deletions
diff --git a/guile/email-key-rotation/dns.scm b/guile/email-key-rotation/dns.scm
index 620a916..145c8a2 100644
--- a/guile/email-key-rotation/dns.scm
+++ b/guile/email-key-rotation/dns.scm
@@ -5,6 +5,7 @@
#:use-module (ice-9 match)
#:use-module (ice-9 optargs)
#:use-module (ice-9 receive)
+ #:use-module (ice-9 i18n)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-9 gnu)
#:use-module (rnrs bytevectors)
@@ -22,6 +23,8 @@
publish-gandi-livedns)
#:declarative? #t)
+(define (G_ msg) (gettext msg "email-key-rotation"))
+
(define-immutable-record-type <dns-record>
(make-dns-record name type value)
dns-record?
@@ -40,12 +43,13 @@
(make-exception-with-origin 'publish-gandi-livedns)
(make-exception-with-irritants (list gandi-configuration record))
(make-exception-with-message
- "cannot update the Gandi livedns.")
+ (G_ "cannot update the Gandi livedns."))
exn)))
(lambda ()
(match record
(($ <dns-record> name type value)
- (format (current-error-port) "Publishing record on Gandi LiveDNS: ~s ~s ~s...\n"
+ (format (current-error-port)
+ (G_ "Publishing record on Gandi LiveDNS: ~s ~s ~s...\n")
name type value)
(let ((path-under-domain `("records" ,name ,type))
(headers `((content-type . (application/json))))
@@ -82,10 +86,11 @@
(make-exception
(make-exception-with-irritants (list response))
(make-exception-with-message
- (format #f "the request failed with ~a ~a."
+ (format #f (G_ "the request failed with ~a ~a.")
(response-code response)
(response-reason-phrase response))))))
- (format (current-error-port) "Publishing record on Gandi LiveDNS: ~s ~s ~s: ~s ~s\n"
+ (format (current-error-port)
+ (G_ "Publishing record on Gandi LiveDNS: ~s ~s ~s: ~s ~s\n")
name type value
(response-code response)
(response-reason-phrase response)))))))))