After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 338162 - [PATCH] Use po/LINGUAS
[PATCH] Use po/LINGUAS
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on: 344383
Blocks:
 
 
Reported: 2006-04-12 02:55 UTC by Thomas Thurman
Modified: 2008-06-12 05:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to use po/LINGUAS (790 bytes, patch)
2006-04-12 02:55 UTC, Thomas Thurman
needs-work Details | Review
LINGUAS file to be placed in po directory (303 bytes, text/plain)
2006-04-12 02:56 UTC, Thomas Thurman
  Details
add and use po/LINGUAS (1.26 KB, patch)
2008-01-18 02:48 UTC, Thomas Andersen
committed Details | Review

Description Thomas Thurman 2006-04-12 02:55:01 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.)
Comment 1 Thomas Thurman 2006-04-12 02:55:48 UTC
Created attachment 63276 [details] [review]
Patch to use po/LINGUAS
Comment 2 Thomas Thurman 2006-04-12 02:56:37 UTC
Created attachment 63277 [details]
LINGUAS file to be placed in po directory
Comment 3 Rodney Dawes 2006-04-13 18:43:01 UTC
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.
Comment 4 Matthias Clasen 2006-04-13 18:59:53 UTC
right. 
I wasn't going to apply the patches.
Comment 5 Daniel Macks 2006-12-11 05:27:01 UTC
Is there an open bugzilla item or other place to track the progress of intltool  migrating away glib-gettext stuff?
Comment 6 Matthias Clasen 2006-12-12 21:39:12 UTC
I don't want glib to depend on intltool anyway
Comment 7 Lucas Rocha 2006-12-19 22:24:05 UTC
(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? 

Comment 8 Christian Persch 2007-04-09 22:55:19 UTC
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.
Comment 9 Behdad Esfahbod 2007-04-09 23:07:13 UTC
(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.

Comment 10 Dan Winship 2007-04-10 14:54:29 UTC
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.
Comment 11 Behdad Esfahbod 2007-04-10 15:34:18 UTC
(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.

Comment 12 Matthias Clasen 2007-04-11 12:51:26 UTC
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.
Comment 13 Thomas Andersen 2008-01-18 02:48:57 UTC
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?
Comment 14 Claude Paroz 2008-04-26 16:11:19 UTC
Latest patch from Thomas Andersen seems simple and good to me. Could a glib dev quickly review it?
Comment 15 Matthias Clasen 2008-05-15 05:21:53 UTC
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. 
Comment 16 Matthias Clasen 2008-06-11 20:32:06 UTC
        * po/LINGUAS: New file
        * po/Makefile.in.in: Dist LINGUAS
        * configure.in: Use po/LINUAS
        Patch by Thomas Andersen
Comment 17 paul 2008-06-12 03:37:10 UTC
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
Comment 18 Matthias Clasen 2008-06-12 03:58:39 UTC
Honestly no idea. Does srcdir work better ?
Comment 19 paul 2008-06-12 05:42:26 UTC
yes, the way it is in comment #13 gets everything running