From 7887bcbf56f8ef154ba987e67e457c8695254fa5 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 10 Jun 2015 17:48:16 +0200 Subject: daemon: Internationalize guix-daemon. * nix/nix-daemon/guix-daemon.cc (n_, _): New macros. (guix_textdomain): New variable. (doc): Use 'n_'. (options): Likewise, and lowercase messages. (argp): Add initializer for 'argp_domain' field. (parse_opt): Use '_' for messages. (main): Likewise, and add calls to 'setlocale', 'bindtextdomain', and 'textdomain'. * daemon.am (guix_daemon_CPPFLAGS): Add -DLOCALEDIR. * po/guix/Makevars (XGETTEXT_OPTIONS): Remove '--language' option. Add '--keyword=n_'. * po/guix/POTFILES.in: Add guix-daemon.cc. --- po/guix/Makevars | 8 +++++--- po/guix/POTFILES.in | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'po') diff --git a/po/guix/Makevars b/po/guix/Makevars index 9c5965a136..8ec7d8aed6 100644 --- a/po/guix/Makevars +++ b/po/guix/Makevars @@ -6,12 +6,14 @@ subdir = po/guix top_builddir = ../.. # These options get passed to xgettext. We want to catch standard -# gettext uses, and SRFI-35 error condition messages. +# gettext uses, and SRFI-35 error condition messages. In C++ code +# we use 'n_' instead of the more usual 'N_' for no-ops. XGETTEXT_OPTIONS = \ - --language=Scheme --from-code=UTF-8 \ + --from-code=UTF-8 \ --keyword=_ --keyword=N_:1,2 \ --keyword=message \ - --keyword=description + --keyword=description \ + --keyword=n_ COPYRIGHT_HOLDER = Ludovic Courtès diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index 59f353e427..4f27f54d6c 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -20,3 +20,4 @@ guix/gnu-maintenance.scm guix/ui.scm guix/http-client.scm guix/nar.scm +nix/nix-daemon/guix-daemon.cc -- cgit v1.2.3