bison-patches
[Top][All Lists]
Advanced

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

Re: help: gnulib: let it use its own PO domain


From: Akim Demaille
Subject: Re: help: gnulib: let it use its own PO domain
Date: Tue, 23 Apr 2019 19:45:17 +0200


> Le 22 avr. 2019 à 16:44, Akim Demaille <address@hidden> a écrit :
> 
> Hi all,
> 
>> Le 8 févr. 2019 à 07:04, Akim Demaille <address@hidden> a écrit :
>> 
>> 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.
> 
> I have tracked down this issue and found it cause.  It's due to the fact that 
> Bison "include"s gnulib's Makefile instead of "recursing" into it.  See 
> https://lists.gnu.org/archive/html/bug-gnulib/2019-04/msg00044.html for more 
> details.
> 
> I expect I will soon be able to sit Bison on top of gnulib's po files!

I installed the patch in gnulib, and I installed this in master \o/

commit a4d33cdf48511a81a3311f4c2f618099d861c746
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 673501ee..3c4c8765 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/TODO b/TODO
index f7766862..2264c8f7 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,5 @@
 * Bison 3.4
 ** use gettext-h in gnulib instead of gettext
-** use gnulib-po
-For some reason, according to syntax-check, we have to keep getopt.c in
-POTIFILES.in, but not bitset/stats.c, although both come from gnulib.  But
-bitset/stats.c is a symlink, not getopt.c.  This is fishy and should be
-fixed.
-
-Meanwhile, bitset/stats.c is removed from the set of translations, which is
-not too much of a problem as users are not expected to see this.
 
 ** bad diagnostics
 %token <val> NUM
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..7520ab38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -251,6 +251,7 @@ AM_WITH_DMALLOC
 AM_GNU_GETTEXT([external], [need-ngettext])
 AM_GNU_GETTEXT_VERSION([0.18])
 BISON_I18N
+AC_CONFIG_FILES([gnulib-po/Makefile.in])
 
 # Internationalized parsers.
 AC_CONFIG_FILES([runtime-po/Makefile.in])
diff --git a/gnulib b/gnulib
index d6af2417..14a92019 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit d6af24178ca4b952327226ad64a4daad8e19109f
+Subproject commit 14a920195eee84550cfdd7a161896363d4796a22
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 8b48ad27..3c51eafe 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]