bison-patches
[Top][All Lists]
Advanced

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

Re: Bison i18n patches installed


From: Paul Eggert
Subject: Re: Bison i18n patches installed
Date: Wed, 13 Jul 2005 11:16:12 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Bruno Haible <address@hidden> writes:

> - You refer to the glibc documentation where I referred to ABOUT-NLS.
>   ABOUT-NLS is platform independent. Is your problem with ABOUT-NLS that
>   it is not installed as an info file?

Yes; I want a reference that readers can easily follow, since I'm
assuming they're reading info (or a web page, or a PDF document, or
whatever).  If there's a better such reference than the glibc manual
please let me now.

> - src/main.c uses
>     bindtextdomain ("bison-runtime", LOCALEDIR);
>   where the doc says that it should use
>     bindtextdomain ("bison-runtime", BISON_LOCALEDIR);
>   I assume this is because the bison package is distributed with a parser
>   made by itself, not the previously installed version of bison?

Yes, that's it.  I always bootstrap the parser with itself before a release.

> - * src/getarg.s (PRINT_LOCALEDIR_OPTION): ...
>   should be src/getarg.c

Thanks; I've fixed that.

> - In runtime-po/ it would make sense to save the diff between the normal
>   po/Makefile.in.in and this one, and enhance the bootstrap script to
>   apply these diffs. This should make the migration to gettext-0.15 etc.
>   smoother, without introducing inconsistencies (i.e. without risking
>   use of a 0.15 gettext.m4 with a 0.14.5 Makefile.in.in).

I've been thinking about that too, but I have a more radical proposal
(A): simply revert to the standard Makefile.in.in (so that we don't
have to maintain any difference), and place the old translation
strings, whatever they are, in some file maintained by hand.

A problem with the current approach is that translation strings
survive even when they shouldn't.  For example, if I misspell a
diagnostic, the misspelling will accumulate into the .pot file even
though I correct the misspelling before the next official release.
This problem is already starting to happen, because I see that the
formats in the current diagnostics aren't quite right for 64-bit
machines (once we fix some other deficiencies), and I'd like to fix
this before Bison 2.1 comes out.

Perhaps a better solution would be (B): maintain a stable of old .pot
files from established releases (bison-2.1.pot whenever Bison 2.1
comes out, etc.), and automatically include all the strings that each
of these old .pot files contain.  This stable could be gotten from
CVS, so we wouldn't have to maintain it by hand.  All we would have to
maintain is a list of old release numbers.

To help implement this, can a .pot file be in POTFILES.in?  That is,
would it work if runtime-po/POTFILES.in looked like this?

data/yacc.c
runtime-po/bison-2.1.pot
runtime-po/bison-2.2.pot

If not, would it be reasonable to modify gettext to support this?

(A) and (B) are equivalent until after 2.1 is released, so perhaps
I'll just implement their intersection for now.

> - Maybe one could add some advice for distributors regarding the split
>   between the runtime package and the developer tools package? Like I
>   do in gettext-0.14.5/PACKAGING?

Thanks for reminding me about that.  I installed the following patch.
Please let me know if you see any problems with it.

I also plan to have some other i18n-related patches soon, since I've
spotted some other problems with our recent changes.  I'll CC: them to
you if you don't mind.

2005-07-13  Paul Eggert  <address@hidden>

        * PACKAGING: New file, suggested by Bruno Haible and taken from
        similar wording in gettext's PACKAGING file.
        * NEWS: Mention PACKAGING.
        * Makefile.am (EXTRA_DIST): Add PACKAGING.

Index: Makefile.am
===================================================================
RCS file: /cvsroot/bison/bison/Makefile.am,v
retrieving revision 1.36
diff -p -u -r1.36 Makefile.am
--- Makefile.am 12 Jul 2005 23:28:54 -0000      1.36
+++ Makefile.am 13 Jul 2005 18:12:04 -0000
@@ -24,7 +24,8 @@ SUBDIRS = config po runtime-po lib data 
 aclocaldir = @aclocaldir@
 aclocal_DATA = m4/bison-i18n.m4
 
-EXTRA_DIST = REFERENCES OChangeLog Makefile.maint GNUmakefile Makefile.cfg
+EXTRA_DIST = GNUmakefile Makefile.cfg Makefile.maint \
+  OChangeLog PACKAGING REFERENCES
 
 .PHONY: maintainer-check
 maintainer-check:
Index: NEWS
===================================================================
RCS file: /cvsroot/bison/bison/NEWS,v
retrieving revision 1.117
diff -p -u -r1.117 NEWS
--- NEWS        13 Jul 2005 17:35:34 -0000      1.117
+++ NEWS        13 Jul 2005 18:12:04 -0000
@@ -6,8 +6,9 @@ Changes in the next version (not yet rel
 * Bison-generated parsers now support the translation of diagnostics like
   "syntax error" into languages other than English.  The default
   language is still English.  For details, please see the new
-  Internationalization section of the Bison manual.  Thanks to Bruno
-  Haible for this new feature.
+  Internationalization section of the Bison manual.  Software
+  distributors should also see the new PACKAGING file.  Thanks to
+  Bruno Haible for this new feature.
 
 The following change was also in version 2.0a, 2005-05-22:
 
--- /dev/null   2005-06-27 15:40:05.000000000 -0700
+++ PACKAGING   2005-07-13 11:11:24.000000000 -0700
@@ -0,0 +1,56 @@
+Packaging hints for binary package distributors
+===============================================
+
+Although the source of the bison package comes as a single package,
+in distributions of binary packages the installed files should
+be split into two packages:
+
+   bison-runtime
+        Contents: Runtime libraries and programs.
+        Audience: Anyone who wants to run internationalized programs
+                  that contain Bison-generated parsers.
+
+   bison
+        Contents: Tools and documentation for developers that use Bison.
+        Audience: Anyone who wants to develop programs that use parsers.
+        Dependencies: requires bison-runtime.
+
+The 'bison-runtime' binary package is much smaller than the 'bison'
+binary package.  It should be included in any distribution that
+contains programs that use the diagnostics contained in
+Bison-generated parsers, e.g., Gawk, GCC, Perl.
+
+If you want to install both packages at the same time, you simply do
+at the toplevel directory:
+
+      ./configure
+      make
+      make install
+
+After installation, the files
+
+      $prefix/share/locale/*/LC_MESSAGES/bison-runtime.mo
+
+belong to the bison-runtime package; all other installed files belong
+to in the bison package.
+
+-----
+
+Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+
+This file is part of Bison, the GNU Compiler Compiler.
+
+Bison is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Bison is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with autoconf; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.




reply via email to

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