bug-gettext
[Top][All Lists]
Advanced

[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 8.4.1.2 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:

https://github.com/akimd/bison/tree/gnulib-po

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

Cheers!


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

    gnulib: let it use its own PO domain
    
    See
    https://www.gnu.org/software/gnulib/manual/html_node/Localization.html.
    
    * 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
 ACLOCAL_AMFLAGS = -I m4
 
-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='
     m4/visibility.m4
 '
 
-gnulib_tool_option_extras='--symlink --conditional-dependencies 
--makefile-name=gnulib.mk'
+gnulib_tool_option_extras='--symlink --conditional-dependencies 
--makefile-name=gnulib.mk --po-base=gnulib-po --po-domain=bison'
 
 bootstrap_post_import_hook()
 {
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])
-AM_GNU_GETTEXT_VERSION([0.18])
+AM_GNU_GETTEXT_VERSION([0.18.3])
 BISON_I18N
+AC_CONFIG_FILES([gnulib-po/Makefile.in])
 
 # Internationalized parsers.
 AC_CONFIG_FILES([runtime-po/Makefile.in])
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
 src/scan-gram.l
 src/scan-skel.l
 src/symtab.c
-
-lib/argmatch.c
-lib/closeout.c
-lib/error.c
-lib/getopt.c
-lib/obstack.c
-lib/spawn-pipe.c
-lib/quotearg.c
-lib/timevar.c
-lib/w32spawn.h
-lib/wait-process.c
-lib/xalloc-die.c
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]