]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use the system's french locale, even if it's called "fr_FR.ISO8859-1" instead
authorBruno Haible <bruno@clisp.org>
Thu, 19 Jun 2003 12:30:19 +0000 (12:30 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:10:42 +0000 (12:10 +0200)
of just plain "fr_FR".

21 files changed:
gettext-tools/ChangeLog
gettext-tools/configure.ac
gettext-tools/m4/ChangeLog
gettext-tools/m4/Makefile.am
gettext-tools/m4/locale-fr.m4 [new file with mode: 0644]
gettext-tools/tests/ChangeLog
gettext-tools/tests/Makefile.am
gettext-tools/tests/lang-c
gettext-tools/tests/lang-c++
gettext-tools/tests/lang-clisp
gettext-tools/tests/lang-gawk
gettext-tools/tests/lang-java
gettext-tools/tests/lang-librep
gettext-tools/tests/lang-objc
gettext-tools/tests/lang-pascal
gettext-tools/tests/lang-perl
gettext-tools/tests/lang-php
gettext-tools/tests/lang-python-1
gettext-tools/tests/lang-python-2
gettext-tools/tests/lang-smalltalk
gettext-tools/tests/lang-tcl

index f63593c5dee955583a3e00b09b5dc3d781a2d451..a54bb6f6c280f8c40f444da960c624bfaed8dbea 100644 (file)
@@ -1,4 +1,8 @@
-2003-05-08  Bruno Haible  <bruno@clisp.org>
+2003-06-19  Bruno Haible  <bruno@clisp.org>
+
+       * configure.ac: Invoke gt_LOCALE_FR.
+
+2003-06-08  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (config.h_vms): Don't define HAVE_ENVIRON_DECL. Define
        eaccess.
index 3717e93ac6681a80991a427681c7cee46dded1b7..6902a849745eecdc7fd865ee698687b1c78c9ec9 100644 (file)
@@ -211,6 +211,7 @@ AC_SUBST(CROSS_COMPILING)
 
 dnl Checks for optional programs for the tests/lang-* tests.
 gt_PROG_ANSI_CXX
+gt_LOCALE_FR
 
 dnl Generate the version information file in the intl/ directory.
 test -d intl || mkdir intl
index 4da28079d8ea3ea63b52f24fbec4d38fbd102db8..a8f6de07c50e16f3d0c29d1bf3bbea3b5fbc6937 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-19  Bruno Haible  <bruno@clisp.org>
+
+       * locale-fr.m4: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2003-05-22  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.12.1 released.
index ec2310b61d5dea5b5c122bde5836d8ac9bbf567f..b315fd0b47868f6e04f697f1301ae34ca1a298db 100644 (file)
@@ -39,6 +39,7 @@ getline.m4 \
 hostname.m4 \
 javacomp.m4 \
 javaexec.m4 \
+locale-fr.m4 \
 mbrtowc.m4 \
 mbstate_t.m4 \
 mbswidth.m4 \
diff --git a/gettext-tools/m4/locale-fr.m4 b/gettext-tools/m4/locale-fr.m4
new file mode 100644 (file)
index 0000000..5721733
--- /dev/null
@@ -0,0 +1,60 @@
+# locale-fr.m4 serial 1 (gettext-0.12.2)
+dnl Copyright (C) 2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License.  As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a french locale with traditional encoding.
+AC_DEFUN([gt_LOCALE_FR],
+[
+  AC_CACHE_CHECK([for a traditional french locale], gt_cv_locale_fr, [
+changequote(,)dnl
+    cat <<EOF > conftest.$ac_ext
+#include <locale.h>
+#include <time.h>
+struct tm t;
+char buf[16];
+int main () {
+  /* Check whether the given locale name is recognized by the system.  */
+  if (setlocale (LC_ALL, "") == NULL) return 1;
+  /* Check whether the abbreviation of the second month is three bytes long.
+     This excludes the UTF-8 encoding.  */
+  t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+  if (strftime (buf, sizeof (buf), "%b", &t) != 3) return 1;
+  return 0;
+}
+EOF
+changequote([,])dnl
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      # Test for the usual locale name.
+      if (LC_ALL=fr_FR ./conftest; exit) 2>/dev/null; then
+        gt_cv_locale_fr=fr_FR
+      else
+        # Test for the locale name with explicit encoding suffix.
+        if (LC_ALL=fr_FR.ISO-8859-1 ./conftest; exit) 2>/dev/null; then
+          gt_cv_locale_fr=fr_FR
+        else
+          # Test for the AIX, OSF/1, FreeBSD, NetBSD locale name.
+          if (LC_ALL=fr_FR.ISO8859-1 ./conftest; exit) 2>/dev/null; then
+            gt_cv_locale_fr=fr_FR.ISO8859-1
+          else
+            # Test for the HP-UX locale name.
+            if (LC_ALL=fr_FR.iso88591 ./conftest; exit) 2>/dev/null; then
+              gt_cv_locale_fr=fr_FR.iso88591
+            else
+              # None found.
+              gt_cv_locale_fr=fr_FR
+            fi
+          fi
+        fi
+      fi
+    fi
+    rm -fr conftest*
+  ])
+  LOCALE_FR=$gt_cv_locale_fr
+  AC_SUBST([LOCALE_FR])
+])
index b40c1bc35b4ddf434ffd23b82769de31fc431f9a..1550e1643ef1542b617a5765351e70cd1eaf39a3 100644 (file)
@@ -1,7 +1,25 @@
+2003-06-19  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.am (TESTS_ENVIRONMENT): Also set LOCALE_FR.
+       * lang-c: Use system dependent locale name $LOCALE_FR, not just fr_FR.
+       * lang-c++: Likewise.
+       * lang-clisp: Likewise.
+       * lang-gawk: Likewise.
+       * lang-java: Likewise.
+       * lang-librep: Likewise.
+       * lang-objc: Likewise.
+       * lang-pascal: Likewise.
+       * lang-perl: Likewise.
+       * lang-php: Likewise.
+       * lang-python-1: Likewise.
+       * lang-python-2: Likewise.
+       * lang-smalltalk: Likewise.
+       * lang-tcl: Likewise.
+
 2003-06-17  Paul Eggert  <eggert@twinsun.com>
 
-       * gettext-tools/tests/msgcat-7: Put msgcat options before file name, so
-       that the test doesn't fail if POSIXLY_CORRECT is set.
+       * msgcat-7: Put msgcat options before file name, so that the test
+       doesn't fail if POSIXLY_CORRECT is set.
 
 2003-06-15  Bruno Haible  <bruno@clisp.org>
 
index 349bdb9a53dbd91a7edac86339eaa5dc56eb885a..95731bf2c516c2c70f06785893df5b6b38fc4bd8 100644 (file)
@@ -102,6 +102,7 @@ TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=.:../src:$$PATH \
                    CPPFLAGS='@CPPFLAGS@' LDFLAGS='@LDFLAGS@' \
                    LTLIBINTL='@LTLIBINTL@' \
                    TESTJAVA='@TESTJAVA@' \
+                   LOCALE_FR='@LOCALE_FR@' \
                    CONFIG_SHELL='$(SHELL)' \
                    $(SHELL)
 
index 9f783f950ce8829a4f03526918875469e8e8c8ea..f226d8695328517b0ba6aed4be0e29d5449cd6b5 100755 (executable)
@@ -121,7 +121,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= ./prog fr_FR 2 > prog.out
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
 case $? in
   0) ;;
   77) rm -fr $tmpfiles; exit 77;;
index 63853a282b14e94297b923c87a0859f085e91627..aa2e8f3520dcee2ff6ca9f4ec2649a3ec386ed69 100755 (executable)
@@ -135,7 +135,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= ./prog fr_FR 2 > prog.out
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
 case $? in
   0) ;;
   77) rm -fr $tmpfiles; exit 77;;
index 5218c7fd8ef9998c39bebff3d4664639759affd9..5e1c4e82403720e484136ec8f8741452e1abefd9 100755 (executable)
@@ -103,7 +103,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-CLISP_LANGUAGE= LANGUAGE= LC_ALL=fr_FR clisp prog.lisp 2 > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR clisp prog.lisp 2 > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index feb106625bc6cbd2582d8c16457ea7e8ac0b5ca1..3d61d796d92e294541be2358e935b9ea6175e685 100755 (executable)
@@ -90,7 +90,8 @@ case `gawk --version 2>&1 | sed -e 's/^[^0-9]*//'` in
 esac
 
 # Test that gawk wasn't built with --disable-nls.
-LANGUAGE= LC_ALL=fr_FR gawk --version | grep logiciel > /dev/null
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LC_ALL=$LOCALE_FR gawk --version | grep logiciel > /dev/null
 test $? = 0 || { rm -fr $tmpfiles; exit 77; }
 
 tmpfiles="$tmpfiles prog.ok prog.out"
@@ -101,7 +102,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= LC_ALL=fr_FR gawk -v n=2 -f prog.awk > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index b6a0a3a359b84589e2407dae0445076869032d50..e759093a00a18b15c39b4c3688fb0e7d995391d5 100755 (executable)
@@ -102,8 +102,9 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
+: ${LOCALE_FR=fr_FR}
 : ${JAVAEXEC="/bin/sh ../lib/javaexec.sh"}
-LANGUAGE= LC_ALL=fr_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
+LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index 0fa2f3cb24f3e01b6609cba4942021b38ffed9c3..a14e3e31e377844204047316a06dc00c66e6c21c 100755 (executable)
@@ -82,7 +82,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= LC_ALL=fr_FR rep --no-rc --batch prog.jl > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LC_ALL=$LOCALE_FR rep --no-rc --batch prog.jl > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index a99898a5d81c5141e0cd48eb1635654cc3ab2c3a..5e25e30b609dbe2afdd1af659ce0c4e966861517 100755 (executable)
@@ -135,7 +135,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= ./prog fr_FR 2 > prog.out
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
 case $? in
   0) ;;
   77) rm -fr $tmpfiles; exit 77;;
index 61ecbe7829382dc93cb53a92b75c7e6b283744f1..1f13e48bc1a3ad0ba5041c91cc6fb582e2c55444 100755 (executable)
@@ -83,7 +83,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=fr_FR ./prog > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR ./prog > prog.out || exit 1
 : ${DIFF=diff}
 ${DIFF} prog.ok prog.out || exit 1
 
index 13af8e38799484f205f18c0ebff408194dca7783..25c735037c4787947405e5b6ca213e36ebb4c127 100755 (executable)
@@ -90,7 +90,8 @@ EOF
 perl -e 'use Locale::Messages;' 2>/dev/null \
   || { rm -fr $tmpfiles; exit 77; }
 
-LANGUAGE= LANG=fr_FR LC_MESSAGES= LC_ALL= perl program.pl > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_ALL= perl program.pl > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index 76f479322f08c2a429f575fd1e0dbb919943e87c..d89c394c36f3b1c030885f980245cc2c629abb0f 100755 (executable)
@@ -78,7 +78,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= LC_ALL=fr_FR php -q prog.php > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LC_ALL=$LOCALE_FR php -q prog.php > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index fc0cfe49433d287fb2fad82268c7bdc1719d3bb3..7801b2cf747c35dfe7fcf75de27fb822eeb60815 100755 (executable)
@@ -79,7 +79,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= LC_ALL=fr_FR python prog.py > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LC_ALL=$LOCALE_FR python prog.py > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index ef14e0eb4ba58dcf168cba725257112124bba649..5719f4b0c680ad19c9430bac5508f54dde618d6d 100755 (executable)
@@ -99,7 +99,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= LC_ALL=fr_FR python prog.py 2 > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LC_ALL=$LOCALE_FR python prog.py 2 > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index d99d4b49c2c7fd4e19edf72cf9affd1f45dadafa..53d310c181e09515033d2f5ef456ae33d3984fa4 100755 (executable)
@@ -110,7 +110,8 @@ Loading package I18N
 EUR remplace FF.
 EOF
 
-LANGUAGE= LC_ALL=fr_FR gst -Q prog.st > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LC_ALL=$LOCALE_FR gst -Q prog.st > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles
index 90d87d1338c033001d1d600c5b40c0455a8cb8f9..70457d8b152ca4512dc663999c2b1a6b28850971 100755 (executable)
@@ -81,7 +81,8 @@ cat <<\EOF > prog.ok
 EUR remplace FF.
 EOF
 
-LANGUAGE= LANG=fr_FR LC_MESSAGES= LC_ALL= tclsh program.tcl > prog.out || exit 1
+: ${LOCALE_FR=fr_FR}
+LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_ALL= tclsh program.tcl > prog.out || exit 1
 ${DIFF} prog.ok prog.out || exit 1
 
 rm -fr $tmpfiles