diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-07 22:12:29 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-04-07 22:12:29 +0200 |
commit | e377df7b305514d721510fe1f15921647ebc7552 (patch) | |
tree | 35dd17aaf5e29c44c0f13401b6cb86e4d7df5acd /module/calp/repl.scm | |
parent | Rename filename-extension{ => ?}. (diff) | |
parent | Fix translation for (vcomponent datetime output). (diff) | |
download | calp-e377df7b305514d721510fe1f15921647ebc7552.tar.gz calp-e377df7b305514d721510fe1f15921647ebc7552.tar.xz |
Merge branch 'translation'
Diffstat (limited to 'module/calp/repl.scm')
-rw-r--r-- | module/calp/repl.scm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/module/calp/repl.scm b/module/calp/repl.scm index 47c35a40..6f2c7c0a 100644 --- a/module/calp/repl.scm +++ b/module/calp/repl.scm @@ -7,12 +7,13 @@ :use-module (ice-9 regex) :use-module ((calp util hooks) :select (shutdown-hook)) :use-module ((hnh util exceptions) :select (warning)) + :use-module (calp translation) ) (define-public (repl-start address) (define lst (string->list address)) (format (current-error-port) - "Starting REPL server at ~a~%" address) + (_ "Starting REPL server at ~a~%") address) (spawn-server (case (cond [(memv (car lst) '(#\. #\/)) 'UNIX] [(string-match "(\\d{1,3}\\.){3}\\d{1,3}(:\\d+)?" address) 'IPv4] @@ -22,17 +23,17 @@ [(UNIX) (add-hook! shutdown-hook (lambda () (catch 'system-error (lambda () (delete-file address)) (lambda (err proc fmt args data) - (warning (format #f "Failed to unlink ~a: ~?" - address fmt args)) + (warning (string-append (format #f (_ "Failed to unlink ~a") address) + (format #f ": ~?" fmt args))) err)))) (make-unix-domain-server-socket path: address)] [(IPv4) (apply (case-lambda - [() (error "Empty address?")] + [() (error (_ "Empty address?"))] [(address) (make-tcp-server-socket host: address)] [(address port) (make-tcp-server-socket host: address port: port)]) (string-split address #\:))] ;; currently impossible - [(IPv6) (error "How did you get here?")])) + [(IPv6) (error (_ "How did you get here?"))])) ;; TODO setup repl environment here |