[Top][All Lists]

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

help: gnulib: let it use its own PO domain

From: Akim Demaille
Subject: help: gnulib: let it use its own PO domain
Date: Fri, 8 Feb 2019 07:04:51 +0100

Hi Paul,

I'm lost here.  I've tried many different approaches, but it failed each time: 
when I apply the following patch, Bison is no longer internationalized. I don't 
get any translation: not those of Bison itself, nor those of gnulib. I must be 
doing something wrong, but I don't understand what.

So my goal is to relieve translators of Bison from translating gnulib using 
gnulib-tool's --po-base and --po-domain.  If I can move from the gettext module 
to the gettext-h module, that would be good too, but that change has no 
influence at all: no translations in either case.

I am conservative on the required version of Gettext, because the CI also runs 
on an old Debian, which has an old version of Gettext.  Of course it would be 
better for the CI to have a recent distro build the tarball and run the tarball 
on old platforms, but I don't have that now, and I'm not sure how to do that.

I have pushed this in the 'gnulib-po' branch, both on Savannah, and here:  The CI is running on it here:


commit 4c493bb31b9981b9e121e1f27c8b15cb762a2d42
Author: Akim Demaille <address@hidden>
Date:   Sun Oct 7 08:25:21 2018 +0200

    gnulib: let it use its own PO domain
    * bootstrap.conf: Create gnulib-po.
    *, Use it.
    * po/ Remove files now in gnulib.
    * src/main.c: Open the bison-gnulib domain.

diff --git a/ b/
index d32b14a9..5080229b 100644
--- a/
+++ b/
@@ -18,7 +18,7 @@
 AUTOMAKE_OPTIONS = subdir-objects
-SUBDIRS = po runtime-po .
+SUBDIRS = po runtime-po gnulib-po .
 # Files installed for use by Automake.
 aclocaldir = @aclocaldir@
diff --git a/bootstrap.conf b/bootstrap.conf
index 1e58284a..79bd899f 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -84,7 +84,7 @@ excluded_files='
-gnulib_tool_option_extras='--symlink --conditional-dependencies'
+gnulib_tool_option_extras='--symlink --conditional-dependencies --po-base=gnulib-po --po-domain=bison'
diff --git a/ b/
index 1b5343e7..c51ef782 100644
--- a/
+++ b/
@@ -248,8 +248,9 @@ AM_WITH_DMALLOC
 # We use gnulib, which is only guaranteed to work properly with the
 # latest Gettext.
 AM_GNU_GETTEXT([external], [need-ngettext])
 # Internationalized parsers.
diff --git a/gnulib b/gnulib
index 954d1e36..30f8dae4 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 954d1e36aa815994f7f5b1fcd46ebc96a63b8df4
+Subproject commit 30f8dae4c7a629eb5d227b1a39bc56b373e7ce12
diff --git a/m4/.gitignore b/m4/.gitignore
index 43cae90b..ddf13a32 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -5,6 +5,8 @@
@@ -37,15 +39,20 @@
@@ -76,6 +83,7 @@
@@ -117,9 +125,13 @@
@@ -132,6 +144,7 @@
@@ -148,12 +161,16 @@
@@ -177,21 +194,3 @@
diff --git a/po/ b/po/
index 5028e179..97f2473c 100644
--- a/po/
+++ b/po/
@@ -17,15 +17,3 @@ src/scan-code.l
diff --git a/src/main.c b/src/main.c
index 7704bef4..45d04709 100644
--- a/src/main.c
+++ b/src/main.c
@@ -66,11 +66,12 @@ main (int argc, char *argv[])
     char *cp = NULL;
     char const *localedir = relocate2 (LOCALEDIR, &cp);
-    (void) bindtextdomain (PACKAGE, localedir);
-    (void) bindtextdomain ("bison-runtime", localedir);
+    bindtextdomain ("bison", localedir);
+    bindtextdomain ("bison-gnulib", localedir);
+    bindtextdomain ("bison-runtime", localedir);
     free (cp);
-  (void) textdomain (PACKAGE);
+  textdomain ("bison");
     char const *cp = getenv ("LC_CTYPE");

reply via email to

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