]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use an autoconf-determined locale name.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Jun 2006 10:49:53 +0000 (10:49 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:13:24 +0000 (12:13 +0200)
gettext-tools/tests/ChangeLog
gettext-tools/tests/gettext-4
gettext-tools/tests/gettext-4-prg.c

index 466a2c1c553ab9f1bb4e1dfbaf3e9c50ff30b28f..81db331d32b0bc2df007aba10481f9832c2ab954 100644 (file)
@@ -1,3 +1,9 @@
+2006-06-17  Bruno Haible  <bruno@clisp.org>
+
+       * gettext-4: Use a french locale instead of a german locale. Pass
+       the locale name as an argument to gettext-4-prg.
+       * gettext-4-prg.c (main): Use the locale name passed as argument.
+
 2006-06-04  Bruno Haible  <bruno@clisp.org>
 
         * recode-sr-latin-2: Skip the test on MacOS X and BeOS.
index f70eb18fcdf7950c7d14cd91be6487e5847b600d..1e27179015e19037aa6d60d0a08c0202b08e70a3 100755 (executable)
@@ -5,24 +5,30 @@
 tmpfiles=""
 trap 'rm -fr $tmpfiles' 1 2 3 15
 
-# This test works only on systems that have a de_DE.ISO-8859-1 locale installed.
-LC_ALL=de_DE.ISO-8859-1 ./testlocale || {
+# This test works only on systems that have a traditional french locale
+# installed.
+# gettext-4.po is actually a German PO file, but only the encoding of the
+# locale matters, not the language. configure has already checked whether
+# a traditional french locale is installed; no need to check also for a
+# traditional german locale.
+: ${LOCALE_FR=fr_FR}
+{ test $LOCALE_FR != none && LC_ALL=$LOCALE_FR ./testlocale; } || {
   if test -f /usr/bin/localedef; then
-    echo "Skipping test: locale de_DE.ISO-8859-1 not installed"
+    echo "Skipping test: no traditional french locale is installed"
   else
-    echo "Skipping test: locale de_DE.ISO-8859-1 not supported"
+    echo "Skipping test: no traditional french locale is supported"
   fi
   exit 77
 }
 
-tmpfiles="$tmpfiles de_DE"
-test -d de_DE || mkdir de_DE
-test -d de_DE/LC_MESSAGES || mkdir de_DE/LC_MESSAGES
+tmpfiles="$tmpfiles fr_FR"
+test -d fr_FR || mkdir fr_FR
+test -d fr_FR/LC_MESSAGES || mkdir fr_FR/LC_MESSAGES
 
 : ${MSGFMT=msgfmt}
-${MSGFMT} -o de_DE/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-4.po
+${MSGFMT} -o fr_FR/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-4.po
 
-./gettext-4-prg || exit 1
+./gettext-4-prg $LOCALE_FR || exit 1
 
 rm -fr $tmpfiles
 
index dea6d48f27ee42d04255d9318daa856bdc8bfe1d..cc5e8050cf7f128500d98c25293c510678a88a56 100644 (file)
@@ -33,7 +33,7 @@
 #include "libgnuintl.h"
 
 int
-main (void)
+main (int argc, char *argv[])
 {
   char *s;
   int result = 0;
@@ -46,7 +46,7 @@ main (void)
   unsetenv ("LANG");
   unsetenv ("OUTPUT_CHARSET");
 
-  xsetenv ("LC_ALL", "de_DE.ISO-8859-1", 1);
+  xsetenv ("LC_ALL", argv[1], 1);
   setlocale (LC_ALL, "");
   textdomain ("codeset");
   bindtextdomain ("codeset", ".");