Catalog list badly builded in gnome-gettext.m4



Hello

I was assembling a new gnome appl and while setting up a first
translated messages catalog, I found this:
In the macros/gnome-gettext.m4 the case assembling the NEW_LINGUAS list
of langs is searching if the language in at the beggining, inthe middle
or at the end of the wanted lang list. For that it match against the
$lang value concatenated with space (after, before or at both end).
The problem is when the language list only contains one language and is
not defined with space (ex. LINGUAS="fr").
I propose to handle this case with a specific equality test and if fails
go through the case.
Here is a patch. Not sure if it is really important but it can be really
annoying (I searched for a while before finding it),
or is it documented somewhere ??? :-)

--
                                                          -o)
                   Remi Cohen-Scali                       /\\
<Remi Cohen-Scali com>          <rcoscali rcsnet net>    _\_v
                                                         ----



Index: macros/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-common/macros/ChangeLog,v
retrieving revision 1.257
diff -u -p -r1.257 ChangeLog
--- macros/ChangeLog	2002/03/10 15:35:38	1.257
+++ macros/ChangeLog	2002/04/07 17:03:28
@@ -1,3 +1,8 @@
+2002-04-07  Remi Cohen-Scali  <remi cohen-scali com>
+
+	* gnome-gettext.m4: Handled case where there is only one lang
+	in queried languages list.
+
 2002-03-10  Sebastian Rittau  <srittau jroger in-berlin de>
 
 	* Makefile.am:
Index: macros/gnome-gettext.m4
===================================================================
RCS file: /cvs/gnome/gnome-common/macros/gnome-gettext.m4,v
retrieving revision 1.22
diff -u -p -r1.22 gnome-gettext.m4
--- macros/gnome-gettext.m4	2002/03/05 16:57:29	1.22
+++ macros/gnome-gettext.m4	2002/04/07 17:03:28
@@ -252,6 +252,7 @@ strdup __argz_count __argz_stringify __a
        for lang in $LINGUAS; do
          case "$ALL_LINGUAS" in
           *\ $lang\ *|$lang\ *|*\ $lang) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
+          *) if test "x$lang" = "x$ALL_LINGUAS"; then NEW_LINGUAS="$NEW_LINGUAS $lang"; fi ;;
          esac
        done
        LINGUAS=$NEW_LINGUAS




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