diff options
59 files changed, 983 insertions, 886 deletions
diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 721c29a..055c2d7 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,67 @@ +2013-05-29 Daiki Ueno <ueno@gnu.org> + + Avoid temp file name collisions in test scripts. + * format-c-3: Use distinct temporary file names. + * format-c-4: Likewise. + * lang-c: Likewise. + * lang-c++: Likewise. + * gettext-1: Likewise. + * gettext-2: Likewise. + * gettext-3: Likewise. + * gettext-4: Likewise. + * gettext-5: Likewise. + * gettext-6: Likewise. + * gettext-7: Likewise. + * lang-bash: Likewise. + * lang-c: Likewise. + * lang-c++: Likewise. + * lang-clisp: Likewise. + * lang-csharp: Likewise. + * lang-elisp: Likewise. + * lang-gawk: Likewise. + * lang-guile: Likewise. + * lang-java: Likewise. + * lang-javascript: Likewise. + * lang-librep: Likewise. + * lang-lua: Likewise. + * lang-objc: Likewise. + * lang-pascal: Likewise. + * lang-perl-1: Likewise. + * lang-perl-2: Likewise. + * lang-php: Likewise. + * lang-po: Likewise. + * lang-python-1: Likewise. + * lang-python-2: Likewise. + * lang-rst: Likewise. + * lang-sh: Likewise. + * lang-smalltalk: Likewise. + * lang-tcl: Likewise. + * lang-ycp: Likewise. + * msgfmt-1: Likewise. + * msgfmt-17: Likewise. + * msgfmt-2: Likewise. + * msgfmt-properties-1: Likewise. + * msgunfmt-csharp-1: Likewise. + * msgunfmt-java-1: Likewise. + * msgunfmt-tcl-1: Likewise. + * plural-1: Likewise. + * plural-2: Likewise. + * xgettext-glade-1: Likewise. + * xgettext-glade-2: Likewise. + * xgettext-glade-3: Likewise. + * xgettext-glade-4: Likewise. + * xgettext-glade-5: Likewise. + * xgettext-python-4: Likewise. + * xgettext-stringtable-1: Likewise. + * format-c-3-prg.c: Use distinct message catalog directory. + * format-c-4-prg.c: Likewise. + * gettext-3-prg.c: Likewise. + * gettext-4-prg.c: Likewise. + * gettext-5-prg.c: Likewise. + * gettext-6-prg.c: Likewise. + * gettext-7-prg.c: Likewise. + * plural-1-prg.c: Likewise. + 2013-05-12 Daiki Ueno <ueno@gnu.org> * xgettext-javascript-4: Add a test for normal escape sequences. diff --git a/gettext-tools/tests/format-c-3 b/gettext-tools/tests/format-c-3 index 3511f6b..1e98422 100755 --- a/gettext-tools/tests/format-c-3 +++ b/gettext-tools/tests/format-c-3 @@ -22,29 +22,30 @@ EOF : ${DIFF=diff} ${DIFF} fc3.ok fc3.pot || exit 1 -tmpfiles="$tmpfiles de.po" -cat <<EOF > de.po +tmpfiles="$tmpfiles fc3-de.po" +cat <<EOF > fc3-de.po #, c-format msgid "father of %<PRId8> children" msgstr "Vater von %<PRId8> Kindern" EOF -tmpfiles="$tmpfiles de" -test -d de || mkdir de -test -d de/LC_MESSAGES || mkdir de/LC_MESSAGES +tmpfiles="$tmpfiles fc3-dir" +test -d fc3-dir || mkdir fc3-dir +test -d fc3-dir/de || mkdir fc3-dir/de +test -d fc3-dir/de/LC_MESSAGES || mkdir fc3-dir/de/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o de/LC_MESSAGES/fc3.mo de.po +${MSGFMT} -o fc3-dir/de/LC_MESSAGES/fc3.mo fc3-de.po -tmpfiles="$tmpfiles de.po.tmp de.po.un" +tmpfiles="$tmpfiles fc3-de.po.tmp fc3-de.po.un" : ${MSGUNFMT=msgunfmt} -${MSGUNFMT} -o de.po.tmp de/LC_MESSAGES/fc3.mo +${MSGUNFMT} -o fc3-de.po.tmp fc3-dir/de/LC_MESSAGES/fc3.mo test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < de.po.tmp > de.po.un +LC_ALL=C tr -d '\r' < fc3-de.po.tmp > fc3-de.po.un test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} de.po de.po.un || exit 1 +${DIFF} fc3-de.po fc3-de.po.un || exit 1 LANGUAGE= ./fc3 de_DE result=$? diff --git a/gettext-tools/tests/format-c-3-prg.c b/gettext-tools/tests/format-c-3-prg.c index d448311..dac0d26 100644 --- a/gettext-tools/tests/format-c-3-prg.c +++ b/gettext-tools/tests/format-c-3-prg.c @@ -61,7 +61,7 @@ main (int argc, char *argv[]) } textdomain ("fc3"); - bindtextdomain ("fc3", "."); + bindtextdomain ("fc3", "fc3-dir"); s = gettext ("father of %"PRId8" children"); c1 = "Vater von %"; c2 = " Kindern"; diff --git a/gettext-tools/tests/format-c-4 b/gettext-tools/tests/format-c-4 index 5764e0a..aef04d5 100755 --- a/gettext-tools/tests/format-c-4 +++ b/gettext-tools/tests/format-c-4 @@ -24,8 +24,8 @@ EOF : ${DIFF=diff} ${DIFF} fc4.ok fc4.pot || exit 1 -tmpfiles="$tmpfiles de.po" -cat <<EOF > de.po +tmpfiles="$tmpfiles fc4-de.po" +cat <<EOF > fc4-de.po #, c-format msgid "father of %<PRId8> child" msgid_plural "father of %<PRId8> children" @@ -33,22 +33,23 @@ msgstr[0] "Vater eines Kindes" msgstr[1] "Vater von %<PRId8> Kindern" EOF -tmpfiles="$tmpfiles de" -test -d de || mkdir de -test -d de/LC_MESSAGES || mkdir de/LC_MESSAGES +tmpfiles="$tmpfiles fc4-dir" +test -d fc4-dir || mkdir fc4-dir +test -d fc4-dir/de || mkdir fc4-dir/de +test -d fc4-dir/de/LC_MESSAGES || mkdir fc4-dir/de/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o de/LC_MESSAGES/fc4.mo de.po +${MSGFMT} -o fc4-dir/de/LC_MESSAGES/fc4.mo fc4-de.po -tmpfiles="$tmpfiles de.po.tmp de.po.un" +tmpfiles="$tmpfiles fc4-de.po.tmp fc4-de.po.un" : ${MSGUNFMT=msgunfmt} -${MSGUNFMT} -o de.po.tmp de/LC_MESSAGES/fc4.mo +${MSGUNFMT} -o fc4-de.po.tmp fc4-dir/de/LC_MESSAGES/fc4.mo test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < de.po.tmp > de.po.un +LC_ALL=C tr -d '\r' < fc4-de.po.tmp > fc4-de.po.un test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} de.po de.po.un || exit 1 +${DIFF} fc4-de.po fc4-de.po.un || exit 1 LANGUAGE= ./fc4 de_DE result=$? diff --git a/gettext-tools/tests/format-c-4-prg.c b/gettext-tools/tests/format-c-4-prg.c index 45a222b..78f014b 100644 --- a/gettext-tools/tests/format-c-4-prg.c +++ b/gettext-tools/tests/format-c-4-prg.c @@ -61,7 +61,7 @@ main (int argc, char *argv[]) } textdomain ("fc4"); - bindtextdomain ("fc4", "."); + bindtextdomain ("fc4", "fc4-dir"); s = ngettext ("father of %"PRId8" child", "father of %"PRId8" children", n); c1 = "Vater von %"; c2 = " Kindern"; diff --git a/gettext-tools/tests/gettext-1 b/gettext-tools/tests/gettext-1 index 9d57bbb..450a772 100755 --- a/gettext-tools/tests/gettext-1 +++ b/gettext-tools/tests/gettext-1 @@ -6,13 +6,14 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 # Create binary test file in correct position. -tmpfiles="$tmpfiles LC_MESSAGES" -test -d LC_MESSAGES || mkdir LC_MESSAGES -cp $top_srcdir/tests/test.mo LC_MESSAGES +tmpfiles="$tmpfiles gt-1" +test -d gt-1 || mkdir gt-1 +test -d gt-1/LC_MESSAGES || mkdir gt-1/LC_MESSAGES +cp $top_srcdir/tests/test.mo gt-1/LC_MESSAGES tmpfiles="$tmpfiles gt-test1.out" : ${GETTEXT=gettext} -TEXTDOMAINDIR=.. LANGUAGE=tests \ +TEXTDOMAINDIR=. LANGUAGE=gt-1 \ ${GETTEXT} --env LC_ALL=en -e test 'SYS_(C)\n' | LC_ALL=C tr -d '\r' > gt-test1.out # Create correct file. diff --git a/gettext-tools/tests/gettext-2 b/gettext-tools/tests/gettext-2 index f1099ef..6269282 100755 --- a/gettext-tools/tests/gettext-2 +++ b/gettext-tools/tests/gettext-2 @@ -18,13 +18,14 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 # Create binary test file in correct position. -tmpfiles="$tmpfiles LC_MESSAGES" -test -d LC_MESSAGES || mkdir LC_MESSAGES -cp $top_srcdir/tests/test.mo LC_MESSAGES +tmpfiles="$tmpfiles gt-2" +test -d gt-2 || mkdir gt-2 +test -d gt-2/LC_MESSAGES || mkdir gt-2/LC_MESSAGES +cp $top_srcdir/tests/test.mo gt-2/LC_MESSAGES tmpfiles="$tmpfiles gt-test2.out" : ${GETTEXT=gettext} -TEXTDOMAINDIR=.. LANGUAGE=tests \ +TEXTDOMAINDIR=. LANGUAGE=gt-2 \ ${GETTEXT} --env LC_ALL=en test 'error 3' > gt-test2.out # Create correct file. diff --git a/gettext-tools/tests/gettext-3 b/gettext-tools/tests/gettext-3 index 5218dc3..49a0fbc 100755 --- a/gettext-tools/tests/gettext-3 +++ b/gettext-tools/tests/gettext-3 @@ -31,15 +31,16 @@ LC_ALL=fr_FR ./testlocale || { exit 77 } -tmpfiles="$tmpfiles de_DE fr_FR" -test -d de_DE || mkdir de_DE -test -d de_DE/LC_MESSAGES || mkdir de_DE/LC_MESSAGES -test -d fr_FR || mkdir fr_FR -test -d fr_FR/LC_MESSAGES || mkdir fr_FR/LC_MESSAGES +tmpfiles="$tmpfiles gt-3" +test -d gt-3 || mkdir gt-3 +test -d gt-3/de_DE || mkdir gt-3/de_DE +test -d gt-3/de_DE/LC_MESSAGES || mkdir gt-3/de_DE/LC_MESSAGES +test -d gt-3/fr_FR || mkdir gt-3/fr_FR +test -d gt-3/fr_FR/LC_MESSAGES || mkdir gt-3/fr_FR/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o de_DE/LC_MESSAGES/tstlang.mo ${top_srcdir}/tests/gettext-3-1.po -${MSGFMT} -o fr_FR/LC_MESSAGES/tstlang.mo ${top_srcdir}/tests/gettext-3-2.po +${MSGFMT} -o gt-3/de_DE/LC_MESSAGES/tstlang.mo ${top_srcdir}/tests/gettext-3-1.po +${MSGFMT} -o gt-3/fr_FR/LC_MESSAGES/tstlang.mo ${top_srcdir}/tests/gettext-3-2.po tmpfiles="$tmpfiles gt-3.ok" cat <<EOF > gt-3.ok diff --git a/gettext-tools/tests/gettext-3-prg.c b/gettext-tools/tests/gettext-3-prg.c index b2369cc..a51ea34 100644 --- a/gettext-tools/tests/gettext-3-prg.c +++ b/gettext-tools/tests/gettext-3-prg.c @@ -69,7 +69,7 @@ main (void) if (setlocale (LC_ALL, lang[i]) == NULL) setlocale (LC_ALL, "C"); - bindtextdomain ("tstlang", "."); + bindtextdomain ("tstlang", "gt-3"); for (j = 0; j < data_cnt; ++j) printf ("%s - %s\n", strings[j].selection, diff --git a/gettext-tools/tests/gettext-4 b/gettext-tools/tests/gettext-4 index e6c10bf..fb404e3 100755 --- a/gettext-tools/tests/gettext-4 +++ b/gettext-tools/tests/gettext-4 @@ -21,12 +21,13 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 exit 77 } -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles gt-4" +test -d gt-4 || mkdir gt-4 +test -d gt-4/fr || mkdir gt-4/fr +test -d gt-4/fr/LC_MESSAGES || mkdir gt-4/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-4.po +${MSGFMT} -o gt-4/fr/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-4.po ./gettext-4-prg $LOCALE_FR || exit 1 diff --git a/gettext-tools/tests/gettext-4-prg.c b/gettext-tools/tests/gettext-4-prg.c index f17c4b3..01734ce 100644 --- a/gettext-tools/tests/gettext-4-prg.c +++ b/gettext-tools/tests/gettext-4-prg.c @@ -48,7 +48,7 @@ main (int argc, char *argv[]) xsetenv ("LC_ALL", argv[1], 1); setlocale (LC_ALL, ""); textdomain ("codeset"); - bindtextdomain ("codeset", "."); + bindtextdomain ("codeset", "gt-4"); /* Here we expect output in ISO-8859-1. Except on Darwin 7 or newer and on BeOS, for which locale_charset () diff --git a/gettext-tools/tests/gettext-5 b/gettext-tools/tests/gettext-5 index 19affb0..bb76a5d 100755 --- a/gettext-tools/tests/gettext-5 +++ b/gettext-tools/tests/gettext-5 @@ -32,12 +32,13 @@ LC_ALL=de_DE.UTF-8 ./testlocale || { 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 gt-5" +test -d gt-5 || mkdir gt-5 +test -d gt-5/de_DE || mkdir gt-5/de_DE +test -d gt-5/de_DE/LC_MESSAGES || mkdir gt-5/de_DE/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o de_DE/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-5.po +${MSGFMT} -o gt-5/de_DE/LC_MESSAGES/codeset.mo ${top_srcdir}/tests/gettext-5.po ./gettext-5-prg || exit 1 diff --git a/gettext-tools/tests/gettext-5-prg.c b/gettext-tools/tests/gettext-5-prg.c index 55ec2a0..0f28fbd 100644 --- a/gettext-tools/tests/gettext-5-prg.c +++ b/gettext-tools/tests/gettext-5-prg.c @@ -38,7 +38,7 @@ main (void) unsetenv ("LANGUAGE"); unsetenv ("OUTPUT_CHARSET"); textdomain ("codeset"); - bindtextdomain ("codeset", "."); + bindtextdomain ("codeset", "gt-5"); setlocale (LC_ALL, "de_DE.ISO-8859-1"); diff --git a/gettext-tools/tests/gettext-6 b/gettext-tools/tests/gettext-6 index 43b83db..3ec0423 100755 --- a/gettext-tools/tests/gettext-6 +++ b/gettext-tools/tests/gettext-6 @@ -31,15 +31,16 @@ if test -n "$missing_locale"; then exit 77 fi -tmpfiles="$tmpfiles de_DE fr_FR" -test -d de_DE || mkdir de_DE -test -d de_DE/LC_MESSAGES || mkdir de_DE/LC_MESSAGES -test -d fr_FR || mkdir fr_FR -test -d fr_FR/LC_MESSAGES || mkdir fr_FR/LC_MESSAGES +tmpfiles="$tmpfiles gt-6" +test -d gt-6 || mkdir gt-6 +test -d gt-6/de_DE || mkdir gt-6/de_DE +test -d gt-6/de_DE/LC_MESSAGES || mkdir gt-6/de_DE/LC_MESSAGES +test -d gt-6/fr_FR || mkdir gt-6/fr_FR +test -d gt-6/fr_FR/LC_MESSAGES || mkdir gt-6/fr_FR/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o de_DE/LC_MESSAGES/tstthread.mo ${top_srcdir}/tests/gettext-6-1.po -${MSGFMT} -o fr_FR/LC_MESSAGES/tstthread.mo ${top_srcdir}/tests/gettext-6-2.po +${MSGFMT} -o gt-6/de_DE/LC_MESSAGES/tstthread.mo ${top_srcdir}/tests/gettext-6-1.po +${MSGFMT} -o gt-6/fr_FR/LC_MESSAGES/tstthread.mo ${top_srcdir}/tests/gettext-6-2.po tmpfiles="$tmpfiles gt-6.ok" cat <<EOF > gt-6.ok diff --git a/gettext-tools/tests/gettext-6-prg.c b/gettext-tools/tests/gettext-6-prg.c index 36a8e9d..01ed60c 100644 --- a/gettext-tools/tests/gettext-6-prg.c +++ b/gettext-tools/tests/gettext-6-prg.c @@ -175,7 +175,7 @@ main (int argc, char *argv[]) unsetenv ("LANGUAGE"); unsetenv ("OUTPUT_CHARSET"); textdomain ("tstthread"); - bindtextdomain ("tstthread", "."); + bindtextdomain ("tstthread", "gt-6"); result = 0; flipflop = 1; diff --git a/gettext-tools/tests/gettext-7 b/gettext-tools/tests/gettext-7 index e97b4fc..09123cd 100755 --- a/gettext-tools/tests/gettext-7 +++ b/gettext-tools/tests/gettext-7 @@ -32,12 +32,13 @@ if test -n "$missing_locale"; then exit 77 fi -tmpfiles="$tmpfiles de_DE" -test -d de_DE || mkdir de_DE -test -d de_DE/LC_MESSAGES || mkdir de_DE/LC_MESSAGES +tmpfiles="$tmpfiles gt-7" +test -d gt-7 || mkdir gt-7 +test -d gt-7/de_DE || mkdir gt-7/de_DE +test -d gt-7/de_DE/LC_MESSAGES || mkdir gt-7/de_DE/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o de_DE/LC_MESSAGES/tstthread.mo ${top_srcdir}/tests/gettext-7.po +${MSGFMT} -o gt-7/de_DE/LC_MESSAGES/tstthread.mo ${top_srcdir}/tests/gettext-7.po tmpfiles="$tmpfiles gt-7.out" ./gettext-7-prg > gt-7.out diff --git a/gettext-tools/tests/gettext-7-prg.c b/gettext-tools/tests/gettext-7-prg.c index d60efe2..437de64 100644 --- a/gettext-tools/tests/gettext-7-prg.c +++ b/gettext-tools/tests/gettext-7-prg.c @@ -179,7 +179,7 @@ main (int argc, char *argv[]) unsetenv ("LANGUAGE"); unsetenv ("OUTPUT_CHARSET"); textdomain ("tstthread"); - bindtextdomain ("tstthread", "."); + bindtextdomain ("tstthread", "gt-7"); result = 0; flipflop = 1; diff --git a/gettext-tools/tests/lang-bash b/gettext-tools/tests/lang-bash index 7ebf7fa..3510f19 100755 --- a/gettext-tools/tests/lang-bash +++ b/gettext-tools/tests/lang-bash @@ -12,8 +12,8 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles prog.sh" -cat <<\EOF > prog.sh +tmpfiles="$tmpfiles prog.bash" +cat <<\EOF > prog.bash #! /bin/bash n=$1 @@ -22,7 +22,7 @@ n=$1 TEXTDOMAIN=prog export TEXTDOMAIN -TEXTDOMAINDIR=. +TEXTDOMAINDIR=l-bash export TEXTDOMAINDIR $echo $"'Your command, please?', asked the waiter." @@ -30,19 +30,19 @@ $echo $"'Your command, please?', asked the waiter." $echo "`eval_ngettext "a piece of cake" "\\$n pieces of cake" $n`" EOF -tmpfiles="$tmpfiles prog.tmp prog.pot prog.err" +tmpfiles="$tmpfiles l-bash-prog.tmp l-bash-prog.pot l-bash-prog.err" : ${XGETTEXT=xgettext} LC_MESSAGES=C LC_ALL= \ -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.sh \ - >prog.err 2>&1 +${XGETTEXT} -o l-bash-prog.tmp --omit-header --no-location prog.bash \ + >l-bash-prog.err 2>&1 result=$? -cat prog.err | grep -v 'warning: the syntax \$"\.\.\." is deprecated due to security reasons' +cat l-bash-prog.err | grep -v 'warning: the syntax \$"\.\.\." is deprecated due to security reasons' test $result = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-bash-prog.tmp > l-bash-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<\EOF > prog.ok +tmpfiles="$tmpfiles l-bash-prog.ok" +cat <<\EOF > l-bash-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -54,10 +54,10 @@ msgstr[1] "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-bash-prog.ok l-bash-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-bash-fr.po" +cat <<\EOF > l-bash-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -74,22 +74,23 @@ msgstr[0] "un morceau de gateau" msgstr[1] "$n morceaux de gateau" EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-bash-fr.po.tmp l-bash-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-bash-fr.po.tmp l-bash-fr.po l-bash-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-bash-fr.po.tmp > l-bash-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-bash-fr.po l-bash-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-bash" +test -d l-bash || mkdir l-bash +test -d l-bash/fr || mkdir l-bash/fr +test -d l-bash/fr/LC_MESSAGES || mkdir l-bash/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-bash/fr/LC_MESSAGES/prog.mo l-bash-fr.po # Test for presence of bash version 2.0 or newer. (bash -c :) >/dev/null 2>/dev/null \ @@ -127,18 +128,18 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.nok prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-bash-prog.nok l-bash-prog.ok l-bash-prog.oku l-bash-prog.out" # Expected result when bash is built without i18n support. -cat <<\EOF > prog.nok +cat <<\EOF > l-bash-prog.nok 'Your command, please?', asked the waiter. 2 morceaux de gateau EOF # Expected result when bash is built with i18n support. -cat <<\EOF > prog.ok +cat <<\EOF > l-bash-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-bash-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EOF @@ -146,22 +147,22 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR bash ./prog.sh 2 > prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR bash ./prog.bash 2 > l-bash-prog.out || exit 1 : ${DIFF=diff} - ${DIFF} prog.nok prog.out > /dev/null && { + ${DIFF} l-bash-prog.nok l-bash-prog.out > /dev/null && { echo "Skipping test: bash is built without i18n support" rm -fr $tmpfiles; exit 77 } - ${DIFF} prog.ok prog.out || exit 1 + ${DIFF} l-bash-prog.ok l-bash-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 bash ./prog.sh 2 > prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 bash ./prog.bash 2 > l-bash-prog.out || exit 1 : ${DIFF=diff} - ${DIFF} prog.nok prog.out > /dev/null && { + ${DIFF} l-bash-prog.nok l-bash-prog.out > /dev/null && { echo "Skipping test: bash is built without i18n support" rm -fr $tmpfiles; exit 77 } - ${DIFF} prog.oku prog.out || exit 1 + ${DIFF} l-bash-prog.oku l-bash-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-c b/gettext-tools/tests/lang-c index 42eca3c..43fb57f 100755 --- a/gettext-tools/tests/lang-c +++ b/gettext-tools/tests/lang-c @@ -27,7 +27,7 @@ int main (int argc, char *argv[]) exit (77); textdomain ("prog"); - bindtextdomain ("prog", "."); + bindtextdomain ("prog", "l-c"); printf (_("'Your command, please?', asked the waiter.")); printf ("\n"); @@ -45,22 +45,22 @@ EOF # Variable needed by LTLIBINTL. top_builddir=.. -tmpfiles="$tmpfiles prog.${OBJEXT} prog${EXEEXT}" +tmpfiles="$tmpfiles l-c-prog.${OBJEXT} l-c-prog${EXEEXT}" # Put the -I flags before ${CFLAGS} ${CPPFLAGS}, to make sure that libintl.h # is found in the build directory, regardless of -I options present in # ${CFLAGS} or ${CPPFLAGS}. -${LIBTOOL} --quiet --mode=link ${CC} -I.. -I$top_srcdir/gnulib-lib ../gnulib-lib/libgettextlib.la -I../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o prog prog.c ${LTLIBINTL} \ +${LIBTOOL} --quiet --mode=link ${CC} -I.. -I$top_srcdir/gnulib-lib ../gnulib-lib/libgettextlib.la -I../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-c-prog prog.c ${LTLIBINTL} \ || exit 1 -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-c-prog.tmp l-c-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.c +${XGETTEXT} -o l-c-prog.tmp --omit-header --no-location -k_ prog.c test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-c-prog.tmp > l-c-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-c-prog.ok" +cat <<EOF > l-c-prog.ok #, c-format msgid "'Your command, please?', asked the waiter." msgstr "" @@ -77,10 +77,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-c-prog.ok l-c-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-c-fr.po" +cat <<\EOF > l-c-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -103,31 +103,32 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-c-fr.po.tmp l-c-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-c-fr.po.tmp l-c-fr.po l-c-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-c-fr.po.tmp > l-c-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-c-fr.po l-c-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-c" +test -d l-c || mkdir l-c +test -d l-c/fr || mkdir l-c/fr +test -d l-c/fr/LC_MESSAGES || mkdir l-c/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-c/fr/LC_MESSAGES/prog.mo l-c-fr.po -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-c-prog.ok l-c-prog.oku l-c-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-c-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-c-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -136,17 +137,17 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= ./prog $LOCALE_FR 2 > prog.out + LANGUAGE= ./l-c-prog $LOCALE_FR 2 > l-c-prog.out case $? in - 0) ${DIFF} prog.ok prog.out || exit 1;; + 0) ${DIFF} l-c-prog.ok l-c-prog.out || exit 1;; 77) LOCALE_FR=none;; *) exit 1;; esac fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out + LANGUAGE= ./l-c-prog $LOCALE_FR_UTF8 2 > l-c-prog.out case $? in - 0) ${DIFF} prog.oku prog.out || exit 1;; + 0) ${DIFF} l-c-prog.oku l-c-prog.out || exit 1;; 77) LOCALE_FR_UTF8=none;; *) exit 1;; esac diff --git a/gettext-tools/tests/lang-c++ b/gettext-tools/tests/lang-c++ index 9260403..a14b223 100755 --- a/gettext-tools/tests/lang-c++ +++ b/gettext-tools/tests/lang-c++ @@ -17,8 +17,8 @@ test "${TESTLIBASPRINTF}" = yes || { exit 77 } -tmpfiles="$tmpfiles prog.cc" -cat <<\EOF > prog.cc +tmpfiles="$tmpfiles l-c++-prog.cc" +cat <<\EOF > l-c++-prog.cc #include "config.h" /* Avoid deprecation warnings from g++ 3.1 or newer. */ @@ -48,7 +48,7 @@ int main (int argc, char *argv[]) exit (77); textdomain ("prog"); - bindtextdomain ("prog", "."); + bindtextdomain ("prog", "l-c++"); cout << _("'Your command, please?', asked the waiter.") << endl; @@ -62,29 +62,29 @@ EOF # Variable needed by LTLIBINTL. top_builddir=.. -tmpfiles="$tmpfiles prog.${OBJEXT} prog${EXEEXT}" -# Compile in two steps from .cc to .o and from .o to 'prog'. This way, +tmpfiles="$tmpfiles l-c++-prog.${OBJEXT} l-c++-prog${EXEEXT}" +# Compile in two steps from .cc to .o and from .o to 'l-c++-prog'. This way, # relinking is faster because doesn't need to redo the first step. # Put the -I flags before ${CXXFLAGS} ${CPPFLAGS}, to make sure that libintl.h # is found in the build directory, regardless of -I options present in # ${CXXFLAGS} or ${CPPFLAGS}. -${CXX} -I.. -I../../gettext-runtime/libasprintf -I$top_srcdir/gnulib-lib -I../intl ${CXXFLAGS} ${CPPFLAGS} -c prog.cc \ +${CXX} -I.. -I../../gettext-runtime/libasprintf -I$top_srcdir/gnulib-lib -I../intl ${CXXFLAGS} ${CPPFLAGS} -c l-c++-prog.cc \ || exit 1 # Remove the -Wl,--disable-auto-import option here that is added by # woe32-dll.m4. Cygwin 1.7.2 does not support it in C++ mode: It gives # a link error about 'std::cout'. -${LIBTOOL} --quiet --mode=link --tag=CXX ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o prog prog.${OBJEXT} ../../gettext-runtime/libasprintf/libasprintf.la ../gnulib-lib/libgettextlib.la ${LTLIBINTL} \ +${LIBTOOL} --quiet --mode=link --tag=CXX ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o l-c++-prog l-c++-prog.${OBJEXT} ../../gettext-runtime/libasprintf/libasprintf.la ../gnulib-lib/libgettextlib.la ${LTLIBINTL} \ || exit 1 -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-c++-prog.tmp l-c++-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.cc +${XGETTEXT} -o l-c++-prog.tmp --omit-header --no-location -k_ l-c++-prog.cc test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-c++-prog.tmp > l-c++-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-c++-prog.ok" +cat <<EOF > l-c++-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -100,10 +100,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-c++-prog.ok l-c++-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-c++-fr.po" +cat <<\EOF > l-c++-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -125,31 +125,32 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-c++-fr.po.tmp l-c++-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-c++-fr.po.tmp l-c++-fr.po l-c++-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-c++-fr.po.tmp > l-c++-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-c++-fr.po l-c++-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-c++" +test -d l-c++ || mkdir l-c++ +test -d l-c++/fr || mkdir l-c++/fr +test -d l-c++/fr/LC_MESSAGES || mkdir l-c++/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-c++/fr/LC_MESSAGES/prog.mo l-c++-fr.po -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-c++-prog.ok l-c++-prog.oku l-c++-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-c++-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-c++-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -158,17 +159,17 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= ./prog $LOCALE_FR 2 > prog.out + LANGUAGE= ./l-c++-prog $LOCALE_FR 2 > l-c++-prog.out case $? in - 0) ${DIFF} prog.ok prog.out || exit 1;; + 0) ${DIFF} l-c++-prog.ok l-c++-prog.out || exit 1;; 77) LOCALE_FR=none;; *) exit 1;; esac fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out + LANGUAGE= ./l-c++-prog $LOCALE_FR_UTF8 2 > l-c++-prog.out case $? in - 0) ${DIFF} prog.oku prog.out || exit 1;; + 0) ${DIFF} l-c++-prog.oku l-c++-prog.out || exit 1;; 77) LOCALE_FR_UTF8=none;; *) exit 1;; esac diff --git a/gettext-tools/tests/lang-clisp b/gettext-tools/tests/lang-clisp index c7da170..ace3ed5 100755 --- a/gettext-tools/tests/lang-clisp +++ b/gettext-tools/tests/lang-clisp @@ -10,7 +10,7 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles prog.lisp" cat <<\EOF > prog.lisp (setf (textdomain) "prog") -(setf (textdomaindir "prog") "./") +(setf (textdomaindir "prog") "./l-clisp/") (setq n (parse-integer (first *args*))) @@ -21,15 +21,15 @@ cat <<\EOF > prog.lisp (format t "~A~%" (format nil (gettext "~A is replaced by ~A.") "FF" "EUR")) EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-clisp-prog.tmp l-clisp-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.lisp +${XGETTEXT} -o l-clisp-prog.tmp --omit-header --no-location prog.lisp test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-clisp-prog.tmp > l-clisp-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-clisp-prog.ok" +cat <<EOF > l-clisp-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -45,10 +45,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-clisp-prog.ok l-clisp-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-clisp-fr.po" +cat <<\EOF > l-clisp-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -70,22 +70,23 @@ msgid "~A is replaced by ~A." msgstr "~1@*~A remplace ~0@*~A." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-clisp-fr.po.tmp l-clisp-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-clisp-fr.po.tmp l-clisp-fr.po l-clisp-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-clisp-fr.po.tmp > l-clisp-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-clisp-fr.po l-clisp-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-clisp" +test -d l-clisp || mkdir l-clisp +test -d l-clisp/fr || mkdir l-clisp/fr +test -d l-clisp/fr/LC_MESSAGES || mkdir l-clisp/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-clisp/fr/LC_MESSAGES/prog.mo l-clisp-fr.po # Test for presence of clisp version 2.28 or newer with gettext support. # Use clisp for the comparison of the version numbers; neither 'expr' nor 'bc' @@ -132,14 +133,14 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-clisp-prog.ok l-clisp-prog.oku l-clisp-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-clisp-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-clisp-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -148,14 +149,14 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR clisp prog.lisp 2 > prog.tmp || exit 1 - LC_ALL=C tr -d '\r' < prog.tmp > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR clisp prog.lisp 2 > l-clisp-prog.tmp || exit 1 + LC_ALL=C tr -d '\r' < l-clisp-prog.tmp > l-clisp-prog.out || exit 1 + ${DIFF} l-clisp-prog.ok l-clisp-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 clisp prog.lisp 2 > prog.tmp || exit 1 - LC_ALL=C tr -d '\r' < prog.tmp > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 clisp prog.lisp 2 > l-clisp-prog.tmp || exit 1 + LC_ALL=C tr -d '\r' < l-clisp-prog.tmp > l-clisp-prog.out || exit 1 + ${DIFF} l-clisp-prog.oku l-clisp-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-csharp b/gettext-tools/tests/lang-csharp index 256f635..0092953 100755 --- a/gettext-tools/tests/lang-csharp +++ b/gettext-tools/tests/lang-csharp @@ -49,19 +49,20 @@ class Program { } EOF -tmpfiles="$tmpfiles program.exe" +tmpfiles="$tmpfiles l-csharp" +test -d l-csharp || mkdir l-csharp : ${CSHARPCOMP="/bin/sh ../csharpcomp.sh"} -${CSHARPCOMP} -o program.exe -L ../../gettext-runtime/intl-csharp -l GNU.Gettext program.cs || exit 1 +${CSHARPCOMP} -o l-csharp/program.exe -L ../../gettext-runtime/intl-csharp -l GNU.Gettext program.cs || exit 1 -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-csharp-prog.tmp l-csharp-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location program.cs +${XGETTEXT} -o l-csharp-prog.tmp --omit-header --no-location program.cs test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-csharp-prog.tmp > l-csharp-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-csharp-prog.ok" +cat <<EOF > l-csharp-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -89,10 +90,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-csharp-prog.ok l-csharp-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-csharp-fr.po" +cat <<\EOF > l-csharp-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -128,20 +129,20 @@ msgid "{0} is replaced by {1}." msgstr "Le nouveau {1} remplace le vieux {0}." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-csharp-fr.po.tmp l-csharp-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-csharp-fr.po.tmp l-csharp-fr.po l-csharp-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-csharp-fr.po.tmp > l-csharp-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-csharp-fr.po l-csharp-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr/prog.dll" : ${MSGFMT=msgfmt} GETTEXTCSHARPLIBDIR=../../gettext-runtime/intl-csharp \ -${MSGFMT} --csharp -d . -r prog -l fr fr.po || exit 1 +${MSGFMT} --csharp -d l-csharp -r prog -l fr l-csharp-fr.po || exit 1 +exit 0 # Test which of the fr_FR locales are installed. : ${LOCALE_FR=fr_FR} @@ -171,16 +172,16 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-csharp-prog.ok l-csharp-prog.oku l-csharp-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-csharp-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. 2 morceaux de gateau succulent Le nouveau EUR remplace le vieux FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-csharp-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -192,12 +193,12 @@ EOF : ${LOCALE_FR_UTF8=fr_FR.UTF-8} : ${CSHARPEXEC="/bin/sh ../csharpexec.sh"} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp program.exe 2 > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp l-csharp/program.exe 2 > l-csharp-prog.out || exit 1 + ${DIFF} l-csharp-prog.ok l-csharp-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp program.exe 2 > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp l-csharp/program.exe 2 > l-csharp-prog.out || exit 1 + ${DIFF} l-csharp-prog.oku l-csharp-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-elisp b/gettext-tools/tests/lang-elisp index 5ddb4b3..86a930f 100755 --- a/gettext-tools/tests/lang-elisp +++ b/gettext-tools/tests/lang-elisp @@ -8,7 +8,7 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles prog.el" cat <<\EOF > prog.el (textdomain "prog") -(bindtextdomain "prog" ".") +(bindtextdomain "prog" "l-elisp") (format standard-output "%s\n" (_ "'Your command, please?', asked the waiter.")) @@ -16,15 +16,15 @@ cat <<\EOF > prog.el (format nil (_ "%s is replaced by %s.") "FF" "EUR")) EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-elisp-prog.tmp l-elisp-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.el +${XGETTEXT} -o l-elisp-prog.tmp --omit-header --no-location prog.el test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-elisp-prog.tmp > l-elisp-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-elisp-prog.ok" +cat <<EOF > l-elisp-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -34,10 +34,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-elisp-prog.ok l-elisp-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-elisp-fr.po" +cat <<\EOF > l-elisp-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -52,22 +52,23 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-elisp-fr.po.tmp l-elisp-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-elisp-fr.po.tmp l-elisp-fr.po l-elisp-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-elisp-fr.po.tmp > l-elisp-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-elisp-fr.po l-elisp-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-elisp" +test -d l-elisp || mkdir l-elisp +test -d l-elisp/fr || mkdir l-elisp/fr +test -d l-elisp/fr/LC_MESSAGES || mkdir l-elisp/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-elisp/fr/LC_MESSAGES/prog.mo l-elisp-fr.po rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-gawk b/gettext-tools/tests/lang-gawk index f3af46f..ebf73c4 100755 --- a/gettext-tools/tests/lang-gawk +++ b/gettext-tools/tests/lang-gawk @@ -15,7 +15,7 @@ tmpfiles="$tmpfiles prog.awk" cat <<\EOF > prog.awk BEGIN { TEXTDOMAIN = "prog" - bindtextdomain ("./") + bindtextdomain ("./l-gawk") print _"'Your command, please?', asked the waiter." @@ -25,15 +25,15 @@ BEGIN { } EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-gawk-prog.tmp l-gawk-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.awk +${XGETTEXT} -o l-gawk-prog.tmp --omit-header --no-location prog.awk test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-gawk-prog.tmp > l-gawk-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-gawk-prog.ok" +cat <<EOF > l-gawk-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -49,10 +49,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-gawk-prog.ok l-gawk-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-gawk-fr.po" +cat <<\EOF > l-gawk-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -74,22 +74,23 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-gawk-fr.po.tmp l-gawk-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-gawk-fr.po.tmp l-gawk-fr.po l-gawk-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-gawk-fr.po.tmp > l-gawk-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-gawk-fr.po l-gawk-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-gawk" +test -d l-gawk || mkdir l-gawk +test -d l-gawk/fr || mkdir l-gawk/fr +test -d l-gawk/fr/LC_MESSAGES || mkdir l-gawk/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-gawk/fr/LC_MESSAGES/prog.mo l-gawk-fr.po # Test for presence of gawk version 3.1.3 or newer, excluding version 3.1.5. (gawk --version) >/dev/null 2>/dev/null \ @@ -145,14 +146,14 @@ if test $LOCALE_FR_UTF8 != none; then } fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-gawk-prog.ok l-gawk-prog.oku l-gawk-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-gawk-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-gawk-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -161,12 +162,12 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > l-gawk-prog.out || exit 1 + ${DIFF} l-gawk-prog.ok l-gawk-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk -v n=2 -f prog.awk > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk -v n=2 -f prog.awk > l-gawk-prog.out || exit 1 + ${DIFF} l-gawk-prog.oku l-gawk-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-guile b/gettext-tools/tests/lang-guile index 4550b4a..0f8795d 100755 --- a/gettext-tools/tests/lang-guile +++ b/gettext-tools/tests/lang-guile @@ -13,7 +13,7 @@ cat <<\EOF > prog.scm (setlocale LC_ALL "") (textdomain "prog") -(bindtextdomain "prog" ".") +(bindtextdomain "prog" "l-guile") (define n (string->number (list-ref (command-line) 1))) @@ -24,15 +24,15 @@ cat <<\EOF > prog.scm (format #t "~A~%" (format #f (gettext "~A is replaced by ~A.") "FF" "EUR")) EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-guile-prog.tmp l-guile-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.scm +${XGETTEXT} -o l-guile-prog.tmp --omit-header --no-location prog.scm test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-guile-prog.tmp > l-guile-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-guile-prog.ok" +cat <<EOF > l-guile-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -48,10 +48,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-guile-prog.ok l-guile-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-guile-fr.po" +cat <<\EOF > l-guile-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -73,22 +73,23 @@ msgid "~A is replaced by ~A." msgstr "~1@*~A remplace ~0@*~A." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-guile-fr.po.tmp l-guile-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-guile-fr.po.tmp l-guile-fr.po l-guile-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-guile-fr.po.tmp > l-guile-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-guile-fr.po l-guile-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-guile" +test -d l-guile || mkdir l-guile +test -d l-guile/fr || mkdir l-guile/fr +test -d l-guile/fr/LC_MESSAGES || mkdir l-guile/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-guile/fr/LC_MESSAGES/prog.mo l-guile-fr.po # Test for presence of guile version 1.7 or newer. (guile --version) >/dev/null 2>/dev/null \ @@ -126,14 +127,14 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out prog.err" +tmpfiles="$tmpfiles l-guile-prog.ok l-guile-prog.oku l-guile-prog.out l-guile-prog.err" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-guile-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-guile-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -142,14 +143,14 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR guile -s prog.scm 2 > prog.out 2>prog.err || { cat prog.err 1>&2; exit 1; } - grep -v '^;;;' prog.err 1>&2 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR guile -s prog.scm 2 > l-guile-prog.out 2>l-guile-prog.err || { cat l-guile-prog.err 1>&2; exit 1; } + grep -v '^;;;' l-guile-prog.err 1>&2 + ${DIFF} l-guile-prog.ok l-guile-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 guile -s prog.scm 2 > prog.out 2>prog.err || { cat prog.err 1>&2; exit 1; } - grep -v '^;;;' prog.err 1>&2 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 guile -s prog.scm 2 > l-guile-prog.out 2>l-guile-prog.err || { cat l-guile-prog.err 1>&2; exit 1; } + grep -v '^;;;' l-guile-prog.err 1>&2 + ${DIFF} l-guile-prog.oku l-guile-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-java b/gettext-tools/tests/lang-java index da9cd0e..ae9e7b0 100755 --- a/gettext-tools/tests/lang-java +++ b/gettext-tools/tests/lang-java @@ -62,20 +62,22 @@ cat <<\EOF >> Program.java } EOF -tmpfiles="$tmpfiles Program.class prog.err" +tmpfiles="$tmpfiles Program.class l-java l-java-prog.err" +test -d l-java || mkdir l-java + : ${JAVACOMP="/bin/sh ../javacomp.sh"} -CLASSPATH=../../gettext-runtime/intl-java/libintl.jar ${JAVACOMP} -d . Program.java 2>prog.err \ - || { cat prog.err 1>&2; exit 1; } +CLASSPATH=../../gettext-runtime/intl-java/libintl.jar ${JAVACOMP} -d l-java Program.java 2>l-java-prog.err \ + || { cat l-java-prog.err 1>&2; exit 1; } -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-java-prog.tmp l-java-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location Program.java +${XGETTEXT} -o l-java-prog.tmp --omit-header --no-location Program.java test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-java-prog.tmp > l-java-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-java-prog.ok" +cat <<EOF > l-java-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -103,10 +105,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-java-prog.ok l-java-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-java-fr.po" +cat <<\EOF > l-java-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -142,19 +144,19 @@ msgid "{0} is replaced by {1}." msgstr "Le nouveau {1} remplace le vieux {0}." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-java-fr.po.tmp l-java-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-java-fr.po.tmp l-java-fr.po l-java-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-java-fr.po.tmp > l-java-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-java-fr.po l-java-fr.po.new || exit 1 tmpfiles="$tmpfiles prog_fr.class" : ${MSGFMT=msgfmt} -${MSGFMT} -j -d . -r prog -l fr fr.po || exit 1 +${MSGFMT} -j -d l-java -r prog -l fr l-java-fr.po || exit 1 # Test which of the fr_FR locales are installed. : ${LOCALE_FR=fr_FR} @@ -184,16 +186,16 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-java-prog.ok l-java-prog.oku l-java-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-java-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. 2 morceaux de gateau succulent Le nouveau EUR remplace le vieux FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-java-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -205,12 +207,12 @@ EOF : ${LOCALE_FR_UTF8=fr_FR.UTF-8} : ${JAVAEXEC="/bin/sh ../javaexec.sh"} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 ISO-8859-1 > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=l-java:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 ISO-8859-1 > l-java-prog.out || exit 1 + ${DIFF} l-java-prog.ok l-java-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 UTF-8 > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 CLASSPATH=l-java:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 UTF-8 > l-java-prog.out || exit 1 + ${DIFF} l-java-prog.oku l-java-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-javascript b/gettext-tools/tests/lang-javascript index 13ea590..e6746d8 100755 --- a/gettext-tools/tests/lang-javascript +++ b/gettext-tools/tests/lang-javascript @@ -16,20 +16,20 @@ String.prototype.format = Format.format; const _ = Gettext.gettext; Gettext.textdomain ("prog"); -Gettext.bindtextdomain ("prog", "."); +Gettext.bindtextdomain ("prog", "l-javascript"); print(_("'Your command, please?', asked the waiter.")); print(_("%s is replaced by %s.").format("FF", "EUR")); EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-javascript-prog.tmp l-javascript-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.js +${XGETTEXT} -o l-javascript-prog.tmp --omit-header --no-location prog.js test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-javascript-prog.tmp > l-javascript-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-javascript-prog.ok" +cat <<EOF > l-javascript-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -39,10 +39,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-javascript-prog.ok l-javascript-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-javascript-fr.po" +cat <<\EOF > l-javascript-fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -55,22 +55,23 @@ msgid "%s is replaced by %s." msgstr "%s remplace %s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-javascript-fr.po.tmp l-javascript-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-javascript-fr.po.tmp l-javascript-fr.po l-javascript-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-javascript-fr.po.tmp > l-javascript-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-javascript-fr.po l-javascript-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-javascript" +test -d l-javascript || mkdir l-javascript +test -d l-javascript/fr || mkdir l-javascript/fr +test -d l-javascript/fr/LC_MESSAGES || mkdir l-javascript/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-javascript/fr/LC_MESSAGES/prog.mo l-javascript-fr.po # Test for presence of gjs. (gjs -h) >/dev/null 2>/dev/null @@ -105,13 +106,13 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-javascript-prog.ok l-javascript-prog.oku l-javascript-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-javascript-prog.ok Votre commande, s'il vous plait, dit le garon. FF remplace EUR. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-javascript-prog.oku «Votre commande, s'il vous plait», dit le garçon. FF remplace EUR. EOF @@ -119,12 +120,12 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR gjs prog.js > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR gjs prog.js > l-javascript-prog.out || exit 1 + ${DIFF} l-javascript-prog.ok l-javascript-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gjs prog.js > prog.out || exit 1 - ${DIFF} -u prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gjs prog.js > l-javascript-prog.out || exit 1 + ${DIFF} -u l-javascript-prog.oku l-javascript-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-librep b/gettext-tools/tests/lang-librep index ec58469..a03c5e1 100755 --- a/gettext-tools/tests/lang-librep +++ b/gettext-tools/tests/lang-librep @@ -12,7 +12,7 @@ cat <<\EOF > prog.jl (require 'rep.i18n.gettext) (textdomain "prog") -(bindtextdomain "prog" ".") +(bindtextdomain "prog" "l-librep") (format standard-output "%s\n" (_ "'Your command, please?', asked the waiter.")) @@ -20,15 +20,15 @@ cat <<\EOF > prog.jl (format nil (_ "%s is replaced by %s.") "FF" "EUR")) EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-librep-prog.tmp l-librep-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.jl +${XGETTEXT} -o l-librep-prog.tmp --omit-header --no-location prog.jl test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-librep-prog.tmp > l-librep-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-librep-prog.ok" +cat <<EOF > l-librep-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -38,10 +38,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-librep-prog.ok l-librep-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-librep-fr.po" +cat <<\EOF > l-librep-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -56,22 +56,23 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-librep-fr.po.tmp l-librep-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-librep-fr.po.tmp l-librep-fr.po l-librep-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-librep-fr.po.tmp > l-librep-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-librep-fr.po l-librep-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-librep" +test -d l-librep || mkdir l-librep +test -d l-librep/fr || mkdir l-librep/fr +test -d l-librep/fr/LC_MESSAGES || mkdir l-librep/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-librep/fr/LC_MESSAGES/prog.mo l-librep-fr.po # Test for presence of rep version 0.15.3 or newer. (rep --version) >/dev/null 2>/dev/null \ @@ -109,13 +110,13 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-librep-prog.ok l-librep-prog.oku l-librep-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-librep-prog.ok Votre commande, s'il vous plait, dit le garon. EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-librep-prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -123,12 +124,12 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR rep --no-rc --batch prog.jl > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR rep --no-rc --batch prog.jl > l-librep-prog.out || exit 1 + ${DIFF} l-librep-prog.ok l-librep-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 rep --no-rc --batch prog.jl > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 rep --no-rc --batch prog.jl > l-librep-prog.out || exit 1 + ${DIFF} l-librep-prog.oku l-librep-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-lua b/gettext-tools/tests/lang-lua index 31d1394..0064824 100755 --- a/gettext-tools/tests/lang-lua +++ b/gettext-tools/tests/lang-lua @@ -10,7 +10,7 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles prog.lua" cat <<\EOF > prog.lua require("gettext") -gettext.bindtextdomain("prog", ".") +gettext.bindtextdomain("prog", "l-lua") gettext.textdomain("prog") _ = gettext.gettext n = 42 @@ -20,15 +20,15 @@ print(string.format(gettext.ngettext('a piece of cake', [[%d pieces of cake]], n print(string.format(_[==[%s is replaced by %s.]==], "FF", "EUR")) EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-lua-prog.tmp l-lua-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.lua +${XGETTEXT} -o l-lua-prog.tmp --omit-header --no-location prog.lua test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-lua-prog.tmp > l-lua-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<\EOF > prog.ok +tmpfiles="$tmpfiles l-lua-prog.ok" +cat <<\EOF > l-lua-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -44,10 +44,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-lua-prog.ok l-lua-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-lua-fr.po" +cat <<\EOF > l-lua-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -67,22 +67,23 @@ msgid "%s is replaced by %s." msgstr "%s remplace %s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-lua-fr.po.tmp l-lua-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-lua-fr.po.tmp l-lua-fr.po l-lua-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-lua-fr.po.tmp > l-lua-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-lua-fr.po l-lua-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-lua" +test -d l-lua || mkdir l-lua +test -d l-lua/fr || mkdir l-lua/fr +test -d l-lua/fr/LC_MESSAGES || mkdir l-lua/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-lua/fr/LC_MESSAGES/prog.mo l-lua-fr.po # Test for presence of lua version 5.0 or newer with gettext support. (lua -v) >/dev/null 2>/dev/null @@ -125,14 +126,14 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-lua-prog.ok l-lua-prog.oku l-lua-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-lua-prog.ok Votre commande, s'il vous plait, dit le garon. 42 morceaux de gateau FF remplace EUR. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-lua-prog.oku «Votre commande, s'il vous plait», dit le garçon. 42 morceaux de gateau FF remplace EUR. @@ -141,12 +142,12 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR lua -l gettext prog.lua > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR lua -l gettext prog.lua > l-lua-prog.out || exit 1 + ${DIFF} l-lua-prog.ok l-lua-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 lua -l gettext prog.lua > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 lua -l gettext prog.lua > l-lua-prog.out || exit 1 + ${DIFF} l-lua-prog.oku l-lua-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-objc b/gettext-tools/tests/lang-objc index 502f22e..4c73225 100755 --- a/gettext-tools/tests/lang-objc +++ b/gettext-tools/tests/lang-objc @@ -8,7 +8,7 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 # Test whether an ObjectiveC compiler is found. -tmpfiles="$tmpfiles hello.m hello.${OBJEXT} hello${EXEEXT} hello.dSYM" +tmpfiles="$tmpfiles hello.m l-objc-hello.${OBJEXT} l-objc-hello${EXEEXT} l-objc-hello.dSYM" cat <<\EOF > hello.m #include <stdio.h> #include <stdlib.h> @@ -18,7 +18,7 @@ int main () exit (0); } EOF -${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o hello hello.m 2>/dev/null \ +${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-objc-hello hello.m 2>/dev/null \ || { echo "Skipping test: Objective C compiler not found" rm -fr $tmpfiles; exit 77 } @@ -43,7 +43,7 @@ int main (int argc, char *argv[]) exit (77); textdomain ("prog"); - bindtextdomain ("prog", "."); + bindtextdomain ("prog", "l-objc"); printf (_("'Your command, please?', asked the waiter.")); printf ("\n"); @@ -61,22 +61,22 @@ EOF # Variable needed by LTLIBINTL. top_builddir=.. -tmpfiles="$tmpfiles prog.${OBJEXT} prog${EXEEXT}" +tmpfiles="$tmpfiles l-objc-prog.${OBJEXT} l-objc-prog${EXEEXT}" # Put the -I flags before ${CFLAGS} ${CPPFLAGS}, to make sure that libintl.h # is found in the build directory, regardless of -I options present in # ${CFLAGS} or ${CPPFLAGS}. -${LIBTOOL} --quiet --mode=link ${CC} -I.. -I$top_srcdir/gnulib-lib ../gnulib-lib/libgettextlib.la -I../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o prog prog.m ${LTLIBINTL} \ +${LIBTOOL} --quiet --mode=link ${CC} -I.. -I$top_srcdir/gnulib-lib ../gnulib-lib/libgettextlib.la -I../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-objc-prog prog.m ${LTLIBINTL} \ || exit 1 -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-objc-prog.tmp l-objc-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.m +${XGETTEXT} -o l-objc-prog.tmp --omit-header --no-location -k_ prog.m test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-objc-prog.tmp > l-objc-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-objc-prog.ok" +cat <<EOF > l-objc-prog.ok #, c-format msgid "'Your command, please?', asked the waiter." msgstr "" @@ -93,10 +93,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-objc-prog.ok l-objc-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-objc-fr.po" +cat <<\EOF > l-objc-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -119,31 +119,32 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-objc-fr.po.tmp l-objc-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-objc-fr.po.tmp l-objc-fr.po l-objc-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-objc-fr.po.tmp > l-objc-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-objc-fr.po l-objc-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-objc" +test -d l-objc || mkdir l-objc +test -d l-objc/fr || mkdir l-objc/fr +test -d l-objc/fr/LC_MESSAGES || mkdir l-objc/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-objc/fr/LC_MESSAGES/prog.mo l-objc-fr.po -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-objc-prog.ok l-objc-prog.oku l-objc-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-objc-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-objc-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -152,17 +153,17 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= ./prog $LOCALE_FR 2 > prog.out + LANGUAGE= ./l-objc-prog $LOCALE_FR 2 > l-objc-prog.out case $? in - 0) ${DIFF} prog.ok prog.out || exit 1;; + 0) ${DIFF} l-objc-prog.ok l-objc-prog.out || exit 1;; 77) LOCALE_FR=none;; *) exit 1;; esac fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out + LANGUAGE= ./l-objc-prog $LOCALE_FR_UTF8 2 > l-objc-prog.out case $? in - 0) ${DIFF} prog.oku prog.out || exit 1;; + 0) ${DIFF} l-objc-prog.oku l-objc-prog.out || exit 1;; 77) LOCALE_FR_UTF8=none;; *) exit 1;; esac diff --git a/gettext-tools/tests/lang-pascal b/gettext-tools/tests/lang-pascal index 45896be..2b879fe 100755 --- a/gettext-tools/tests/lang-pascal +++ b/gettext-tools/tests/lang-pascal @@ -11,9 +11,9 @@ UTF8_LOCALE_UNSUPPORTED=yes tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles prog.pp" -cat <<\EOF > prog.pp -program prog; +tmpfiles="$tmpfiles pascalprog.pp" +cat <<\EOF > pascalprog.pp +program pascalprog; {$mode delphi} uses gettext, sysutils; @@ -23,82 +23,83 @@ resourcestring currencies = '%s is replaced by %s.'; begin - translateresourcestrings('%s/LC_MESSAGES/prog.mo'); + translateresourcestrings('l-pascal/%s/LC_MESSAGES/pascalprog.mo'); writeln(question); writeln(format(currencies, ['FF', 'EUR'])); end. EOF -tmpfiles="$tmpfiles prog.o prog.rst prog" -(ppc386 prog.pp) >/dev/null 2>&1 || -(ppcx64 prog.pp) >/dev/null 2>&1 || +tmpfiles="$tmpfiles pascalprog.o pascalprog.rst pascalprog" +(ppc386 pascalprog.pp) >/dev/null 2>&1 || +(ppcx64 pascalprog.pp) >/dev/null 2>&1 || { echo "Skipping test: Pascal compiler ppc386 or ppcx64 not found" rm -fr $tmpfiles; exit 77 } -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-pascal-pascalprog.tmp l-pascal-pascalprog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --add-location prog.rst +${XGETTEXT} -o l-pascal-pascalprog.tmp --omit-header --add-location pascalprog.rst test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-pascal-pascalprog.tmp > l-pascal-pascalprog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok -#: prog.question +tmpfiles="$tmpfiles l-pascal-pascalprog.ok" +cat <<EOF > l-pascal-pascalprog.ok +#: pascalprog.question msgid "'Your command, please?', asked the waiter." msgstr "" -#: prog.currencies +#: pascalprog.currencies #, object-pascal-format msgid "%s is replaced by %s." msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-pascal-pascalprog.ok l-pascal-pascalprog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-pascal-fr.po" +cat <<\EOF > l-pascal-fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" -#: prog.question +#: pascalprog.question msgid "'Your command, please?', asked the waiter." msgstr "Votre commande, s'il vous plait, dit le garon." # Reverse the arguments. -#: prog.currencies +#: pascalprog.currencies #, object-pascal-format msgid "%s is replaced by %s." msgstr "%1:s remplace %0:s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-pascal-fr.po.tmp l-pascal-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-pascal-fr.po.tmp l-pascal-fr.po l-pascal-pascalprog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-pascal-fr.po.tmp > l-pascal-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-pascal-fr.po l-pascal-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-pascal" +test -d l-pascal || mkdir l-pascal +test -d l-pascal/fr || mkdir l-pascal/fr +test -d l-pascal/fr/LC_MESSAGES || mkdir l-pascal/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-pascal/fr/LC_MESSAGES/pascalprog.mo l-pascal-fr.po -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-pascal-pascalprog.ok l-pascal-pascalprog.oku l-pascal-pascalprog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-pascal-pascalprog.ok Votre commande, s'il vous plait, dit le garon. EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-pascal-pascalprog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -106,15 +107,15 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR ./prog > prog.out || exit 1 + LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR ./pascalprog > l-pascal-pascalprog.out || exit 1 : ${DIFF=diff} - ${DIFF} prog.ok prog.out || exit 1 + ${DIFF} l-pascal-pascalprog.ok l-pascal-pascalprog.out || exit 1 fi if test -z "$UTF8_LOCALE_UNSUPPORTED"; then if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR_UTF8 ./prog > prog.out || exit 1 + LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR_UTF8 ./pascalprog > l-pascal-pascalprog.out || exit 1 : ${DIFF=diff} - ${DIFF} prog.oku prog.out || exit 1 + ${DIFF} l-pascal-pascalprog.oku l-pascal-pascalprog.out || exit 1 fi if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then diff --git a/gettext-tools/tests/lang-perl-1 b/gettext-tools/tests/lang-perl-1 index df89d88..91ede8a 100755 --- a/gettext-tools/tests/lang-perl-1 +++ b/gettext-tools/tests/lang-perl-1 @@ -8,13 +8,13 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles program.pl" -cat <<\EOF > program.pl +tmpfiles="$tmpfiles program1.pl" +cat <<\EOF > program1.pl use strict; use Locale::Messages qw (textdomain bindtextdomain gettext ngettext); textdomain "prog"; -bindtextdomain "prog", "./"; +bindtextdomain "prog", "./l-perl-1"; my $n = 2; print gettext "'Your command, please?', asked the waiter."; print "\n"; @@ -24,17 +24,17 @@ printf gettext "%s is replaced by %s.", "FF", "EUR"; print "\n"; EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-perl-1-prog.tmp l-perl-1-prog.pot" : ${XGETTEXT=xgettext} ${XGETTEXT} \ -k__ --flag=__:1:pass-perl-format --flag=__:1:pass-perl-brace-format \ - -o prog.tmp --omit-header --no-location program.pl + -o l-perl-1-prog.tmp --omit-header --no-location program1.pl test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-perl-1-prog.tmp > l-perl-1-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-perl-1-prog.ok" +cat <<EOF > l-perl-1-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -50,10 +50,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-perl-1-prog.ok l-perl-1-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-perl-1-fr.po" +cat <<\EOF > l-perl-1-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -75,31 +75,32 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-perl-1-fr.po.tmp l-perl-1-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-perl-1-fr.po.tmp l-perl-1-fr.po l-perl-1-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-perl-1-fr.po.tmp > l-perl-1-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-perl-1-fr.po l-perl-1-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-perl-1" +test -d l-perl-1 || mkdir l-perl-1 +test -d l-perl-1/fr || mkdir l-perl-1/fr +test -d l-perl-1/fr/LC_MESSAGES || mkdir l-perl-1/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-perl-1/fr/LC_MESSAGES/prog.mo l-perl-1-fr.po -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-perl-1-prog.ok l-perl-1-prog.oku l-perl-1-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-perl-1-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-perl-1-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -114,12 +115,12 @@ perl -e 'use Locale::Messages;' 2>/dev/null \ : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program1.pl > l-perl-1-prog.out || exit 1 + ${DIFF} l-perl-1-prog.ok l-perl-1-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program1.pl > l-perl-1-prog.out || exit 1 + ${DIFF} l-perl-1-prog.oku l-perl-1-prog.out || exit 1 fi if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then diff --git a/gettext-tools/tests/lang-perl-2 b/gettext-tools/tests/lang-perl-2 index 69e0c52..2e7b911 100755 --- a/gettext-tools/tests/lang-perl-2 +++ b/gettext-tools/tests/lang-perl-2 @@ -8,9 +8,9 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles program.pl" -cat <<\EOF > program.pl -use Locale::TextDomain (prog => './'); +tmpfiles="$tmpfiles program2.pl" +cat <<\EOF > program2.pl +use Locale::TextDomain (prog => './l-perl-2'); my $n = 2; print __"'Your command, please?', asked the waiter."; print "\n"; @@ -20,20 +20,20 @@ printf __x ("{old} is replaced by {new}.", old => "FF", new => "EUR"); print "\n"; EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-perl-2-prog.tmp l-perl-2-prog.pot" : ${XGETTEXT=xgettext} ${XGETTEXT} \ -k__ --flag=__:1:pass-perl-format --flag=__:1:pass-perl-brace-format \ -k__n:1,2 --flag=__n:1:pass-perl-format --flag=__n:1:pass-perl-brace-format \ --flag=__n:2:pass-perl-format --flag=__n:2:pass-perl-brace-format \ -k__x --flag=__x:1:perl-brace-format \ - -o prog.tmp --omit-header --no-location program.pl + -o l-perl-2-prog.tmp --omit-header --no-location program2.pl test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-perl-2-prog.tmp > l-perl-2-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-perl-2-prog.ok" +cat <<EOF > l-perl-2-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -49,10 +49,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-perl-2-prog.ok l-perl-2-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-perl-2-fr.po" +cat <<\EOF > l-perl-2-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -74,31 +74,32 @@ msgid "{old} is replaced by {new}." msgstr "{new} remplace {old}." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-perl-2-fr.po.tmp l-perl-2-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-perl-2-fr.po.tmp l-perl-2-fr.po l-perl-2-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-perl-2-fr.po.tmp > l-perl-2-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-perl-2-fr.po l-perl-2-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-perl-2" +test -d l-perl-2 || mkdir l-perl-2 +test -d l-perl-2/fr || mkdir l-perl-2/fr +test -d l-perl-2/fr/LC_MESSAGES || mkdir l-perl-2/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-perl-2/fr/LC_MESSAGES/prog.mo l-perl-2-fr.po -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-perl-2-prog.ok l-perl-2-prog.oku l-perl-2-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-perl-2-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-perl-2-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -113,12 +114,12 @@ perl -M'Locale::TextDomain' -e '' 2>/dev/null \ : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program2.pl > l-perl-2-prog.out || exit 1 + ${DIFF} l-perl-2-prog.ok l-perl-2-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program2.pl > l-perl-2-prog.out || exit 1 + ${DIFF} l-perl-2-prog.oku l-perl-2-prog.out || exit 1 fi if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then diff --git a/gettext-tools/tests/lang-php b/gettext-tools/tests/lang-php index 1bdea63..d745b7d 100755 --- a/gettext-tools/tests/lang-php +++ b/gettext-tools/tests/lang-php @@ -12,7 +12,7 @@ cat <<\EOF > prog.php <?php setlocale (LC_ALL, ""); textdomain ("prog"); - bindtextdomain ("prog", "."); + bindtextdomain ("prog", "l-php"); echo _("'Your command, please?', asked the waiter."); echo "\n"; printf(_("%s is replaced by %s."), "FF", "EUR"); @@ -20,15 +20,15 @@ cat <<\EOF > prog.php ?> EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-php-prog.tmp l-php-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.php +${XGETTEXT} -o l-php-prog.tmp --omit-header --no-location prog.php test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-php-prog.tmp > l-php-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-php-prog.ok" +cat <<EOF > l-php-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -38,10 +38,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-php-prog.ok l-php-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-php-fr.po" +cat <<\EOF > l-php-fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -54,22 +54,23 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-php-fr.po.tmp l-php-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-php-fr.po.tmp l-php-fr.po l-php-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-php-fr.po.tmp > l-php-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-php-fr.po l-php-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-php" +test -d l-php || mkdir l-php +test -d l-php/fr || mkdir l-php/fr +test -d l-php/fr/LC_MESSAGES || mkdir l-php/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-php/fr/LC_MESSAGES/prog.mo l-php-fr.po # Test for presence of php version 4.0 or newer with gettext support. (php -v) >/dev/null 2>/dev/null @@ -112,13 +113,13 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-php-prog.ok l-php-prog.oku l-php-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-php-prog.ok Votre commande, s'il vous plait, dit le garon. EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-php-prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -126,12 +127,12 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR php -q prog.php > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR php -q prog.php > l-php-prog.out || exit 1 + ${DIFF} l-php-prog.ok l-php-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 php -q prog.php > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 php -q prog.php > l-php-prog.out || exit 1 + ${DIFF} l-php-prog.oku l-php-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-po b/gettext-tools/tests/lang-po index 68c2197..772914b 100755 --- a/gettext-tools/tests/lang-po +++ b/gettext-tools/tests/lang-po @@ -23,20 +23,20 @@ msgid "%s is replaced by %s." msgstr "" EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-po-prog.tmp l-po-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --add-location prog-in.pot +${XGETTEXT} -o l-po-prog.tmp --omit-header --add-location prog-in.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-po-prog.tmp > l-po-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} prog-in.pot prog.pot || exit 1 +${DIFF} prog-in.pot l-po-prog.pot || exit 1 # Test with PO format. -tmpfiles="$tmpfiles prog-in.po" -cat <<\EOF > prog-in.po +tmpfiles="$tmpfiles l-po-prog-in.po" +cat <<\EOF > l-po-prog-in.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -58,15 +58,15 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles prog.tmp.po prog.po" +tmpfiles="$tmpfiles l-po-prog.tmp.po l-po-prog.po" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp.po --omit-header --add-location prog-in.po +${XGETTEXT} -o l-po-prog.tmp.po --omit-header --add-location l-po-prog-in.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp.po > prog.po +LC_ALL=C tr -d '\r' < l-po-prog.tmp.po > l-po-prog.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} prog-in.po prog.po || exit 1 +${DIFF} l-po-prog-in.po l-po-prog.po || exit 1 rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-python-1 b/gettext-tools/tests/lang-python-1 index 2c49743..141115d 100755 --- a/gettext-tools/tests/lang-python-1 +++ b/gettext-tools/tests/lang-python-1 @@ -9,27 +9,27 @@ UTF8_LOCALE_UNSUPPORTED=yes tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles prog.py" -cat <<\EOF > prog.py +tmpfiles="$tmpfiles prog1.py" +cat <<\EOF > prog1.py import gettext gettext.textdomain('prog') -gettext.bindtextdomain('prog', '.') +gettext.bindtextdomain('prog', 'l-python-1') print gettext.gettext("'Your command, please?', asked the waiter.") print gettext.gettext("%(oldCurrency)s is replaced by %(newCurrency)s.") \ % { 'oldCurrency': "FF", 'newCurrency' : "EUR" } EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-python-1-prog.tmp l-python-1-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.py +${XGETTEXT} -o l-python-1-prog.tmp --omit-header --no-location prog1.py test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-python-1-prog.tmp > l-python-1-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-python-1-prog.ok" +cat <<EOF > l-python-1-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -39,10 +39,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-python-1-prog.ok l-python-1-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-python-1-fr.po" +cat <<\EOF > l-python-1-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -57,22 +57,23 @@ msgid "%(oldCurrency)s is replaced by %(newCurrency)s." msgstr "%(newCurrency)s remplace %(oldCurrency)s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-python-1-fr.po.tmp l-python-1-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-python-1-fr.po.tmp l-python-1-fr.po l-python-1-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-python-1-fr.po.tmp > l-python-1-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-python-1-fr.po l-python-1-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-python-1" +test -d l-python-1 || mkdir l-python-1 +test -d l-python-1/fr || mkdir l-python-1/fr +test -d l-python-1/fr/LC_MESSAGES || mkdir l-python-1/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-python-1/fr/LC_MESSAGES/prog.mo l-python-1-fr.po # Test for presence of python version 2.0 or newer. (python -V) >/dev/null 2>/dev/null \ @@ -82,13 +83,13 @@ case `python -c 'import sys; print sys.hexversion >= 0x20000F0'` in *) echo "Skipping test: python version too old"; rm -fr $tmpfiles; exit 77;; esac -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-python-1-prog.ok l-python-1-prog.oku l-python-1-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-python-1-prog.ok Votre commande, s'il vous plait, dit le garon. EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-python-1-prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -96,13 +97,13 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR python prog.py > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR python prog1.py > l-python-1-prog.out || exit 1 + ${DIFF} l-python-1-prog.ok l-python-1-prog.out || exit 1 fi if test -z "$UTF8_LOCALE_UNSUPPORTED"; then if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog1.py > l-python-1-prog.out || exit 1 + ${DIFF} l-python-1-prog.oku l-python-1-prog.out || exit 1 fi if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then diff --git a/gettext-tools/tests/lang-python-2 b/gettext-tools/tests/lang-python-2 index b738337..3a2fa8f 100755 --- a/gettext-tools/tests/lang-python-2 +++ b/gettext-tools/tests/lang-python-2 @@ -10,15 +10,15 @@ UTF8_LOCALE_UNSUPPORTED=yes tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles prog.py" -cat <<\EOF > prog.py +tmpfiles="$tmpfiles prog2.py" +cat <<\EOF > prog2.py import sys import gettext n = int(sys.argv[1]) gettext.textdomain('prog') -gettext.bindtextdomain('prog', '.') +gettext.bindtextdomain('prog', 'l-python-2') print gettext.gettext("'Your command, please?', asked the waiter.") print gettext.ngettext("a piece of cake","%(count)d pieces of cake",n) \ @@ -27,15 +27,15 @@ print gettext.gettext("%(oldCurrency)s is replaced by %(newCurrency)s.") \ % { 'oldCurrency': "FF", 'newCurrency' : "EUR" } EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-python-2-prog.tmp l-python-2-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.py +${XGETTEXT} -o l-python-2-prog.tmp --omit-header --no-location prog2.py test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-python-2-prog.tmp > l-python-2-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-python-2-prog.ok" +cat <<EOF > l-python-2-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -51,10 +51,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-python-2-prog.ok l-python-2-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-python-2-fr.po" +cat <<\EOF > l-python-2-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -76,22 +76,23 @@ msgid "%(oldCurrency)s is replaced by %(newCurrency)s." msgstr "%(newCurrency)s remplace %(oldCurrency)s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-python-2-fr.po.tmp l-python-2-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-python-2-fr.po.tmp l-python-2-fr.po l-python-2-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-python-2-fr.po.tmp > l-python-2-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-python-2-fr.po l-python-2-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-python-2" +test -d l-python-2 || mkdir l-python-2 +test -d l-python-2/fr || mkdir l-python-2/fr +test -d l-python-2/fr/LC_MESSAGES || mkdir l-python-2/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-python-2/fr/LC_MESSAGES/prog.mo l-python-2-fr.po # Test for presence of python version 2.3 or newer. (python -V) >/dev/null 2>/dev/null \ @@ -101,14 +102,14 @@ case `python -c 'import sys; print sys.hexversion >= 0x20300F0'` in *) echo "Skipping test: python version too old"; rm -fr $tmpfiles; exit 77;; esac -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-python-2-prog.ok l-python-2-prog.oku l-python-2-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-python-2-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-python-2-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -117,13 +118,13 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR python prog.py 2 > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR python prog2.py 2 > l-python-2-prog.out || exit 1 + ${DIFF} l-python-2-prog.ok l-python-2-prog.out || exit 1 fi if test -z "$UTF8_LOCALE_UNSUPPORTED"; then if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py 2 > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog2.py 2 > l-python-2-prog.out || exit 1 + ${DIFF} l-python-2-prog.oku l-python-2-prog.out || exit 1 fi if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then diff --git a/gettext-tools/tests/lang-rst b/gettext-tools/tests/lang-rst index ce6a16e..36b0768 100755 --- a/gettext-tools/tests/lang-rst +++ b/gettext-tools/tests/lang-rst @@ -22,15 +22,15 @@ rstconv.NoOutFilename='No output filename specified' rstconv.InvalidOutputFormat='Invalid output format -' EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-rst-prog.tmp l-rst-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --add-location prog.rst +${XGETTEXT} -o l-rst-prog.tmp --omit-header --add-location prog.rst test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-rst-prog.tmp > l-rst-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-rst-prog.ok" +cat <<EOF > l-rst-prog.ok #: rstconv.help msgid "" "rstconv [-h|--help] Displays this help\n" @@ -61,19 +61,19 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-rst-prog.ok l-rst-prog.pot || exit 1 # The output of rstconv is slightly different: # - ModuleName:ConstName instead of ModuleName.ConstName # - no line wrapping in fpc versions < 2.6.0 # - extra newline at the end -tmpfiles="$tmpfiles prog.pot" +tmpfiles="$tmpfiles l-rst-prog.pot" : ${RSTCONV=rstconv} -if (${RSTCONV} -o prog.pot -i prog.rst) >/dev/null 2>&1; then +if (${RSTCONV} -o l-rst-prog.pot -i prog.rst) >/dev/null 2>&1; then -tmpfiles="$tmpfiles prog.ok1" -cat <<EOF > prog.ok1 +tmpfiles="$tmpfiles l-rst-prog.ok1" +cat <<EOF > l-rst-prog.ok1 #: rstconv:help msgid "rstconv [-h|--help] Displays this help\nrstconv options Convert rst file\n\nOptions are:\n -i file Use specified file instead of stdin as input .rst (OPTIONAL)\n -o file Write output to specified file (REQUIRED)\n -f format Specifies the output format:\n po GNU gettext .po (portable) format (DEFAULT)\n" msgstr "" @@ -96,8 +96,8 @@ msgstr "" EOF -tmpfiles="$tmpfiles prog.ok2" -cat <<EOF > prog.ok2 +tmpfiles="$tmpfiles l-rst-prog.ok2" +cat <<EOF > l-rst-prog.ok2 #: rstconv:help msgid "" "rstconv [-h|--help] Displays this help\n" @@ -129,7 +129,7 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok1 prog.pot >/dev/null || ${DIFF} prog.ok2 prog.pot || exit 1 +${DIFF} l-rst-prog.ok1 l-rst-prog.pot >/dev/null || ${DIFF} l-rst-prog.ok2 l-rst-prog.pot || exit 1 fi diff --git a/gettext-tools/tests/lang-sh b/gettext-tools/tests/lang-sh index 639123a..8d18556 100755 --- a/gettext-tools/tests/lang-sh +++ b/gettext-tools/tests/lang-sh @@ -20,7 +20,7 @@ n=$1 TEXTDOMAIN=prog export TEXTDOMAIN -TEXTDOMAINDIR=. +TEXTDOMAINDIR=l-sh export TEXTDOMAINDIR $echo "`gettext \"'Your command, please?', asked the waiter.\"`" @@ -28,15 +28,15 @@ $echo "`gettext \"'Your command, please?', asked the waiter.\"`" $echo "`eval_ngettext \"a piece of cake\" \"\\$n pieces of cake\" $n`" EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-sh-prog.tmp l-sh-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.sh +${XGETTEXT} -o l-sh-prog.tmp --omit-header --no-location prog.sh test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-sh-prog.tmp > l-sh-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<\EOF > prog.ok +tmpfiles="$tmpfiles l-sh-prog.ok" +cat <<\EOF > l-sh-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -48,10 +48,10 @@ msgstr[1] "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-sh-prog.ok l-sh-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-sh-fr.po" +cat <<\EOF > l-sh-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -68,22 +68,23 @@ msgstr[0] "un morceau de gateau" msgstr[1] "$n morceaux de gateau" EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-sh-fr.po.tmp l-sh-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-sh-fr.po.tmp l-sh-fr.po l-sh-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-sh-fr.po.tmp > l-sh-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-sh-fr.po l-sh-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-sh" +test -d l-sh || mkdir l-sh +test -d l-sh/fr || mkdir l-sh/fr +test -d l-sh/fr/LC_MESSAGES || mkdir l-sh/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-sh/fr/LC_MESSAGES/prog.mo l-sh-fr.po # Test which of the fr_FR locales are installed. : ${LOCALE_FR=fr_FR} @@ -113,13 +114,13 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then rm -fr $tmpfiles; exit 77 fi -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-sh-prog.ok l-sh-prog.oku l-sh-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-sh-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-sh-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EOF @@ -127,12 +128,12 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR sh ./prog.sh 2 > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR sh ./prog.sh 2 > l-sh-prog.out || exit 1 + ${DIFF} l-sh-prog.ok l-sh-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 sh ./prog.sh 2 > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 sh ./prog.sh 2 > l-sh-prog.out || exit 1 + ${DIFF} l-sh-prog.oku l-sh-prog.out || exit 1 fi rm -fr $tmpfiles diff --git a/gettext-tools/tests/lang-smalltalk b/gettext-tools/tests/lang-smalltalk index e114239..596ad17 100755 --- a/gettext-tools/tests/lang-smalltalk +++ b/gettext-tools/tests/lang-smalltalk @@ -15,12 +15,12 @@ Object subclass: #Main instanceVariableNames: '' classVariableNames: 'NLS' poolDictionaries: '' - category: 'Program' + category: 'L-Smalltalk-Program' ! !Main methodsFor: 'running'! run | n | - NLS := I18N Locale default messages domain: 'prog' localeDirectory: '.'. + NLS := I18N Locale default messages domain: 'prog' localeDirectory: 'l-smalltalk'. n := 2. Transcript showCr: (NLS ? '''Your command, please?'', asked the waiter.'). @@ -33,15 +33,15 @@ run Main new run! EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-smalltalk-prog.tmp l-smalltalk-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.st +${XGETTEXT} -o l-smalltalk-prog.tmp --omit-header --no-location prog.st test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-smalltalk-prog.tmp > l-smalltalk-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-smalltalk-prog.ok" +cat <<EOF > l-smalltalk-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -57,10 +57,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-smalltalk-prog.ok l-smalltalk-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-smalltalk-fr.po" +cat <<\EOF > l-smalltalk-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -82,22 +82,23 @@ msgid "%1 is replaced by %2." msgstr "%2 remplace %1." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-smalltalk-fr.po.tmp l-smalltalk-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-smalltalk-fr.po.tmp l-smalltalk-fr.po l-smalltalk-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-smalltalk-fr.po.tmp > l-smalltalk-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-smalltalk-fr.po l-smalltalk-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles l-smalltalk" +test -d l-smalltalk || mkdir l-smalltalk +test -d l-smalltalk/fr || mkdir l-smalltalk/fr +test -d l-smalltalk/fr/LC_MESSAGES || mkdir l-smalltalk/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po +${MSGFMT} -o l-smalltalk/fr/LC_MESSAGES/prog.mo l-smalltalk-fr.po # Test for presence of gst version 2.0.6 or newer. (gst --version) >/dev/null 2>/dev/null \ @@ -107,41 +108,41 @@ case `gst --version | sed -n -e 1p | sed -e 's/^[^0-9]*//'` in echo "Skipping test: gst version too old"; rm -fr $tmpfiles; exit 77;; esac -tmpfiles="$tmpfiles prog.ok prog.oku prog.ok2 prog.oku2 prog.out" +tmpfiles="$tmpfiles l-smalltalk-prog.ok l-smalltalk-prog.oku l-smalltalk-prog.ok2 l-smalltalk-prog.oku2 l-smalltalk-prog.ok3 l-smalltalk-prog.oku3 l-smalltalk-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-smalltalk-prog.ok Votre commande, s'il vous plait, dit le garon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-smalltalk-prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF # gst versions older than 2.3 also print "Loading package I18N". -{ echo 'Loading package I18N'; cat prog.ok; } > prog.ok2 -{ echo 'Loading package I18N'; cat prog.oku; } > prog.oku2 +{ echo 'Loading package I18N'; cat l-smalltalk-prog.ok; } > l-smalltalk-prog.ok2 +{ echo 'Loading package I18N'; cat l-smalltalk-prog.oku; } > l-smalltalk-prog.oku2 # gst version 3.0.3 also prints "Loading package Iconv" and # "Loading package I18N". -{ echo 'Loading package Iconv'; echo 'Loading package I18N'; cat prog.ok; } > prog.ok3 -{ echo 'Loading package Iconv'; echo 'Loading package I18N'; cat prog.oku; } > prog.oku3 +{ echo 'Loading package Iconv'; echo 'Loading package I18N'; cat l-smalltalk-prog.ok; } > l-smalltalk-prog.ok3 +{ echo 'Loading package Iconv'; echo 'Loading package I18N'; cat l-smalltalk-prog.oku; } > l-smalltalk-prog.oku3 : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR gst -Q prog.st > prog.out || exit 1 - ${DIFF} prog.ok prog.out > /dev/null || - ${DIFF} prog.ok2 prog.out > /dev/null || - ${DIFF} prog.ok3 prog.out > /dev/null || - { ${DIFF} prog.ok prog.out; exit 1; } + LANGUAGE= LC_ALL=$LOCALE_FR gst -Q prog.st > l-smalltalk-prog.out || exit 1 + ${DIFF} l-smalltalk-prog.ok l-smalltalk-prog.out > /dev/null || + ${DIFF} l-smalltalk-prog.ok2 l-smalltalk-prog.out > /dev/null || + ${DIFF} l-smalltalk-prog.ok3 l-smalltalk-prog.out > /dev/null || + { ${DIFF} l-smalltalk-prog.ok l-smalltalk-prog.out; exit 1; } fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gst -Q prog.st > prog.out || exit 1 - ${DIFF} prog.oku prog.out > /dev/null || - ${DIFF} prog.oku2 prog.out > /dev/null || - ${DIFF} prog.oku3 prog.out > /dev/null || - { ${DIFF} prog.oku prog.out; exit 1; } + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gst -Q prog.st > l-smalltalk-prog.out || exit 1 + ${DIFF} l-smalltalk-prog.oku l-smalltalk-prog.out > /dev/null || + ${DIFF} l-smalltalk-prog.oku2 l-smalltalk-prog.out > /dev/null || + ${DIFF} l-smalltalk-prog.oku3 l-smalltalk-prog.out > /dev/null || + { ${DIFF} l-smalltalk-prog.oku l-smalltalk-prog.out; exit 1; } fi if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then diff --git a/gettext-tools/tests/lang-tcl b/gettext-tools/tests/lang-tcl index 92fda29..2405720 100755 --- a/gettext-tools/tests/lang-tcl +++ b/gettext-tools/tests/lang-tcl @@ -18,21 +18,21 @@ tmpfiles="$tmpfiles program.tcl" cat <<\EOF > program.tcl #!/usr/bin/env tclsh package require msgcat -::msgcat::mcload [file join [file dirname [info script]] msgs] +::msgcat::mcload [file join [file dirname [info script]] l-tcl msgs] proc _ {s} {return [::msgcat::mc $s]} puts [_ "'Your command, please?', asked the waiter."] puts [format [::msgcat::mc "%s is replaced by %s."] "FF" "EUR"] EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-tcl-prog.tmp l-tcl-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header -k_ program.tcl +${XGETTEXT} -o l-tcl-prog.tmp --omit-header -k_ program.tcl test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-tcl-prog.tmp > l-tcl-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-tcl-prog.ok" +cat <<EOF > l-tcl-prog.ok #: program.tcl:5 msgid "'Your command, please?', asked the waiter." msgstr "" @@ -44,10 +44,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-tcl-prog.ok l-tcl-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-tcl-fr.po" +cat <<\EOF > l-tcl-fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -62,40 +62,41 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-tcl-fr.po.tmp l-tcl-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-tcl-fr.po.tmp l-tcl-fr.po l-tcl-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-tcl-fr.po.tmp > l-tcl-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-tcl-fr.po l-tcl-fr.po.new || exit 1 -tmpfiles="$tmpfiles msgs" -test -d msgs || mkdir msgs +tmpfiles="$tmpfiles l-tcl" +test -d l-tcl || mkdir l-tcl +test -d l-tcl/msgs || mkdir l-tcl/msgs : ${MSGFMT=msgfmt} -${MSGFMT} --tcl -d msgs -l fr fr.po || exit 1 +${MSGFMT} --tcl -d l-tcl/msgs -l fr l-tcl-fr.po || exit 1 # Test for presence of tclsh with msgcat extension. -tmpfiles="$tmpfiles version.tcl" -cat <<\EOF > version.tcl +tmpfiles="$tmpfiles l-tcl-version.tcl" +cat <<\EOF > l-tcl-version.tcl package require msgcat puts $tcl_version EOF -(tclsh version.tcl) >/dev/null 2>/dev/null \ +(tclsh l-tcl-version.tcl) >/dev/null 2>/dev/null \ || { echo "Skipping test: tclsh not found or msgcat extension not present" rm -fr $tmpfiles; exit 77 } -tmpfiles="$tmpfiles prog.ok prog.oku prog.out" +tmpfiles="$tmpfiles l-tcl-prog.ok l-tcl-prog.oku l-tcl-prog.out" : ${DIFF=diff} -cat <<\EOF > prog.ok +cat <<\EOF > l-tcl-prog.ok Votre commande, s'il vous plait, dit le garon. EUR remplace FF. EOF -cat <<\EOF > prog.oku +cat <<\EOF > l-tcl-prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -103,14 +104,14 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= tclsh program.tcl > prog.tmp || exit 1 - LC_ALL=C tr -d '\r' < prog.tmp > prog.out || exit 1 - ${DIFF} prog.ok prog.out || exit 1 + LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= tclsh program.tcl > l-tcl-prog.tmp || exit 1 + LC_ALL=C tr -d '\r' < l-tcl-prog.tmp > l-tcl-prog.out || exit 1 + ${DIFF} l-tcl-prog.ok l-tcl-prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= tclsh program.tcl > prog.tmp || exit 1 - LC_ALL=C tr -d '\r' < prog.tmp > prog.out || exit 1 - ${DIFF} prog.oku prog.out || exit 1 + LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= tclsh program.tcl > l-tcl-prog.tmp || exit 1 + LC_ALL=C tr -d '\r' < l-tcl-prog.tmp > l-tcl-prog.out || exit 1 + ${DIFF} l-tcl-prog.oku l-tcl-prog.out || exit 1 fi if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then if test -f /usr/bin/localedef; then diff --git a/gettext-tools/tests/lang-ycp b/gettext-tools/tests/lang-ycp index c01c045..4ae5e46 100755 --- a/gettext-tools/tests/lang-ycp +++ b/gettext-tools/tests/lang-ycp @@ -16,15 +16,15 @@ cat <<\EOF > prog.ycp } EOF -tmpfiles="$tmpfiles prog.tmp prog.pot" +tmpfiles="$tmpfiles l-ycp-prog.tmp l-ycp-prog.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o prog.tmp --omit-header --no-location prog.ycp +${XGETTEXT} -o l-ycp-prog.tmp --omit-header --no-location prog.ycp test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < prog.tmp > prog.pot +LC_ALL=C tr -d '\r' < l-ycp-prog.tmp > l-ycp-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles prog.ok" -cat <<EOF > prog.ok +tmpfiles="$tmpfiles l-ycp-prog.ok" +cat <<EOF > l-ycp-prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -40,10 +40,10 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} prog.ok prog.pot || exit 1 +${DIFF} l-ycp-prog.ok l-ycp-prog.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles l-ycp-fr.po" +cat <<\EOF > l-ycp-fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -65,15 +65,15 @@ msgid "%1 is replaced by %2." msgstr "%2 remplace %1." EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles l-ycp-fr.po.tmp l-ycp-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot +${MSGMERGE} -q -o l-ycp-fr.po.tmp l-ycp-fr.po l-ycp-prog.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < l-ycp-fr.po.tmp > l-ycp-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} l-ycp-fr.po l-ycp-fr.po.new || exit 1 rm -fr $tmpfiles diff --git a/gettext-tools/tests/msgfmt-1 b/gettext-tools/tests/msgfmt-1 index bd2da31..5861b83 100755 --- a/gettext-tools/tests/msgfmt-1 +++ b/gettext-tools/tests/msgfmt-1 @@ -5,11 +5,12 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles LC_MESSAGES" -test -d LC_MESSAGES || mkdir LC_MESSAGES +tmpfiles="$tmpfiles mf-1" +test -d mf-1 || mkdir mf-1 +test -d mf-1/LC_MESSAGES || mkdir mf-1/LC_MESSAGES -tmpfiles="$tmpfiles module1.po module2.po" -cat <<EOF > module1.po +-tmpfiles="$tmpfiles mf-1-module1.po mf-1-module2.po" +cat <<EOF > mf-1-module1.po #default domain "messages.mo" msgid "SYS_(C)\n" msgstr "MSGFMT(3) portable message object file compiler\n" @@ -27,7 +28,7 @@ msgid "error 3" msgstr "error 3 translation" EOF -cat <<EOF > module2.po +cat <<EOF > mf-1-module2.po # --- #default domain "messages.mo" msgid "mesg 4" @@ -46,22 +47,22 @@ EOF # Without use of msgcat, expect a "duplicate message definition" error. : ${MSGFMT=msgfmt} -if ${MSGFMT} -o LC_MESSAGES/gen.mo module1.po module2.po 2> /dev/null; then +if ${MSGFMT} -o mf-1/LC_MESSAGES/gen.mo mf-1-module1.po mf-1-module2.po 2> /dev/null; then rm -fr $tmpfiles exit 1 fi # With msgcat, it should work. -tmpfiles="$tmpfiles modules.po" +tmpfiles="$tmpfiles mf-1-modules.po" : ${MSGCAT=msgcat} ${MSGFMT=msgfmt} -${MSGCAT} --use-first -o modules.po module1.po module2.po +${MSGCAT} --use-first -o mf-1-modules.po mf-1-module1.po mf-1-module2.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } -${MSGFMT} -o LC_MESSAGES/gen.mo modules.po +${MSGFMT} -o mf-1/LC_MESSAGES/gen.mo mf-1-modules.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles mf-test1.out" : ${GETTEXT=gettext} -TEXTDOMAINDIR=.. LANGUAGE=tests \ +TEXTDOMAINDIR=. LANGUAGE=mf-1 \ ${GETTEXT} --env LC_ALL=en gen 'SYS_(C) ' | LC_ALL=C tr -d '\r' > mf-test1.out diff --git a/gettext-tools/tests/msgfmt-17 b/gettext-tools/tests/msgfmt-17 index 5ff20b5..b077030 100755 --- a/gettext-tools/tests/msgfmt-17 +++ b/gettext-tools/tests/msgfmt-17 @@ -11,8 +11,8 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 # 3 - lack %d for value 1 - error # 4 - lack %d for value 1 but limited range such that multiple n - error -tmpfiles="$tmpfiles mf-15.po1" -cat <<\EOF > mf-15.po1 +tmpfiles="$tmpfiles mf-17.po1" +cat <<\EOF > mf-17.po1 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -39,11 +39,11 @@ msgstr[2] "час и %(number)s четвертей" EOF : ${MSGFMT=msgfmt} -${MSGFMT} --check -o /dev/null mf-15.po1 2>/dev/null +${MSGFMT} --check -o /dev/null mf-17.po1 2>/dev/null test $? = 1 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles mf-15.po2" -cat <<\EOF > mf-15.po2 +tmpfiles="$tmpfiles mf-17.po2" +cat <<\EOF > mf-17.po2 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -70,11 +70,11 @@ msgstr[2] "час и %(number)s четвертей" EOF : ${MSGFMT=msgfmt} -${MSGFMT} --check -o /dev/null mf-15.po2 +${MSGFMT} --check -o /dev/null mf-17.po2 test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles mf-15.po3" -cat <<\EOF > mf-15.po3 +tmpfiles="$tmpfiles mf-17.po3" +cat <<\EOF > mf-17.po3 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -101,11 +101,11 @@ msgstr[2] "час и %(number)s четвертей" EOF : ${MSGFMT=msgfmt} -${MSGFMT} --check -o /dev/null mf-15.po3 2>/dev/null +${MSGFMT} --check -o /dev/null mf-17.po3 2>/dev/null test $? = 1 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles mf-15.po4" -cat <<\EOF > mf-15.po4 +tmpfiles="$tmpfiles mf-17.po4" +cat <<\EOF > mf-17.po4 # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. @@ -132,7 +132,7 @@ msgstr[2] "час и %(number)s четвертей" EOF : ${MSGFMT=msgfmt} -${MSGFMT} --check -o /dev/null mf-15.po4 2>/dev/null +${MSGFMT} --check -o /dev/null mf-17.po4 2>/dev/null test $? = 1 || { rm -fr $tmpfiles; exit 1; } rm -fr $tmpfiles diff --git a/gettext-tools/tests/msgfmt-2 b/gettext-tools/tests/msgfmt-2 index a5b6202..743ab08 100755 --- a/gettext-tools/tests/msgfmt-2 +++ b/gettext-tools/tests/msgfmt-2 @@ -17,11 +17,12 @@ fi tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles LC_MESSAGES" -test -d LC_MESSAGES || mkdir LC_MESSAGES +tmpfiles="$tmpfiles mf-2" +test -d mf-2 || mkdir mf-2 +test -d mf-2/LC_MESSAGES || mkdir mf-2/LC_MESSAGES -tmpfiles="$tmpfiles module1.po module2.po" -cat <<EOF > module1.po +tmpfiles="$tmpfiles mf-2-module1.po mf-2-module2.po" +cat <<EOF > mf-2-module1.po #default domain "messages.mo" msgid "SYS_(C)\n" msgstr "MSGFMT(3) portable message object file compiler\n" @@ -39,7 +40,7 @@ msgid "error 3" msgstr "error 3 translation" EOF -cat <<EOF > module2.po +cat <<EOF > mf-2-module2.po # --- #default domain "messages.mo" msgid "mesg 4" @@ -58,22 +59,22 @@ EOF # Without use of msgcat, expect a "duplicate message definition" error. : ${MSGFMT=msgfmt} -if ${MSGFMT} -o LC_MESSAGES/gen.mo module1.po module2.po 2> /dev/null; then +if ${MSGFMT} -o mf-2/LC_MESSAGES/gen.mo mf-2-module1.po mf-2-module2.po 2> /dev/null; then rm -fr $tmpfiles exit 1 fi # With msgcat, it should work. -tmpfiles="$tmpfiles modules.po" +tmpfiles="$tmpfiles mf-2-modules.po" : ${MSGCAT=msgcat} ${MSGFMT=msgfmt} -${MSGCAT} --use-first -o modules.po module1.po module2.po +${MSGCAT} --use-first -o mf-2-modules.po mf-2-module1.po mf-2-module2.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } -${MSGFMT} -o LC_MESSAGES/gen.mo modules.po +${MSGFMT} -o mf-2/LC_MESSAGES/gen.mo mf-2-modules.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles mf-test2.out" : ${GETTEXT=gettext} -TEXTDOMAINDIR=.. LANGUAGE=tests \ +TEXTDOMAINDIR=. LANGUAGE=mf-2 \ ${GETTEXT} --env LC_ALL=en gen 'error 3' > mf-test2.out tmpfiles="$tmpfiles gtmf-test2.ok" diff --git a/gettext-tools/tests/msgfmt-properties-1 b/gettext-tools/tests/msgfmt-properties-1 index 22d899f..fad593b 100755 --- a/gettext-tools/tests/msgfmt-properties-1 +++ b/gettext-tools/tests/msgfmt-properties-1 @@ -5,8 +5,9 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles LC_MESSAGES" -test -d LC_MESSAGES || mkdir LC_MESSAGES +tmpfiles="$tmpfiles mf-p-1" +test -d mf-p-1 || mkdir mf-p-1 +test -d mf-p-1/LC_MESSAGES || mkdir mf-p-1/LC_MESSAGES tmpfiles="$tmpfiles mf-p-1-1.properties mf-p-1-2.properties" cat <<\EOF > mf-p-1-1.properties @@ -26,7 +27,7 @@ EOF # Without use of msgcat, expect a "duplicate message definition" error. : ${MSGFMT=msgfmt} -if ${MSGFMT} --properties-input -o LC_MESSAGES/gen.mo mf-p-1-1.properties mf-p-1-2.properties 2> /dev/null; then +if ${MSGFMT} --properties-input -o mf-p-1/LC_MESSAGES/gen.mo mf-p-1-1.properties mf-p-1-2.properties 2> /dev/null; then rm -fr $tmpfiles exit 1 fi @@ -36,24 +37,24 @@ tmpfiles="$tmpfiles mf-p-1-s.properties" : ${MSGCAT=msgcat} ${MSGFMT=msgfmt} ${MSGCAT} --properties-input --properties-output --use-first -o mf-p-1-s.properties mf-p-1-1.properties mf-p-1-2.properties test $? = 0 || { rm -fr $tmpfiles; exit 1; } -${MSGFMT} --properties-input -o LC_MESSAGES/gen.mo mf-p-1-s.properties +${MSGFMT} --properties-input -o mf-p-1/LC_MESSAGES/gen.mo mf-p-1-s.properties test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles mf-test1.out" +tmpfiles="$tmpfiles mf-p-test1.out" : ${GETTEXT=gettext} -TEXTDOMAINDIR=.. LANGUAGE=tests \ +TEXTDOMAINDIR=. LANGUAGE=mf-p-1 \ ${GETTEXT} --env LC_ALL=en gen 'SYS_(C) -' | LC_ALL=C tr -d '\r' > mf-test1.out +' | LC_ALL=C tr -d '\r' > mf-p-test1.out -tmpfiles="$tmpfiles gtmf-test1.ok" -cat <<EOF > gtmf-test1.ok +tmpfiles="$tmpfiles gtmf-p-test1.ok" +cat <<EOF > gtmf-p-test1.ok MSGFMT(3) portable message object file compiler Copyright (C) 1995 Free Software Foundation Report bugs to <bug-gnu-utils@gnu.org> EOF : ${DIFF=diff} -${DIFF} gtmf-test1.ok mf-test1.out +${DIFF} gtmf-p-test1.ok mf-p-test1.out result=$? rm -fr $tmpfiles diff --git a/gettext-tools/tests/msgunfmt-csharp-1 b/gettext-tools/tests/msgunfmt-csharp-1 index 8f94838..5061700 100755 --- a/gettext-tools/tests/msgunfmt-csharp-1 +++ b/gettext-tools/tests/msgunfmt-csharp-1 @@ -19,8 +19,10 @@ test "${TESTCSHARP}" = yes || { exit 77 } -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles mu-cs-1" +test -d mu-cs-1 || mkdir mu-cs-1 + +cat <<\EOF > mu-cs-1/fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -51,23 +53,19 @@ msgid "Close" msgstr "Fermer" EOF -tmpfiles="$tmpfiles fr/prog.resources.dll" : ${MSGFMT=msgfmt} GETTEXTCSHARPLIBDIR=../../gettext-runtime/intl-csharp \ -${MSGFMT} --csharp -d . -r prog -l fr fr.po || exit 1 +${MSGFMT} --csharp -d mu-cs-1 -r prog -l fr mu-cs-1/fr.po || exit 1 -tmpfiles="$tmpfiles prog.out" : ${MSGUNFMT=msgunfmt} GETTEXTCSHARPEXEDIR=../src \ GETTEXTCSHARPLIBDIR=../../gettext-runtime/intl-csharp \ -${MSGUNFMT} --csharp -d . -r prog -l fr -o prog.out || exit 1 +${MSGUNFMT} --csharp -d mu-cs-1 -r prog -l fr -o mu-cs-1/prog.out || exit 1 -tmpfiles="$tmpfiles prog.sort" : ${MSGCAT=msgcat} -${MSGCAT} -s -o prog.sort prog.out || exit 1 +${MSGCAT} -s -o mu-cs-1/prog.sort mu-cs-1/prog.out || exit 1 -tmpfiles="$tmpfiles prog.ok" -cat <<\EOF > prog.ok +cat <<\EOF > mu-cs-1/prog.ok msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" @@ -92,7 +90,7 @@ msgid "{0} is replaced by {1}." msgstr "{1} remplace {0}." EOF : ${DIFF=diff} -${DIFF} prog.ok prog.sort || exit 1 +${DIFF} mu-cs-1/prog.ok mu-cs-1/prog.sort || exit 1 rm -fr $tmpfiles diff --git a/gettext-tools/tests/msgunfmt-java-1 b/gettext-tools/tests/msgunfmt-java-1 index 34e133c..ad6e701 100755 --- a/gettext-tools/tests/msgunfmt-java-1 +++ b/gettext-tools/tests/msgunfmt-java-1 @@ -22,8 +22,10 @@ test "${TESTJAVA}" = yes || { exit 77 } -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles mu-java-1" +test -d mu-java-1 || mkdir mu-java-1 + +cat <<\EOF > mu-java-1/fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -54,22 +56,18 @@ msgid "Close" msgstr "Fermer" EOF -tmpfiles="$tmpfiles prog_fr.class" : ${MSGFMT=msgfmt} -${MSGFMT} -j -d . -r prog -l fr fr.po || exit 1 +${MSGFMT} -j -d mu-java-1 -r prog -l fr mu-java-1/fr.po || exit 1 -tmpfiles="$tmpfiles prog.out" : ${MSGUNFMT=msgunfmt} -CLASSPATH=.${CLASSPATH:+:$CLASSPATH} \ +CLASSPATH=mu-java-1${CLASSPATH:+:$CLASSPATH} \ GETTEXTJEXEDIR=../src GETTEXTJAR=../src/gettext.jar \ -${MSGUNFMT} --java -d . -r prog -l fr -o prog.out || exit 1 +${MSGUNFMT} --java -d mu-java-1 -r prog -l fr -o mu-java-1/prog.out || exit 1 -tmpfiles="$tmpfiles prog.sort" : ${MSGCAT=msgcat} -${MSGCAT} -s -o prog.sort prog.out || exit 1 +${MSGCAT} -s -o mu-java-1/prog.sort mu-java-1/prog.out || exit 1 -tmpfiles="$tmpfiles prog.ok" -cat <<\EOF > prog.ok +cat <<\EOF > mu-java-1/prog.ok msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" @@ -94,7 +92,7 @@ msgid "{0} is replaced by {1}." msgstr "{1} remplace {0}." EOF : ${DIFF=diff} -${DIFF} prog.ok prog.sort || exit 1 +${DIFF} mu-java-1/prog.ok mu-java-1/prog.sort || exit 1 rm -fr $tmpfiles diff --git a/gettext-tools/tests/msgunfmt-tcl-1 b/gettext-tools/tests/msgunfmt-tcl-1 index 5d2e220..bfe48e0 100755 --- a/gettext-tools/tests/msgunfmt-tcl-1 +++ b/gettext-tools/tests/msgunfmt-tcl-1 @@ -14,18 +14,18 @@ trap 'rm -fr $tmpfiles' 1 2 3 15 # Test whether we can execute Tcl programs and Tcl's fconfigure command # understands the -encoding option (it does since approximately Tcl 8.1). -tmpfiles="$tmpfiles version.tcl" -cat <<\EOF > version.tcl +tmpfiles="$tmpfiles mu-tcl-1-version.tcl" +cat <<\EOF > mu-tcl-1-version.tcl fconfigure stdout -encoding utf-8 puts $tcl_version EOF -(tclsh version.tcl) >/dev/null 2>/dev/null \ +(tclsh mu-tcl-1-version.tcl) >/dev/null 2>/dev/null \ || { echo "Skipping test: tclsh not found or Tcl too old" rm -fr $tmpfiles; exit 77 } -tmpfiles="$tmpfiles fr.po" -cat <<\EOF > fr.po +tmpfiles="$tmpfiles mu-tcl-1-fr.po" +cat <<\EOF > mu-tcl-1-fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -40,19 +40,19 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF -tmpfiles="$tmpfiles msgs" -test -d msgs || mkdir msgs +tmpfiles="$tmpfiles mu-tcl-1-msgs" +test -d mu-tcl-1-msgs || mkdir mu-tcl-1-msgs : ${MSGFMT=msgfmt} -${MSGFMT} --tcl -d msgs -l fr fr.po || exit 1 +${MSGFMT} --tcl -d mu-tcl-1-msgs -l fr mu-tcl-1-fr.po || exit 1 -tmpfiles="$tmpfiles prog.out" +tmpfiles="$tmpfiles mu-tcl-1-prog.out" : ${MSGUNFMT=msgunfmt} GETTEXTDATADIR=${top_srcdir}/src \ -${MSGUNFMT} --tcl -d msgs -l fr -o prog.out || exit 1 +${MSGUNFMT} --tcl -d mu-tcl-1-msgs -l fr -o mu-tcl-1-prog.out || exit 1 -tmpfiles="$tmpfiles prog.ok" -cat <<\EOF > prog.ok +tmpfiles="$tmpfiles mu-tcl-1-prog.ok" +cat <<\EOF > mu-tcl-1-prog.ok msgid "" msgstr "Content-Type: text/plain; charset=UTF-8\n" @@ -63,7 +63,7 @@ msgid "%s is replaced by %s." msgstr "%2$s remplace %1$s." EOF : ${DIFF=diff} -${DIFF} prog.ok prog.out || exit 1 +${DIFF} mu-tcl-1-prog.ok mu-tcl-1-prog.out || exit 1 rm -fr $tmpfiles diff --git a/gettext-tools/tests/plural-1 b/gettext-tools/tests/plural-1 index e3b9428..cb9c75a 100755..100644 --- a/gettext-tools/tests/plural-1 +++ b/gettext-tools/tests/plural-1 @@ -3,15 +3,15 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles cake.tmp cake.pot" +tmpfiles="$tmpfiles plural-1-cake.tmp plural-1-cake.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o cake.tmp --omit-header --no-location ${top_srcdir}/tests/plural-1-prg.c +${XGETTEXT} -o plural-1-cake.tmp --omit-header --no-location ${top_srcdir}/tests/plural-1-prg.c test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < cake.tmp > cake.pot +LC_ALL=C tr -d '\r' < plural-1-cake.tmp > plural-1-cake.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles cake.ok" -cat <<EOF > cake.ok +tmpfiles="$tmpfiles plural-1-cake.ok" +cat <<EOF > plural-1-cake.ok #, c-format msgid "a piece of cake" msgid_plural "%d pieces of cake" @@ -20,10 +20,10 @@ msgstr[1] "" EOF : ${DIFF=diff} -${DIFF} cake.ok cake.pot || exit 1 +${DIFF} plural-1-cake.ok plural-1-cake.pot || exit 1 -tmpfiles="$tmpfiles fr.po" -cat <<EOF > fr.po +tmpfiles="$tmpfiles plural-1-fr.po" +cat <<EOF > plural-1-fr.po # Les gateaux allemands sont les meilleurs du monde. #, c-format msgid "a piece of cake" @@ -32,50 +32,51 @@ msgstr[0] "un morceau de gateau" msgstr[1] "%d morceaux de gateau" EOF -tmpfiles="$tmpfiles fr.po.tmp fr.po.new" +tmpfiles="$tmpfiles plural-1-fr.po.tmp plural-1-fr.po.new" : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o fr.po.tmp fr.po cake.pot +${MSGMERGE} -q -o plural-1-fr.po.tmp plural-1-fr.po plural-1-cake.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new +LC_ALL=C tr -d '\r' < plural-1-fr.po.tmp > plural-1-fr.po.new test $? = 0 || { rm -fr $tmpfiles; exit 1; } : ${DIFF=diff} -${DIFF} fr.po fr.po.new || exit 1 +${DIFF} plural-1-fr.po plural-1-fr.po.new || exit 1 -tmpfiles="$tmpfiles fr" -test -d fr || mkdir fr -test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES +tmpfiles="$tmpfiles plural-1-dir" +test -d plural-1-dir || mkdir plural-1-dir +test -d plural-1-dir/fr || mkdir plural-1-dir/fr +test -d plural-1-dir/fr/LC_MESSAGES || mkdir plural-1-dir/fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o fr/LC_MESSAGES/cake.mo fr.po +${MSGFMT} -o plural-1-dir/fr/LC_MESSAGES/cake.mo plural-1-fr.po -tmpfiles="$tmpfiles fr.po.tmp fr.po.un" +tmpfiles="$tmpfiles plural-1-fr.po.tmp plural-1-fr.po.un" : ${MSGUNFMT=msgunfmt} -${MSGUNFMT} -o fr.po.tmp fr/LC_MESSAGES/cake.mo +${MSGUNFMT} -o plural-1-fr.po.tmp plural-1-dir/fr/LC_MESSAGES/cake.mo test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.un +LC_ALL=C tr -d '\r' < plural-1-fr.po.tmp > plural-1-fr.po.un test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles fr.po.strip" -sed 1,2d < fr.po > fr.po.strip +tmpfiles="$tmpfiles plural-1-fr.po.strip" +sed 1,2d < plural-1-fr.po > plural-1-fr.po.strip : ${DIFF=diff} -${DIFF} fr.po.strip fr.po.un || exit 1 +${DIFF} plural-1-fr.po.strip plural-1-fr.po.un || exit 1 -tmpfiles="$tmpfiles cake.ok cake.tmp cake.out" +tmpfiles="$tmpfiles plural-1-cake.ok plural-1-cake.tmp cake.out" : ${DIFF=diff} -echo 'un morceau de gateau' > cake.ok -LANGUAGE= ./cake fr 1 > cake.tmp || exit 1 -LC_ALL=C tr -d '\r' < cake.tmp > cake.out || exit 1 -${DIFF} cake.ok cake.out || exit 1 -echo '2 morceaux de gateau' > cake.ok -LANGUAGE= ./cake fr 2 > cake.tmp || exit 1 -LC_ALL=C tr -d '\r' < cake.tmp > cake.out || exit 1 -${DIFF} cake.ok cake.out || exit 1 -echo '10 morceaux de gateau' > cake.ok -LANGUAGE= ./cake fr 10 > cake.tmp || exit 1 -LC_ALL=C tr -d '\r' < cake.tmp > cake.out || exit 1 -${DIFF} cake.ok cake.out || exit 1 +echo 'un morceau de gateau' > plural-1-cake.ok +LANGUAGE= ./cake fr 1 > plural-1-cake.tmp || exit 1 +LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1 +${DIFF} plural-1-cake.ok cake.out || exit 1 +echo '2 morceaux de gateau' > plural-1-cake.ok +LANGUAGE= ./cake fr 2 > plural-1-cake.tmp || exit 1 +LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1 +${DIFF} plural-1-cake.ok cake.out || exit 1 +echo '10 morceaux de gateau' > plural-1-cake.ok +LANGUAGE= ./cake fr 10 > plural-1-cake.tmp || exit 1 +LC_ALL=C tr -d '\r' < plural-1-cake.tmp > cake.out || exit 1 +${DIFF} plural-1-cake.ok cake.out || exit 1 rm -fr $tmpfiles diff --git a/gettext-tools/tests/plural-1-prg.c b/gettext-tools/tests/plural-1-prg.c index 88e2467..f0e7c81 100644 --- a/gettext-tools/tests/plural-1-prg.c +++ b/gettext-tools/tests/plural-1-prg.c @@ -42,7 +42,7 @@ main (int argc, char *argv[]) return 1; textdomain ("cake"); - bindtextdomain ("cake", "."); + bindtextdomain ("cake", "plural-1-dir"); printf (ngettext ("a piece of cake", "%d pieces of cake", n), n); printf ("\n"); return 0; diff --git a/gettext-tools/tests/plural-2 b/gettext-tools/tests/plural-2 index dff148b..2593ced 100755 --- a/gettext-tools/tests/plural-2 +++ b/gettext-tools/tests/plural-2 @@ -3,10 +3,11 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles ll ll.po dataout" +tmpfiles="$tmpfiles plural-2-dir plural-2-ll.po dataout" : ${MSGFMT=msgfmt} -test -d ll || mkdir ll -test -d ll/LC_MESSAGES || mkdir ll/LC_MESSAGES +test -d plural-2-dir || mkdir plural-2-dir +test -d plural-2-dir/ll || mkdir plural-2-dir/ll +test -d plural-2-dir/ll/LC_MESSAGES || mkdir plural-2-dir/ll/LC_MESSAGES tmpfiles="$tmpfiles plural-2.data" cat <<EOF > plural-2.data @@ -47,7 +48,7 @@ EOF while read lang; do read formula read dataok - cat > ll.po <<EOF + cat > plural-2-ll.po <<EOF msgid "" msgstr "" "MIME-Version: 1.0\n" @@ -68,9 +69,9 @@ msgstr[7] "7" msgstr[8] "8" msgstr[9] "9" EOF - ${MSGFMT} -o ll/LC_MESSAGES/plural.mo ll.po || exit 1 + ${MSGFMT} -o plural-2-dir/ll/LC_MESSAGES/plural.mo plural-2-ll.po || exit 1 (for i in '' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19; do - LANGUAGE= TEXTDOMAIN=plural TEXTDOMAINDIR=. \ + LANGUAGE= TEXTDOMAIN=plural TEXTDOMAINDIR=plural-2-dir \ $NGETTEXT --env LC_ALL=ll X Y ${i}0 ${i}1 ${i}2 ${i}3 ${i}4 ${i}5 ${i}6 ${i}7 ${i}8 ${i}9 done) > dataout test "$dataok" = `cat dataout` || { diff --git a/gettext-tools/tests/xgettext-glade-1 b/gettext-tools/tests/xgettext-glade-1 index e8beec7..5d2aa24 100755 --- a/gettext-tools/tests/xgettext-glade-1 +++ b/gettext-tools/tests/xgettext-glade-1 @@ -5,22 +5,22 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles empty.glade" -cat <<EOF > empty.glade +tmpfiles="$tmpfiles xg-gl-1-empty.glade" +cat <<EOF > xg-gl-1-empty.glade <?xml version="1.0"?> <GTK-Interface/> EOF tmpfiles="$tmpfiles xg-gl-1.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-gl-1.pot empty.glade 2>/dev/null +${XGETTEXT} -o xg-gl-1.pot xg-gl-1-empty.glade 2>/dev/null test $? = 0 || { echo "Skipping test: xgettext was built without Glade support" rm -fr $tmpfiles; exit 77 } -tmpfiles="$tmpfiles widgets.glade" -cat <<EOF > widgets.glade +tmpfiles="$tmpfiles xg-gl-1-widgets.glade" +cat <<EOF > xg-gl-1-widgets.glade <?xml version="1.0"?> <GTK-Interface> @@ -1336,7 +1336,7 @@ EOF tmpfiles="$tmpfiles xg-gl-1.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} --add-comments -o - widgets.glade | grep -v 'POT-Creation-Date' > xg-gl-1.pot +${XGETTEXT} --add-comments -o - xg-gl-1-widgets.glade | grep -v 'POT-Creation-Date' > xg-gl-1.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles xg-gl-1.ok" @@ -1359,208 +1359,208 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: widgets.glade:33 +#: xg-gl-1-widgets.glade:33 msgid "Libglade-GNOME Test" msgstr "" -#: widgets.glade:103 +#: xg-gl-1-widgets.glade:103 msgid "Show _Tests" msgstr "" -#: widgets.glade:116 +#: xg-gl-1-widgets.glade:116 msgid "Druid Test" msgstr "" -#: widgets.glade:295 +#: xg-gl-1-widgets.glade:295 msgid "New" msgstr "" -#: widgets.glade:303 +#: xg-gl-1-widgets.glade:303 msgid "Open" msgstr "" -#: widgets.glade:311 +#: xg-gl-1-widgets.glade:311 msgid "Save" msgstr "" -#: widgets.glade:325 +#: xg-gl-1-widgets.glade:325 msgid "Cut" msgstr "" -#: widgets.glade:342 +#: xg-gl-1-widgets.glade:342 msgid "Copy" msgstr "" -#: widgets.glade:356 +#: xg-gl-1-widgets.glade:356 msgid "Paste" msgstr "" -#: widgets.glade:370 +#: xg-gl-1-widgets.glade:370 msgid "Clear" msgstr "" -#: widgets.glade:378 +#: xg-gl-1-widgets.glade:378 msgid "Tog" msgstr "" -#: widgets.glade:395 +#: xg-gl-1-widgets.glade:395 msgid "The cut copy paste and clear buttons should work correctly." msgstr "" -#: widgets.glade:423 +#: xg-gl-1-widgets.glade:423 msgid "Copyright (C) 1999" msgstr "" -#: widgets.glade:426 +#: xg-gl-1-widgets.glade:426 msgid "" "A simple program demonstrating what is possible with GNOME and\n" "libglade. This interface has been coded entirely with GLADE, and\n" "no C code specific to this interface has been written." msgstr "" -#: widgets.glade:508 +#: xg-gl-1-widgets.glade:508 msgid "X" msgstr "" -#: widgets.glade:529 +#: xg-gl-1-widgets.glade:529 msgid "Widget Tests" msgstr "" -#: widgets.glade:556 widgets.glade:557 +#: xg-gl-1-widgets.glade:556 xg-gl-1-widgets.glade:557 msgid "Pick a colour" msgstr "" -#: widgets.glade:564 +#: xg-gl-1-widgets.glade:564 msgid "Colour Picker" msgstr "" -#: widgets.glade:578 +#: xg-gl-1-widgets.glade:578 msgid "Pick a Font" msgstr "" -#: widgets.glade:579 +#: xg-gl-1-widgets.glade:579 msgid "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz" msgstr "" -#: widgets.glade:590 +#: xg-gl-1-widgets.glade:590 msgid "Font Picker" msgstr "" #. The welcome greeting -#: widgets.glade:603 +#: xg-gl-1-widgets.glade:603 msgid "Hello" msgstr "" -#: widgets.glade:612 +#: xg-gl-1-widgets.glade:612 msgid "Icon Sel" msgstr "" -#: widgets.glade:627 +#: xg-gl-1-widgets.glade:627 msgid "My Gnome Site" msgstr "" -#: widgets.glade:634 +#: xg-gl-1-widgets.glade:634 msgid "HRef" msgstr "" -#: widgets.glade:665 +#: xg-gl-1-widgets.glade:665 msgid "Entry" msgstr "" -#: widgets.glade:699 +#: xg-gl-1-widgets.glade:699 msgid "File Entry" msgstr "" -#: widgets.glade:725 +#: xg-gl-1-widgets.glade:725 msgid "Dial" msgstr "" #. This is a comment for the translators. #. This should be an strftime format, #. as described in the strftime(3) manual page. -#: widgets.glade:742 +#: xg-gl-1-widgets.glade:742 msgid "%H:%M" msgstr "" -#: widgets.glade:751 +#: xg-gl-1-widgets.glade:751 msgid "Clock" msgstr "" -#: widgets.glade:774 +#: xg-gl-1-widgets.glade:774 msgid "Animator" msgstr "" -#: widgets.glade:792 +#: xg-gl-1-widgets.glade:792 msgid "Calculator" msgstr "" -#: widgets.glade:811 +#: xg-gl-1-widgets.glade:811 msgid "Less" msgstr "" -#: widgets.glade:830 +#: xg-gl-1-widgets.glade:830 msgid "PaperSel" msgstr "" -#: widgets.glade:848 +#: xg-gl-1-widgets.glade:848 msgid "GnomeSpell" msgstr "" -#: widgets.glade:874 +#: xg-gl-1-widgets.glade:874 msgid "Select File" msgstr "" -#: widgets.glade:901 +#: xg-gl-1-widgets.glade:901 msgid "OK" msgstr "" -#: widgets.glade:917 +#: xg-gl-1-widgets.glade:917 msgid "Cancel" msgstr "" -#: widgets.glade:949 +#: xg-gl-1-widgets.glade:949 msgid "" "If this was a real application, clicking on the\n" "OK button would probably have done something\n" "useful, rather than just displaying this dialog." msgstr "" -#: widgets.glade:995 +#: xg-gl-1-widgets.glade:995 msgid "Nothing" msgstr "" -#: widgets.glade:1159 +#: xg-gl-1-widgets.glade:1159 msgid "_Entry" msgstr "" -#: widgets.glade:1193 +#: xg-gl-1-widgets.glade:1193 msgid "_Dial" msgstr "" -#: widgets.glade:1218 +#: xg-gl-1-widgets.glade:1218 msgid "GnomeDruid" msgstr "" -#: widgets.glade:1239 +#: xg-gl-1-widgets.glade:1239 msgid "Test GnomeDruid" msgstr "" -#: widgets.glade:1240 +#: xg-gl-1-widgets.glade:1240 msgid "" "This is a simple test of the GnomeDruid\n" "code in gnome-libs and the wrapper\n" "for said code in libglade." msgstr "" -#: widgets.glade:1253 +#: xg-gl-1-widgets.glade:1253 msgid "A dial in a druid" msgstr "" -#: widgets.glade:1300 +#: xg-gl-1-widgets.glade:1300 msgid "Last Page" msgstr "" -#: widgets.glade:1301 +#: xg-gl-1-widgets.glade:1301 msgid "This is the end of the druid example" msgstr "" EOF diff --git a/gettext-tools/tests/xgettext-glade-2 b/gettext-tools/tests/xgettext-glade-2 index a6c56dc..36c0c3b 100755 --- a/gettext-tools/tests/xgettext-glade-2 +++ b/gettext-tools/tests/xgettext-glade-2 @@ -6,22 +6,22 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles empty.glade" -cat <<EOF > empty.glade +tmpfiles="$tmpfiles xg-gl-2-empty.glade" +cat <<EOF > xg-gl-2-empty.glade <?xml version="1.0"?> <GTK-Interface/> EOF tmpfiles="$tmpfiles xg-gl-2.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-gl-2.pot empty.glade 2>/dev/null +${XGETTEXT} -o xg-gl-2.pot xg-gl-2-empty.glade 2>/dev/null test $? = 0 || { echo "Skipping test: xgettext was built without Glade support" rm -fr $tmpfiles; exit 77 } -tmpfiles="$tmpfiles simple.glade" -cat <<\EOF > simple.glade +tmpfiles="$tmpfiles xg-gl-2-simple.glade" +cat <<\EOF > xg-gl-2-simple.glade <?xml version="1.0" encoding="ISO-8859-1"?> <GTK-Interface> @@ -61,7 +61,7 @@ EOF tmpfiles="$tmpfiles xg-gl-2.tmp xg-gl-2.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} --add-comments -o xg-gl-2.tmp simple.glade +${XGETTEXT} --add-comments -o xg-gl-2.tmp xg-gl-2-simple.glade test $? = 0 || { rm -fr $tmpfiles; exit 1; } # Don't simplify this to "grep ... < xg-gl-2.tmp", otherwise OpenBSD 4.0 grep # only outputs "Binary file (standard input) matches". @@ -87,16 +87,16 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: simple.glade:13 +#: xg-gl-2-simple.glade:13 msgid "Hello" msgstr "" #. Der übliche Programm-Gruß -#: simple.glade:30 +#: xg-gl-2-simple.glade:30 msgid "Hello World" msgstr "" -#: simple.glade:31 +#: xg-gl-2-simple.glade:31 msgid "This <button> displays \"Hello World\"." msgstr "" EOF diff --git a/gettext-tools/tests/xgettext-glade-3 b/gettext-tools/tests/xgettext-glade-3 index c2041a8..f929ae5 100755 --- a/gettext-tools/tests/xgettext-glade-3 +++ b/gettext-tools/tests/xgettext-glade-3 @@ -5,22 +5,22 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles empty.glade" -cat <<EOF > empty.glade +tmpfiles="$tmpfiles xg-gl-3-empty.glade" +cat <<EOF > xg-gl-3-empty.glade <?xml version="1.0"?> <GTK-Interface/> EOF tmpfiles="$tmpfiles xg-gl-3.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-gl-3.pot empty.glade 2>/dev/null +${XGETTEXT} -o xg-gl-3.pot xg-gl-3-empty.glade 2>/dev/null test $? = 0 || { echo "Skipping test: xgettext was built without Glade support" rm -fr $tmpfiles; exit 77 } -tmpfiles="$tmpfiles asciitable.glade2" -cat <<EOF > asciitable.glade2 +tmpfiles="$tmpfiles xg-gl-3-asciitable.glade2" +cat <<EOF > xg-gl-3-asciitable.glade2 <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd" > @@ -168,7 +168,7 @@ EOF tmpfiles="$tmpfiles xg-gl-3.tmp xg-gl-3.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-gl-3.tmp asciitable.glade2 +${XGETTEXT} -o xg-gl-3.tmp xg-gl-3-asciitable.glade2 test $? = 0 || { rm -fr $tmpfiles; exit 1; } # Don't simplify this to "grep ... < xg-gl-3.tmp", otherwise OpenBSD 4.0 grep # only outputs "Binary file (standard input) matches". @@ -194,15 +194,15 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: asciitable.glade2:7 +#: xg-gl-3-asciitable.glade2:7 msgid "gedit: ASCII table" msgstr "" -#: asciitable.glade2:30 +#: xg-gl-3-asciitable.glade2:30 msgid "Insert char" msgstr "" -#: asciitable.glade2:74 +#: xg-gl-3-asciitable.glade2:74 msgid "" "If you wish to insert any of the characters in to the active \n" "document, select the character and click the \"Insert Char\" \n" diff --git a/gettext-tools/tests/xgettext-glade-4 b/gettext-tools/tests/xgettext-glade-4 index 374742a..f00419f 100755 --- a/gettext-tools/tests/xgettext-glade-4 +++ b/gettext-tools/tests/xgettext-glade-4 @@ -5,15 +5,15 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles empty.glade" -cat <<EOF > empty.glade +tmpfiles="$tmpfiles xg-gl-4-empty.glade" +cat <<EOF > xg-gl-4-empty.glade <?xml version="1.0"?> <GTK-Interface/> EOF tmpfiles="$tmpfiles xg-gl-4.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-gl-4.pot empty.glade 2>/dev/null +${XGETTEXT} -o xg-gl-4.pot xg-gl-4-empty.glade 2>/dev/null test $? = 0 || { echo "Skipping test: xgettext was built without Glade support" rm -fr $tmpfiles; exit 77 diff --git a/gettext-tools/tests/xgettext-glade-5 b/gettext-tools/tests/xgettext-glade-5 index ad4ea05..6354feb 100755 --- a/gettext-tools/tests/xgettext-glade-5 +++ b/gettext-tools/tests/xgettext-glade-5 @@ -5,15 +5,15 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles empty.glade" -cat <<EOF > empty.glade +tmpfiles="$tmpfiles xg-gl-5-empty.glade" +cat <<EOF > xg-gl-5-empty.glade <?xml version="1.0"?> <GTK-Interface/> EOF tmpfiles="$tmpfiles xg-gl-5.pot" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-gl-5.pot empty.glade 2>/dev/null +${XGETTEXT} -o xg-gl-5.pot xg-gl-5-empty.glade 2>/dev/null test $? = 0 || { echo "Skipping test: xgettext was built without Glade support" rm -fr $tmpfiles; exit 77 diff --git a/gettext-tools/tests/xgettext-python-4 b/gettext-tools/tests/xgettext-python-4 index d29f3a9..8b7e626 100755 --- a/gettext-tools/tests/xgettext-python-4 +++ b/gettext-tools/tests/xgettext-python-4 @@ -5,8 +5,8 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles xg-py-3.py" -cat <<\EOF > xg-py-3.py +tmpfiles="$tmpfiles xg-py-4.py" +cat <<\EOF > xg-py-4.py # a string = # b # c @@ -15,16 +15,16 @@ _( # d ); EOF -tmpfiles="$tmpfiles xg-py-3.tmp.po xg-py-3.po" +tmpfiles="$tmpfiles xg-py-4.tmp.po xg-py-4.po" : ${XGETTEXT=xgettext} ${XGETTEXT} --add-comments --omit-header --no-location --keyword=_ \ - -d xg-py-3.tmp xg-py-3.py + -d xg-py-4.tmp xg-py-4.py test $? = 0 || { rm -fr $tmpfiles; exit 1; } -LC_ALL=C tr -d '\r' < xg-py-3.tmp.po > xg-py-3.po +LC_ALL=C tr -d '\r' < xg-py-4.tmp.po > xg-py-4.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } -tmpfiles="$tmpfiles xg-py-3.ok" -cat <<EOF > xg-py-3.ok +tmpfiles="$tmpfiles xg-py-4.ok" +cat <<EOF > xg-py-4.ok #. a #. b #. c @@ -34,7 +34,7 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} xg-py-3.ok xg-py-3.po +${DIFF} xg-py-4.ok xg-py-4.po result=$? rm -fr $tmpfiles diff --git a/gettext-tools/tests/xgettext-stringtable-1 b/gettext-tools/tests/xgettext-stringtable-1 index 3b3208e..d1abf65 100755 --- a/gettext-tools/tests/xgettext-stringtable-1 +++ b/gettext-tools/tests/xgettext-stringtable-1 @@ -5,8 +5,8 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -tmpfiles="$tmpfiles xg-st-1.strings" -cat <<\EOF > xg-st-1.strings +tmpfiles="$tmpfiles xg-stbl-1.strings" +cat <<\EOF > xg-stbl-1.strings /*** German.lproj/Localizable.strings updated by make_strings 2003-10-12 15:31:50 +0200 @@ -23,16 +23,16 @@ add comments above this one = "Dieses Programm luft mit der Prozess-Nummer %d."; EOF -tmpfiles="$tmpfiles xg-st-1.tmp xg-st-1.po" +tmpfiles="$tmpfiles xg-stbl-1.tmp xg-stbl-1.po" : ${XGETTEXT=xgettext} -${XGETTEXT} -o xg-st-1.tmp xg-st-1.strings +${XGETTEXT} -o xg-stbl-1.tmp xg-stbl-1.strings test $? = 0 || { rm -fr $tmpfiles; exit 1; } -# Don't simplify this to "grep ... < xg-st-1.tmp", otherwise OpenBSD 4.0 grep +# Don't simplify this to "grep ... < xg-stbl-1.tmp", otherwise OpenBSD 4.0 grep # only outputs "Binary file (standard input) matches". -cat xg-st-1.tmp | grep -v 'POT-Creation-Date' | LC_ALL=C tr -d '\r' > xg-st-1.po +cat xg-stbl-1.tmp | grep -v 'POT-Creation-Date' | LC_ALL=C tr -d '\r' > xg-stbl-1.po -tmpfiles="$tmpfiles xg-st-1.ok" -cat <<\EOF > xg-st-1.ok +tmpfiles="$tmpfiles xg-stbl-1.ok" +cat <<\EOF > xg-stbl-1.ok # SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. @@ -67,7 +67,7 @@ msgstr "Dieses Programm läuft mit der Prozess-Nummer %d." EOF : ${DIFF=diff} -${DIFF} xg-st-1.ok xg-st-1.po +${DIFF} xg-stbl-1.ok xg-stbl-1.po result=$? rm -fr $tmpfiles |