GNOME Bugzilla – Bug 338162
[PATCH] Use po/LINGUAS
Last modified: 2008-06-12 05:42:26 UTC
Here's a patch that implements the suggestions at http://live.gnome.org/GnomeGoals/PoLinguas . (I am slightly confused that glib doesn't include an INTLTOOL line in its configure.ac, but uses the ALL_LINGUAS line anyway.)
Created attachment 63276 [details] [review] Patch to use po/LINGUAS
Created attachment 63277 [details] LINGUAS file to be placed in po directory
So, glib can't really use intltool right now. Doing so would create a circular dependency, as intltool still depends on the glib-gettext bits. This is the case, as glib provided some of these useful extensions on top of gettext, before intltool existed, and intltool has not been fully ported away from depending on the gettext macros provided by glib yet. We are working on this in intltool. As the glib gettext bits themselves do not support the po/LINGUAS file, I think it is a bit premature to attempt to port glib to using it. I would advise against accepting this patch as-is for glib, and to continue using the current method in glib, until we can work out all of the differences between gettext, glib-gettext, and intltool, such that glib can just use intltool.
right. I wasn't going to apply the patches.
Is there an open bugzilla item or other place to track the progress of intltool migrating away glib-gettext stuff?
I don't want glib to depend on intltool anyway
(In reply to comment #6) > I don't want glib to depend on intltool anyway So, in this case, isn't this bug report a WONTFIX?
You do not have to use intltool 0.35 to use po/LINGUAS. Simply doing ALL_LINGUAS=`cat "$srcdir/po/LINGUAS"` AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS']) will work too.
(In reply to comment #8) > You do not have to use intltool 0.35 to use po/LINGUAS. Simply doing > > ALL_LINGUAS=`cat "$srcdir/po/LINGUAS"` > AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS']) > > will work too. Does it? I remember newlines in ALL_LINGUAS breaking configure.
backticks seem to turn newlines into spaces, although the bash man page only says that "may" happen. Thomas's original patch puts all of the languages on one line in po/LINGUAS, so there's no problem anyway, but it seems like it would cause confusion if glib/gtk/etc work differently from every other package. ALL_LINGUAS=`awk '/^[^#]/ {printf $0 " ";}' "$srcdir/po/LINGUAS"` should work.
(In reply to comment #10) > backticks seem to turn newlines into spaces, although the bash man page only > says that "may" happen. They don't. They just strip newlines from the end of the string: [behdad@behdad test-cairo]$ x=`ls` [behdad@behdad test-cairo]$ echo $x a.out test.c toroid.png [behdad@behdad test-cairo]$ echo "$x" a.out test.c toroid.png [behdad@behdad test-cairo]$ > Thomas's original patch puts all of the languages on one line in po/LINGUAS, > so there's no problem anyway, but it seems like it would cause confusion > if glib/gtk/etc work differently from every other package. > > ALL_LINGUAS=`awk '/^[^#]/ {printf $0 " ";}' "$srcdir/po/LINGUAS"` > > should work. grep -v '^#' | tr '\n' ' ' works too.
Looking at the REBUILD stuff in configure.in, there seems to be an attempt to keep glib buildable without perl and awk. Since we already have a hard requirement on grep (in configure and in other scripts), the grep + tr approach may be better. We just need someone to turn this into an actual patch.
Created attachment 103111 [details] [review] add and use po/LINGUAS Patch for trunk based on original patch and comments. I am uncertain about the "$srcdir/po/LINGUAS" and "$(top_srcdir)/po/LINGUAS". Should they have been the same or is this intended?
Latest patch from Thomas Andersen seems simple and good to me. Could a glib dev quickly review it?
Since configure lives in the topmost directory, top_srcdir and srcdir should be the same there, but still, using the same in both would be cleaner. Does LINGUAS need to be added to some EXTRA_DIST, to make it into tarballs ? Other than that, I have no objections to this patch.
* po/LINGUAS: New file * po/Makefile.in.in: Dist LINGUAS * configure.in: Use po/LINUAS Patch by Thomas Andersen
is top_srcdir defined as anything during configure? i'm building with builddir != srcdir and i get a message while configuring checking whether we are using the GNU C Library 2.1 or newer... no checking Whether to cache iconv descriptors... yes grep: /po/LINGUAS: No such file or directory checking for ANSI C header files... yes checking for sys/types.h... yes
Honestly no idea. Does srcdir work better ?
yes, the way it is in comment #13 gets everything running