civodul pushed a commit to branch master in repository shepherd. commit 0794a86b8e4eb57cf378e66ef8b083eefd1c9561 Author: Ludovic Courtès <l...@gnu.org> Date: Sun Feb 4 22:24:23 2018 +0100
Use 'l10n' where it's missing. * modules/shepherd.scm (main): Use 'l10n' for option arguments and all. * modules/shepherd/scripts/herd.scm (main): Likewise. * modules/shepherd/args.scm (process-args): Use 'l10n' for the last few lines of '--help'. --- modules/shepherd.scm | 33 +++++++++++++++++++-------------- modules/shepherd/args.scm | 14 ++++++++------ modules/shepherd/scripts/herd.scm | 12 ++++++------ 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/modules/shepherd.scm b/modules/shepherd.scm index 7ea6493..5334657 100644 --- a/modules/shepherd.scm +++ b/modules/shepherd.scm @@ -1,5 +1,5 @@ ;; shepherd.scm -- The daemon shepherd. -;; Copyright (C) 2013, 2014, 2016 Ludovic Courtès <l...@gnu.org> +;; Copyright (C) 2013, 2014, 2016, 2018 Ludovic Courtès <l...@gnu.org> ;; Copyright (C) 2002, 2003 Wolfgang Jährling <wolfg...@pro-linux.de> ;; ;; This file is part of the GNU Shepherd. @@ -62,8 +62,9 @@ not ;; Fail on unknown args. (make <option> #:long "persistency" #:short #\p - #:takes-arg? #t #:optional-arg? #t #:arg-name "FILE" - #:description "use FILE to load and store state" + #:takes-arg? #t #:optional-arg? #t + #:arg-name (l10n "FILE") + #:description (l10n "use FILE to load and store state") #:action (lambda (file) (set! persistency #t) (and file @@ -71,14 +72,14 @@ (make <option> #:long "quiet" #:takes-arg? #f - #:description "synonym for --silent" + #:description (l10n "synonym for --silent") #:action (lambda () ;; XXX: Currently has no effect. #t)) (make <option> #:long "silent" #:short #\S #:takes-arg? #f - #:description "don't do output to stdout" + #:description (l10n "don't do output to stdout") #:action (lambda () ;; XXX: Currently has no effect. #t)) @@ -88,32 +89,36 @@ ;; we provide it as an option. #:long "insecure" #:short #\I #:takes-arg? #f - #:description "don't ensure that the setup is secure" + #:description (l10n "don't ensure that the setup is secure") #:action (lambda () (set! secure #f))) (make <option> #:long "logfile" #:short #\l - #:takes-arg? #t #:optional-arg? #f #:arg-name "FILE" - #:description "log actions in FILE" + #:takes-arg? #t #:optional-arg? #f + #:arg-name (l10n "FILE") + #:description (l10n "log actions in FILE") #:action (lambda (file) (set! logfile file))) (make <option> #:long "pid" - #:takes-arg? #t #:optional-arg? #t #:arg-name "FILE" - #:description "when ready write PID to FILE or stdout" + #:takes-arg? #t #:optional-arg? #t + #:arg-name (l10n "FILE") + #:description (l10n "when ready write PID to FILE or stdout") #:action (lambda (file) (set! pid-file (or file #t)))) (make <option> #:long "config" #:short #\c - #:takes-arg? #t #:optional-arg? #f #:arg-name "FILE" - #:description "read configuration from FILE" + #:takes-arg? #t #:optional-arg? #f + #:arg-name (l10n "FILE") + #:description (l10n "read configuration from FILE") #:action (lambda (file) (set! config-file file))) (make <option> #:long "socket" #:short #\s - #:takes-arg? #t #:optional-arg? #f #:arg-name "FILE" + #:takes-arg? #t #:optional-arg? #f + #:arg-name (l10n "FILE") #:description - "get commands from socket FILE or from stdin (-)" + (l10n "get commands from socket FILE or from stdin (-)") #:action (lambda (file) (set! socket-file (if (not (string=? file "-")) diff --git a/modules/shepherd/args.scm b/modules/shepherd/args.scm index 4841afb..bbc3be4 100644 --- a/modules/shepherd/args.scm +++ b/modules/shepherd/args.scm @@ -1,5 +1,5 @@ ;; args.scm -- Command line argument handling. -;; Copyright (C) 2013, 2016 Ludovic Courtès <l...@gnu.org> +;; Copyright (C) 2013, 2016, 2018 Ludovic Courtès <l...@gnu.org> ;; Copyright (C) 2002, 2003 Wolfgang Jährling <wolfg...@pro-linux.de> ;; ;; This file is part of the GNU Shepherd. @@ -196,14 +196,16 @@ (display args-desc) (newline) (for-each display-doc (reverse! options)) - (display (string-append " + (format #t (l10n " Mandatory or optional arguments to long options are also mandatory or optional to the corresponding short options. -Report bugs to: " bug-address ". -" package-name " general home page: <" package-url "> -General help using GNU software: <http://www.gnu.org/gethelp/> -")) +Report bugs to: ~a . +~a general home page: <~a> +General help using GNU software: <http://www.gnu.org/gethelp/>~%") + bug-address + package-name + package-url) (quit))) options)) (let next-arg ((ptr args)) diff --git a/modules/shepherd/scripts/herd.scm b/modules/shepherd/scripts/herd.scm index 697446c..1691182 100644 --- a/modules/shepherd/scripts/herd.scm +++ b/modules/shepherd/scripts/herd.scm @@ -178,17 +178,17 @@ talking to shepherd")) (let ((socket-file default-socket-file) (command-args '())) (process-args (program-name) args - "ACTION SERVICE [ARG...]" - (string-append - "Apply ACTION (start, stop, status, etc.) on SERVICE" - " with the ARGs.") + (l10n "ACTION SERVICE [ARG...]") + (l10n "Apply ACTION (start, stop, status, etc.) on \\ +SERVICE with the ARGs.") (lambda (arg) ;; Collect unknown args. (set! command-args (cons arg command-args))) (make <option> #:long "socket" #:short #\s - #:takes-arg? #t #:optional-arg? #f #:arg-name "FILE" - #:description "send commands to FILE" + #:takes-arg? #t #:optional-arg? #f + #:arg-name (l10n "FILE") + #:description (l10n "send commands to FILE") #:action (lambda (file) (set! socket-file file))))