diff options
Diffstat (limited to 'guile/email-key-rotation/openssl.scm')
-rw-r--r-- | guile/email-key-rotation/openssl.scm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/guile/email-key-rotation/openssl.scm b/guile/email-key-rotation/openssl.scm index 418056b..5c0d6ad 100644 --- a/guile/email-key-rotation/openssl.scm +++ b/guile/email-key-rotation/openssl.scm @@ -3,6 +3,7 @@ #:use-module (ice-9 rdelim) #:use-module (ice-9 textual-ports) #:use-module (ice-9 match) + #:use-module (ice-9 i18n) #:export (current-openssl-binary generate-key private-key->public-key @@ -10,6 +11,8 @@ #:declarative? #t #:duplicates (merge-generics)) +(define (G_ msg) (gettext msg "email-key-rotation")) + (define current-openssl-binary (make-parameter "/usr/bin/openssl" @@ -22,7 +25,7 @@ (make-exception (make-exception-with-irritants (list interpreter arguments)) (make-exception-with-message - "cannot run openssl:") + (G_ "cannot run openssl:")) exn))) (lambda () (let ((ret (apply system* interpreter arguments))) @@ -32,7 +35,7 @@ (make-error) (make-exception-with-irritants (list (status:exit-val ret))) (make-exception-with-message - (format #f "openssl failed with exit code ~s." + (format #f (G_ "openssl failed with exit code ~s.") (status:exit-val ret))))))))))) ((? procedure? p) p)))) @@ -48,7 +51,7 @@ (make-exception-with-origin 'generate-key) (make-exception-with-irritants (list rsa-strength)) (make-exception-with-message - "cannot generate a private key.") + (G_ "cannot generate a private key.")) exn))) (lambda () (let ((port (mkstemp "/tmp/generate-openssl-key-XXXXXX")) @@ -74,7 +77,7 @@ (make-exception-with-origin 'private-key->public-key) (make-exception-with-irritants (list key)) (make-exception-with-message - "cannot convert the private key to public key.") + (G_ "cannot convert the private key to public key.")) exn))) (lambda () (let ((input-port (mkstemp "/tmp/openssl-private-key-XXXXXX")) @@ -107,7 +110,7 @@ (make-exception-with-origin 'random-hex) (make-exception-with-irritants (list nbytes)) (make-exception-with-message - (format #f "cannot generate ~a random bytes." + (format #f (G_ "cannot generate ~a random bytes.") nbytes)) exn))) (lambda () |