[Top][All Lists]

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

Re: [bug-gettext] the manual is incomplete about using a compendium PO f

From: Akim Demaille
Subject: Re: [bug-gettext] the manual is incomplete about using a compendium PO file
Date: Sat, 13 Apr 2019 15:28:54 +0200

Hi all!

> Le 11 avr. 2019 à 01:59, Bruno Haible <address@hidden> a écrit :
> Hi Benno,
>> As the nano PO file recently "acquired" some messages from gnulib,
>> I looked at the gettext manual to see how to quickly fill in their
>> translations from another PO file.  I read this page (section 8.4.2):
>>  info gettext editing compendium using
>> plus subsection on the preceding page.
> Maybe Akim (CCed) knows a better way? Or maybe
> https://www.gnu.org/software/gnulib/manual/html_node/Localization.html
> is the better way?

Actually I never used compendia, nor did I have to play such
tricks.  So far Bison is still hosting the translation of
gnulib's file, because I failed to have the gnulib-po module
work properly with Bison.

Maybe I do something wrong, but after bootstrap, compile, install,
Bison is no longer internationalized: nothing is translated (not
gnulib's messages, nor Bison's ones).

FTR, my branch is here:


The patch is below, in case someone spots an obvious mistake.


commit 4dc41d914b31fb3c4065aeff9c31968497bcf0b6
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.
    * Makefile.am, configure.ac: Use it.
    * po/POTFILES.in: Remove files now in gnulib.
    * src/main.c: Open the bison-gnulib domain.

diff --git a/Makefile.am b/Makefile.am
index 930eac2f..458740cc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 c32acb59..6d1f9a44 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -85,7 +85,7 @@ excluded_files='
-gnulib_tool_option_extras='--symlink --conditional-dependencies 
+gnulib_tool_option_extras='--symlink --conditional-dependencies 
--makefile-name=gnulib.mk --po-base=gnulib-po --po-domain=bison'
diff --git a/configure.ac b/configure.ac
index 507e6f64..e5121ba1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -249,8 +249,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/po/POTFILES.in b/po/POTFILES.in
index 5028e179..97f2473c 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -17,15 +17,3 @@ src/scan-code.l
diff --git a/src/main.c b/src/main.c
index f0337b15..1587680e 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]