guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 04/04: build: Add i18n infrastructure.


From: Ludovic Courtès
Subject: [shepherd] 04/04: build: Add i18n infrastructure.
Date: Sun, 4 Feb 2018 17:45:29 -0500 (EST)

civodul pushed a commit to branch master
in repository shepherd.

commit 70789a908cc083fd880306972502eef7d6d26a78
Author: Ludovic Courtès <address@hidden>
Date:   Sun Feb 4 22:42:28 2018 +0100

    build: Add i18n infrastructure.
    
    * Makefile.am (EXTRA_DIST): Add build-aux/config.rpath.
    (SUBDIRS, ACLOCAL_AMFLAGS): New variables.
    * configure.ac: Use 'AM_GNU_GETTEXT'.  Instantiate po/Makefile.in.
    * po/Makevars, po/POTFILES.in: New files.
---
 .gitignore     | 13 +++++++++++++
 Makefile.am    | 19 ++++++++++++-------
 configure.ac   |  4 +++-
 po/Makevars    | 18 ++++++++++++++++++
 po/POTFILES.in |  8 ++++++++
 5 files changed, 54 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore
index 734c71c..976fd3f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,3 +57,16 @@ Makefile.in
 /tests/respawn-throttling.log
 /tests/respawn-throttling.trs
 /tests/pid-file.log
+/po/ChangeLog
+/po/Makefile.in.in
+/po/POTFILES
+/po/Rules-quot
+/po/boldquot.sed
+/po/address@hidden
+/po/address@hidden
+/po/insert-header.sin
+/po/quot.sed
+/po/remove-potcdate.sed
+/po/remove-potcdate.sin
+/po/shepherd.pot
+/po/stamp-po
diff --git a/Makefile.am b/Makefile.am
index c667464..a30b11d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 # Makefile.am -- How to build and install the Shepherd.
 # Copyright © 2002, 2003 Wolfgang Jährling <address@hidden>
-# Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
+# Copyright © 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <address@hidden>
 #
 # This file is part of the GNU Shepherd.
 #
@@ -93,12 +93,13 @@ dist_man1_MANS = doc/shepherd.1 doc/herd.1
 dist_man8_MANS = doc/halt.8 doc/reboot.8
 
 # Things not automatically included in the distribution.
-EXTRA_DIST =                           \
-  ChangeLog-2003                       \
-  QUESTIONS                            \
-  $(templates)                         \
-  doc/examples/README                  \
-  doc/examples/_unknown.scm            \
+EXTRA_DIST =                                   \
+  build-aux/config.rpath                       \
+  ChangeLog-2003                               \
+  QUESTIONS                                    \
+  $(templates)                                 \
+  doc/examples/README                          \
+  doc/examples/_unknown.scm                    \
   doc/examples/wolfgangj.scm
 
 # Create the socket directory (aka. 'default-socket-dir'.)  Make it
@@ -229,3 +230,7 @@ gen-ChangeLog:
 dist-hook: gen-ChangeLog
 
 .PHONY: gen-ChangeLog
+
+SUBDIRS = po
+
+ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index 6e658f1..bb5058d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,6 +14,8 @@ AM_INIT_AUTOMAKE([1.11 gnu silent-rules -Wall -Wno-portability
 dnl Enable silent rules by default.
 AM_SILENT_RULES([yes])
 
+AM_GNU_GETTEXT([external])
+
 AC_CANONICAL_HOST
 AC_PROG_MKDIR_P
 AC_PROG_SED
@@ -77,7 +79,7 @@ dnl Manual pages.
 AM_MISSING_PROG([HELP2MAN], [help2man])
 
 dnl Finish.
-AC_CONFIG_FILES([Makefile
+AC_CONFIG_FILES([Makefile po/Makefile.in
                  modules/shepherd/system.scm])
 
 AC_OUTPUT
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..290d4a6
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,18 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+DOMAIN = $(PACKAGE)
+
+subdir = po
+top_builddir = ..
+
+XGETTEXT_OPTIONS =                             \
+  --from-code=UTF-8 --keyword=l10n
+
+# Set this to the empty string, which means translations are in the
+# public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER =
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings.
+MSGID_BUGS_ADDRESS = address@hidden
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..0ea67b5
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,8 @@
+# List of source files that contain translatable strings.
+
+modules/shepherd/comm.scm
+modules/shepherd/scripts/herd.scm
+modules/shepherd/support.scm
+modules/shepherd/service.scm
+modules/shepherd/args.scm
+modules/shepherd.scm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]