diff options
author | Daiki Ueno <ueno@gnu.org> | 2014-10-01 13:25:03 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2014-10-01 14:35:51 +0900 |
commit | e860dc2849a0615d8db09804f72152581605874d (patch) | |
tree | 8d58734b892a3e20c0009f34ccea941e310d617f | |
parent | ce70d92b4b1bbf6f7be374cb12d2ab94a10eaa36 (diff) | |
download | external_gettext-e860dc2849a0615d8db09804f72152581605874d.zip external_gettext-e860dc2849a0615d8db09804f72152581605874d.tar.gz external_gettext-e860dc2849a0615d8db09804f72152581605874d.tar.bz2 |
tests: Stop redundant textdomain directory creation
This was introduced by commit 3533f6cc when we didn't use separate
test directory for each test. Now that we switched to init.sh, we
don't need to worry about filename conflicts.
27 files changed, 494 insertions, 484 deletions
diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 1789a1f..07e0f64 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,36 @@ +2014-10-01 Daiki Ueno <ueno@gnu.org> + + tests: Stop redundant textdomain directory creation + This was introduced by commit 3533f6cc when we didn't use separate + test directory for each test. Now that we switched to init.sh, we + don't need to worry about filename conflicts. + * lang-c: Stop redundant textdomain directory creation. + * lang-c++: Likewise. + * lang-objc: Likewise. + * lang-sh: Likewise. + * lang-bash: Likewise. + * lang-python-1: Likewise. + * lang-python-2: Likewise. + * lang-clisp: Likewise. + * lang-elisp: Likewise. + * lang-librep: Likewise. + * lang-guile: Likewise. + * lang-smalltalk: Likewise. + * lang-java: Likewise. + * lang-csharp: Likewise. + * lang-gawk: Likewise. + * lang-pascal: Likewise. + * lang-ycp: Likewise. + * lang-tcl: Likewise. + * lang-perl-1: Likewise. + * lang-perl-2: Likewise. + * lang-php: Likewise. + * lang-po: Likewise. + * lang-rst: Likewise. + * lang-lua: Likewise. + * lang-javascript: Likewise. + * lang-vala: Likewise. + 2014-09-30 Daiki Ueno <ueno@gnu.org> * autopoint-1: Don't rely on non-portable "grep -q". diff --git a/gettext-tools/tests/lang-bash b/gettext-tools/tests/lang-bash index d0be463..d69cb83 100755 --- a/gettext-tools/tests/lang-bash +++ b/gettext-tools/tests/lang-bash @@ -19,7 +19,7 @@ n=$1 TEXTDOMAIN=prog export TEXTDOMAIN -TEXTDOMAINDIR=l-bash +TEXTDOMAINDIR=. export TEXTDOMAINDIR $echo $"'Your command, please?', asked the waiter." @@ -29,14 +29,14 @@ EOF : ${XGETTEXT=xgettext} LC_MESSAGES=C LC_ALL= \ -${XGETTEXT} -o l-bash-prog.tmp --omit-header --no-location prog.bash \ - >l-bash-prog.err 2>&1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.bash \ + >prog.err 2>&1 result=$? -cat l-bash-prog.err | grep -v 'warning: the syntax \$"\.\.\." is deprecated due to security reasons' +cat prog.err | grep -v 'warning: the syntax \$"\.\.\." is deprecated due to security reasons' test $result = 0 || { exit 1; } -LC_ALL=C tr -d '\r' < l-bash-prog.tmp > l-bash-prog.pot || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<\EOF > l-bash-prog.ok +cat <<\EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -48,9 +48,9 @@ msgstr[1] "" EOF : ${DIFF=diff} -${DIFF} l-bash-prog.ok l-bash-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-bash-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -68,18 +68,17 @@ msgstr[1] "$n morceaux de gateau" EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-bash-fr.po.tmp l-bash-fr.po l-bash-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-bash-fr.po.tmp > l-bash-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-bash-fr.po l-bash-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-bash/fr/LC_MESSAGES/prog.mo l-bash-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of bash version 2.0 or newer. (bash -c :) >/dev/null 2>/dev/null \ @@ -118,16 +117,16 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi # Expected result when bash is built without i18n support. -cat <<\EOF > l-bash-prog.nok +cat <<\EOF > prog.nok 'Your command, please?', asked the waiter. 2 morceaux de gateau EOF # Expected result when bash is built with i18n support. -cat <<\EOF > l-bash-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EOF -cat <<\EOF > l-bash-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EOF @@ -135,22 +134,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.bash 2 > l-bash-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR bash ./prog.bash 2 > prog.out || exit 1 : ${DIFF=diff} - ${DIFF} l-bash-prog.nok l-bash-prog.out > /dev/null && { + ${DIFF} prog.nok prog.out > /dev/null && { echo "Skipping test: bash is built without i18n support" exit 77 } - ${DIFF} l-bash-prog.ok l-bash-prog.out || exit 1 + ${DIFF} prog.ok prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 bash ./prog.bash 2 > l-bash-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 bash ./prog.bash 2 > prog.out || exit 1 : ${DIFF=diff} - ${DIFF} l-bash-prog.nok l-bash-prog.out > /dev/null && { + ${DIFF} prog.nok prog.out > /dev/null && { echo "Skipping test: bash is built without i18n support" exit 77 } - ${DIFF} l-bash-prog.oku l-bash-prog.out || exit 1 + ${DIFF} prog.oku prog.out || exit 1 fi exit 0 diff --git a/gettext-tools/tests/lang-c b/gettext-tools/tests/lang-c index f1d5b06..0570fa4 100755 --- a/gettext-tools/tests/lang-c +++ b/gettext-tools/tests/lang-c @@ -24,7 +24,7 @@ int main (int argc, char *argv[]) exit (77); textdomain ("prog"); - bindtextdomain ("prog", "l-c"); + bindtextdomain ("prog", "."); printf (_("'Your command, please?', asked the waiter.")); printf ("\n"); @@ -47,15 +47,15 @@ ${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CFLAGS} \ : ${CONFIG_SHELL=${SHELL-/bin/sh}} ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \ - ${CC} ${CFLAGS} -o l-c-prog prog.${OBJEXT} \ + ${CC} ${CFLAGS} -o prog prog.${OBJEXT} \ ../../gnulib-lib/libgettextlib.la ${LDFLAGS} ${LTLIBINTL} \ || exit 1 : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-c-prog.tmp --omit-header --no-location -k_ prog.c || exit 1 -LC_ALL=C tr -d '\r' < l-c-prog.tmp > l-c-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.c || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-c-prog.ok +cat <<EOF > prog.ok #, c-format msgid "'Your command, please?', asked the waiter." msgstr "" @@ -72,9 +72,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-c-prog.ok l-c-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-c-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -98,26 +98,25 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-c-fr.po.tmp l-c-fr.po l-c-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-c-fr.po.tmp > l-c-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-c-fr.po l-c-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-c/fr/LC_MESSAGES/prog.mo l-c-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po : ${DIFF=diff} -cat <<\EOF > l-c-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-c-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -126,17 +125,17 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= ./l-c-prog $LOCALE_FR 2 > l-c-prog.out + LANGUAGE= ./prog $LOCALE_FR 2 > prog.out case $? in - 0) ${DIFF} l-c-prog.ok l-c-prog.out || exit 1;; + 0) ${DIFF} prog.ok prog.out || exit 1;; 77) LOCALE_FR=none;; *) exit 1;; esac fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= ./l-c-prog $LOCALE_FR_UTF8 2 > l-c-prog.out + LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out case $? in - 0) ${DIFF} l-c-prog.oku l-c-prog.out || exit 1;; + 0) ${DIFF} prog.oku 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 26e4506..4aa4d63 100755 --- a/gettext-tools/tests/lang-c++ +++ b/gettext-tools/tests/lang-c++ @@ -15,7 +15,7 @@ test "${TESTLIBASPRINTF}" = yes || { exit 77 } -cat <<\EOF > l-c++-prog.cc +cat <<\EOF > prog.cc #include "config.h" /* Avoid deprecation warnings from g++ 3.1 or newer. */ @@ -45,7 +45,7 @@ int main (int argc, char *argv[]) exit (77); textdomain ("prog"); - bindtextdomain ("prog", "l-c++"); + bindtextdomain ("prog", "."); cout << _("'Your command, please?', asked the waiter.") << endl; @@ -56,28 +56,28 @@ int main (int argc, char *argv[]) } EOF -# Compile in two steps from .cc to .o and from .o to 'l-c++-prog'. This way, +# Compile in two steps from .cc to .o and from .o to '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"$abs_top_srcdir"/gnulib-lib -I../../intl ${CXXFLAGS} ${CPPFLAGS} -c l-c++-prog.cc \ +${CXX} -I../.. -I../../../gettext-runtime/libasprintf -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CXXFLAGS} ${CPPFLAGS} -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'. : ${CONFIG_SHELL=${SHELL-/bin/sh}} ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CXX --mode=link \ - ${CXX} ${CXXFLAGS} `echo "X ${LDFLAGS} " | sed -e 's/^X//' -e 's/ -Wl,--disable-auto-import / /'` -o l-c++-prog l-c++-prog.${OBJEXT} \ + ${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} \ || exit 1 : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-c++-prog.tmp --omit-header --no-location -k_ l-c++-prog.cc || exit 1 -LC_ALL=C tr -d '\r' < l-c++-prog.tmp > l-c++-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.cc || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-c++-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -93,9 +93,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-c++-prog.ok l-c++-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-c++-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -118,26 +118,25 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-c++-fr.po.tmp l-c++-fr.po l-c++-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-c++-fr.po.tmp > l-c++-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-c++-fr.po l-c++-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-c++/fr/LC_MESSAGES/prog.mo l-c++-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po : ${DIFF=diff} -cat <<\EOF > l-c++-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-c++-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -146,17 +145,17 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= ./l-c++-prog $LOCALE_FR 2 > l-c++-prog.out + LANGUAGE= ./prog $LOCALE_FR 2 > prog.out case $? in - 0) ${DIFF} l-c++-prog.ok l-c++-prog.out || exit 1;; + 0) ${DIFF} prog.ok prog.out || exit 1;; 77) LOCALE_FR=none;; *) exit 1;; esac fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= ./l-c++-prog $LOCALE_FR_UTF8 2 > l-c++-prog.out + LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out case $? in - 0) ${DIFF} l-c++-prog.oku l-c++-prog.out || exit 1;; + 0) ${DIFF} prog.oku 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 fe76fb5..e1cfc11 100755 --- a/gettext-tools/tests/lang-clisp +++ b/gettext-tools/tests/lang-clisp @@ -7,7 +7,7 @@ cat <<\EOF > prog.lisp (setf (textdomain) "prog") -(setf (textdomaindir "prog") "./l-clisp/") +(setf (textdomaindir "prog") "./") (setq n (parse-integer (first *args*))) @@ -19,10 +19,10 @@ cat <<\EOF > prog.lisp EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-clisp-prog.tmp --omit-header --no-location prog.lisp || exit 1 -LC_ALL=C tr -d '\r' < l-clisp-prog.tmp > l-clisp-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.lisp || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-clisp-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -38,9 +38,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-clisp-prog.ok l-clisp-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-clisp-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -63,18 +63,17 @@ msgstr "~1@*~A remplace ~0@*~A." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-clisp-fr.po.tmp l-clisp-fr.po l-clisp-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-clisp-fr.po.tmp > l-clisp-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-clisp-fr.po l-clisp-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-clisp/fr/LC_MESSAGES/prog.mo l-clisp-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo 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' @@ -122,12 +121,12 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-clisp-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-clisp-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -136,14 +135,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 > 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 + 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 fi if test $LOCALE_FR_UTF8 != none; then - 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 + 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 fi exit 0 diff --git a/gettext-tools/tests/lang-csharp b/gettext-tools/tests/lang-csharp index 1a4c3a3..ebe16c0 100755 --- a/gettext-tools/tests/lang-csharp +++ b/gettext-tools/tests/lang-csharp @@ -46,15 +46,14 @@ class Program { } EOF -test -d l-csharp || mkdir l-csharp : ${CSHARPCOMP="/bin/sh ../../csharpcomp.sh"} -${CSHARPCOMP} -o l-csharp/program.exe -L ../../../gettext-runtime/intl-csharp -l GNU.Gettext program.cs || exit 1 +${CSHARPCOMP} -o program.exe -L ../../../gettext-runtime/intl-csharp -l GNU.Gettext program.cs || exit 1 : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-csharp-prog.tmp --omit-header --no-location program.cs || exit 1 -LC_ALL=C tr -d '\r' < l-csharp-prog.tmp > l-csharp-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location program.cs || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-csharp-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -82,9 +81,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-csharp-prog.ok l-csharp-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-csharp-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -121,15 +120,15 @@ msgstr "Le nouveau {1} remplace le vieux {0}." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-csharp-fr.po.tmp l-csharp-fr.po l-csharp-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-csharp-fr.po.tmp > l-csharp-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-csharp-fr.po l-csharp-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 : ${MSGFMT=msgfmt} GETTEXTCSHARPLIBDIR=../../../gettext-runtime/intl-csharp \ -${MSGFMT} --csharp -d l-csharp -r prog -l fr l-csharp-fr.po || exit 1 +${MSGFMT} --csharp -d . -r prog -l fr fr.po || exit 1 # Test which of the fr_FR locales are installed. : ${LOCALE_FR=fr_FR} @@ -160,14 +159,14 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-csharp-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. 2 morceaux de gateau succulent Le nouveau EUR remplace le vieux FF. EOF -cat <<\EOF > l-csharp-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -179,12 +178,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 l-csharp/program.exe 2 > l-csharp-prog.out || exit 1 - ${DIFF} l-csharp-prog.ok l-csharp-prog.out || exit 1 + 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 fi if test $LOCALE_FR_UTF8 != none; then - 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 + 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 fi exit 0 diff --git a/gettext-tools/tests/lang-elisp b/gettext-tools/tests/lang-elisp index afe2873..5823ff7 100755 --- a/gettext-tools/tests/lang-elisp +++ b/gettext-tools/tests/lang-elisp @@ -5,7 +5,7 @@ cat <<\EOF > prog.el (textdomain "prog") -(bindtextdomain "prog" "l-elisp") +(bindtextdomain "prog" ".") (format standard-output "%s\n" (_ "'Your command, please?', asked the waiter.")) @@ -14,10 +14,10 @@ cat <<\EOF > prog.el EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-elisp-prog.tmp --omit-header --no-location prog.el || exit 1 -LC_ALL=C tr -d '\r' < l-elisp-prog.tmp > l-elisp-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.el || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-elisp-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -27,9 +27,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-elisp-prog.ok l-elisp-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-elisp-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -45,17 +45,16 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-elisp-fr.po.tmp l-elisp-fr.po l-elisp-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-elisp-fr.po.tmp > l-elisp-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-elisp-fr.po l-elisp-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-elisp/fr/LC_MESSAGES/prog.mo l-elisp-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po exit 0 diff --git a/gettext-tools/tests/lang-gawk b/gettext-tools/tests/lang-gawk index c93a2f4..6709844 100755 --- a/gettext-tools/tests/lang-gawk +++ b/gettext-tools/tests/lang-gawk @@ -12,7 +12,7 @@ cat <<\EOF > prog.awk BEGIN { TEXTDOMAIN = "prog" - bindtextdomain ("./l-gawk") + bindtextdomain ("./") print _"'Your command, please?', asked the waiter." @@ -23,10 +23,10 @@ BEGIN { EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-gawk-prog.tmp --omit-header --no-location prog.awk || exit 1 -LC_ALL=C tr -d '\r' < l-gawk-prog.tmp > l-gawk-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.awk || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-gawk-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -42,9 +42,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-gawk-prog.ok l-gawk-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-gawk-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -67,18 +67,17 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-gawk-fr.po.tmp l-gawk-fr.po l-gawk-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-gawk-fr.po.tmp > l-gawk-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-gawk-fr.po l-gawk-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-gawk/fr/LC_MESSAGES/prog.mo l-gawk-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo 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 \ @@ -135,12 +134,12 @@ if test $LOCALE_FR_UTF8 != none; then fi : ${DIFF=diff} -cat <<\EOF > l-gawk-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-gawk-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -149,12 +148,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 > l-gawk-prog.out || exit 1 - ${DIFF} l-gawk-prog.ok l-gawk-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > prog.out || exit 1 + ${DIFF} prog.ok 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 > l-gawk-prog.out || exit 1 - ${DIFF} l-gawk-prog.oku l-gawk-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk -v n=2 -f prog.awk > prog.out || exit 1 + ${DIFF} prog.oku prog.out || exit 1 fi exit 0 diff --git a/gettext-tools/tests/lang-guile b/gettext-tools/tests/lang-guile index 25cae7c..dca7636 100755 --- a/gettext-tools/tests/lang-guile +++ b/gettext-tools/tests/lang-guile @@ -10,7 +10,7 @@ cat <<\EOF > prog.scm (setlocale LC_ALL "") (textdomain "prog") -(bindtextdomain "prog" "l-guile") +(bindtextdomain "prog" ".") (define n (string->number (list-ref (command-line) 1))) @@ -22,10 +22,10 @@ cat <<\EOF > prog.scm EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-guile-prog.tmp --omit-header --no-location prog.scm || exit 1 -LC_ALL=C tr -d '\r' < l-guile-prog.tmp > l-guile-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.scm || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-guile-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -41,9 +41,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-guile-prog.ok l-guile-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-guile-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -66,18 +66,17 @@ msgstr "~1@*~A remplace ~0@*~A." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-guile-fr.po.tmp l-guile-fr.po l-guile-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-guile-fr.po.tmp > l-guile-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-guile-fr.po l-guile-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-guile/fr/LC_MESSAGES/prog.mo l-guile-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of guile version 1.7 or newer. (guile --version) >/dev/null 2>/dev/null \ @@ -116,12 +115,12 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-guile-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-guile-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -130,14 +129,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 > 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 + 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 fi if test $LOCALE_FR_UTF8 != none; then - 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 + 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 fi exit 0 diff --git a/gettext-tools/tests/lang-java b/gettext-tools/tests/lang-java index 4cd2020..e699e68 100755 --- a/gettext-tools/tests/lang-java +++ b/gettext-tools/tests/lang-java @@ -59,17 +59,15 @@ cat <<\EOF >> Program.java } EOF -test -d l-java || mkdir l-java - : ${JAVACOMP="/bin/sh ../../javacomp.sh"} -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; } +CLASSPATH=../../../gettext-runtime/intl-java/libintl.jar ${JAVACOMP} -d . Program.java 2>prog.err \ + || { cat prog.err 1>&2; exit 1; } : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-java-prog.tmp --omit-header --no-location Program.java || exit 1 -LC_ALL=C tr -d '\r' < l-java-prog.tmp > l-java-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location Program.java || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-java-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -97,9 +95,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-java-prog.ok l-java-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-java-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -136,14 +134,14 @@ msgstr "Le nouveau {1} remplace le vieux {0}." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-java-fr.po.tmp l-java-fr.po l-java-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-java-fr.po.tmp > l-java-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-java-fr.po l-java-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 : ${MSGFMT=msgfmt} -${MSGFMT} -j -d l-java -r prog -l fr l-java-fr.po || exit 1 +${MSGFMT} -j -d . -r prog -l fr fr.po || exit 1 # Test which of the fr_FR locales are installed. : ${LOCALE_FR=fr_FR} @@ -174,14 +172,14 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-java-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. 2 morceaux de gateau succulent Le nouveau EUR remplace le vieux FF. EOF -cat <<\EOF > l-java-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -193,12 +191,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=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 + 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 fi if test $LOCALE_FR_UTF8 != none; then - 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 + 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 fi exit 0 diff --git a/gettext-tools/tests/lang-javascript b/gettext-tools/tests/lang-javascript index 596dcbd..d450946 100755 --- a/gettext-tools/tests/lang-javascript +++ b/gettext-tools/tests/lang-javascript @@ -13,16 +13,16 @@ String.prototype.format = Format.format; const _ = Gettext.gettext; Gettext.textdomain ("prog"); -Gettext.bindtextdomain ("prog", "l-javascript"); +Gettext.bindtextdomain ("prog", "."); print(_("'Your command, please?', asked the waiter.")); print(_("%s is replaced by %s.").format("FF", "EUR")); EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-javascript-prog.tmp --omit-header --no-location prog.js || exit 1 -LC_ALL=C tr -d '\r' < l-javascript-prog.tmp > l-javascript-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.js || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-javascript-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -32,9 +32,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-javascript-prog.ok l-javascript-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-javascript-fr.po +cat <<\EOF > fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -48,18 +48,17 @@ msgstr "%s remplace %s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-javascript-fr.po.tmp l-javascript-fr.po l-javascript-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-javascript-fr.po.tmp > l-javascript-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-javascript-fr.po l-javascript-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-javascript/fr/LC_MESSAGES/prog.mo l-javascript-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of gjs. (gjs -h) >/dev/null 2>/dev/null \ @@ -98,11 +97,11 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-javascript-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. FF remplace EUR. EOF -cat <<\EOF > l-javascript-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. FF remplace EUR. EOF @@ -110,12 +109,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 > l-javascript-prog.out || exit 1 - ${DIFF} l-javascript-prog.ok l-javascript-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR gjs prog.js > prog.out || exit 1 + ${DIFF} prog.ok prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - 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 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gjs prog.js > prog.out || exit 1 + ${DIFF} -u prog.oku prog.out || exit 1 fi exit 0 diff --git a/gettext-tools/tests/lang-librep b/gettext-tools/tests/lang-librep index 6748252..1d10895 100755 --- a/gettext-tools/tests/lang-librep +++ b/gettext-tools/tests/lang-librep @@ -9,7 +9,7 @@ cat <<\EOF > prog.jl (require 'rep.i18n.gettext) (textdomain "prog") -(bindtextdomain "prog" "l-librep") +(bindtextdomain "prog" ".") (format standard-output "%s\n" (_ "'Your command, please?', asked the waiter.")) @@ -18,10 +18,10 @@ cat <<\EOF > prog.jl EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-librep-prog.tmp --omit-header --no-location prog.jl || exit 1 -LC_ALL=C tr -d '\r' < l-librep-prog.tmp > l-librep-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.jl || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-librep-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -31,9 +31,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-librep-prog.ok l-librep-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-librep-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -49,18 +49,17 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-librep-fr.po.tmp l-librep-fr.po l-librep-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-librep-fr.po.tmp > l-librep-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-librep-fr.po l-librep-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-librep/fr/LC_MESSAGES/prog.mo l-librep-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of rep version 0.15.3 or newer. (rep --version) >/dev/null 2>/dev/null \ @@ -99,11 +98,11 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-librep-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF -cat <<\EOF > l-librep-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -111,12 +110,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 > l-librep-prog.out || exit 1 - ${DIFF} l-librep-prog.ok l-librep-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR rep --no-rc --batch prog.jl > prog.out || exit 1 + ${DIFF} prog.ok prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - 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 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 rep --no-rc --batch prog.jl > prog.out || exit 1 + ${DIFF} prog.oku prog.out || exit 1 fi exit 0 diff --git a/gettext-tools/tests/lang-lua b/gettext-tools/tests/lang-lua index d6f8e71..175e111 100755 --- a/gettext-tools/tests/lang-lua +++ b/gettext-tools/tests/lang-lua @@ -7,7 +7,7 @@ cat <<\EOF > prog.lua require("gettext") -gettext.bindtextdomain("prog", "l-lua") +gettext.bindtextdomain("prog", ".") gettext.textdomain("prog") _ = gettext.gettext n = 42 @@ -18,10 +18,10 @@ print(string.format(_[==[%s is replaced by %s.]==], "FF", "EUR")) EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-lua-prog.tmp --omit-header --no-location prog.lua || exit 1 -LC_ALL=C tr -d '\r' < l-lua-prog.tmp > l-lua-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.lua || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<\EOF > l-lua-prog.ok +cat <<\EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -37,9 +37,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-lua-prog.ok l-lua-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-lua-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -60,18 +60,17 @@ msgstr "%s remplace %s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-lua-fr.po.tmp l-lua-fr.po l-lua-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-lua-fr.po.tmp > l-lua-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-lua-fr.po l-lua-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-lua/fr/LC_MESSAGES/prog.mo l-lua-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of lua version 5.0 or newer with gettext support. (lua -v) >/dev/null 2>/dev/null @@ -115,12 +114,12 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-lua-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 42 morceaux de gateau FF remplace EUR. EOF -cat <<\EOF > l-lua-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 42 morceaux de gateau FF remplace EUR. @@ -129,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 lua -l gettext prog.lua > l-lua-prog.out || exit 1 - ${DIFF} l-lua-prog.ok l-lua-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR lua -l gettext prog.lua > prog.out || exit 1 + ${DIFF} prog.ok prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - 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 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 lua -l gettext prog.lua > prog.out || exit 1 + ${DIFF} prog.oku prog.out || exit 1 fi exit 0 diff --git a/gettext-tools/tests/lang-objc b/gettext-tools/tests/lang-objc index 663e525..65fa92c 100755 --- a/gettext-tools/tests/lang-objc +++ b/gettext-tools/tests/lang-objc @@ -15,7 +15,7 @@ int main () exit (0); } EOF -${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-objc-hello hello.m 2>/dev/null \ +${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o hello hello.m 2>/dev/null \ || { echo "Skipping test: Objective C compiler not found" exit 77 } @@ -39,7 +39,7 @@ int main (int argc, char *argv[]) exit (77); textdomain ("prog"); - bindtextdomain ("prog", "l-objc"); + bindtextdomain ("prog", "."); printf (_("'Your command, please?', asked the waiter.")); printf ("\n"); @@ -62,15 +62,15 @@ ${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CFLAGS} \ : ${CONFIG_SHELL=${SHELL-/bin/sh}} ${CONFIG_SHELL} "$top_builddir"/libtool --quiet --tag=CC --mode=link \ - ${CC} ${CFLAGS} -o l-objc-prog prog.${OBJEXT} \ + ${CC} ${CFLAGS} -o prog prog.${OBJEXT} \ ../../gnulib-lib/libgettextlib.la ${LDFLAGS} ${LTLIBINTL} \ || exit 1 : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-objc-prog.tmp --omit-header --no-location -k_ prog.m || exit 1 -LC_ALL=C tr -d '\r' < l-objc-prog.tmp > l-objc-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location -k_ prog.m || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-objc-prog.ok +cat <<EOF > prog.ok #, c-format msgid "'Your command, please?', asked the waiter." msgstr "" @@ -87,9 +87,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-objc-prog.ok l-objc-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-objc-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -113,26 +113,25 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-objc-fr.po.tmp l-objc-fr.po l-objc-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-objc-fr.po.tmp > l-objc-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-objc-fr.po l-objc-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-objc/fr/LC_MESSAGES/prog.mo l-objc-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po : ${DIFF=diff} -cat <<\EOF > l-objc-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-objc-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -141,17 +140,17 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= ./l-objc-prog $LOCALE_FR 2 > l-objc-prog.out + LANGUAGE= ./prog $LOCALE_FR 2 > prog.out case $? in - 0) ${DIFF} l-objc-prog.ok l-objc-prog.out || exit 1;; + 0) ${DIFF} prog.ok prog.out || exit 1;; 77) LOCALE_FR=none;; *) exit 1;; esac fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= ./l-objc-prog $LOCALE_FR_UTF8 2 > l-objc-prog.out + LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out case $? in - 0) ${DIFF} l-objc-prog.oku l-objc-prog.out || exit 1;; + 0) ${DIFF} prog.oku 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 d269c57..17891ab 100755 --- a/gettext-tools/tests/lang-pascal +++ b/gettext-tools/tests/lang-pascal @@ -20,7 +20,7 @@ resourcestring currencies = '%s is replaced by %s.'; begin - translateresourcestrings('l-pascal/%s/LC_MESSAGES/pascalprog.mo'); + translateresourcestrings('%s/LC_MESSAGES/pascalprog.mo'); writeln(question); writeln(format(currencies, ['FF', 'EUR'])); end. @@ -34,10 +34,10 @@ EOF } : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-pascal-pascalprog.tmp --omit-header --add-location pascalprog.rst || exit 1 -LC_ALL=C tr -d '\r' < l-pascal-pascalprog.tmp > l-pascal-pascalprog.pot || exit 1 +${XGETTEXT} -o pascalprog.tmp --omit-header --add-location pascalprog.rst || exit 1 +LC_ALL=C tr -d '\r' < pascalprog.tmp > pascalprog.pot || exit 1 -cat <<EOF > l-pascal-pascalprog.ok +cat <<EOF > pascalprog.ok #: pascalprog.question msgid "'Your command, please?', asked the waiter." msgstr "" @@ -49,9 +49,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-pascal-pascalprog.ok l-pascal-pascalprog.pot || exit 1 +${DIFF} pascalprog.ok pascalprog.pot || exit 1 -cat <<\EOF > l-pascal-fr.po +cat <<\EOF > fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -67,25 +67,24 @@ msgstr "%1:s remplace %0:s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-pascal-fr.po.tmp l-pascal-fr.po l-pascal-pascalprog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-pascal-fr.po.tmp > l-pascal-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po pascalprog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-pascal-fr.po l-pascal-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-pascal/fr/LC_MESSAGES/pascalprog.mo l-pascal-fr.po +${MSGFMT} -o fr/LC_MESSAGES/pascalprog.mo fr.po : ${DIFF=diff} -cat <<\EOF > l-pascal-pascalprog.ok +cat <<\EOF > pascalprog.ok «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF -cat <<\EOF > l-pascal-pascalprog.oku +cat <<\EOF > pascalprog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -93,15 +92,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 ./pascalprog > l-pascal-pascalprog.out || exit 1 + LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR ./pascalprog > pascalprog.out || exit 1 : ${DIFF=diff} - ${DIFF} l-pascal-pascalprog.ok l-pascal-pascalprog.out || exit 1 + ${DIFF} pascalprog.ok 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 ./pascalprog > l-pascal-pascalprog.out || exit 1 + LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR_UTF8 ./pascalprog > pascalprog.out || exit 1 : ${DIFF=diff} - ${DIFF} l-pascal-pascalprog.oku l-pascal-pascalprog.out || exit 1 + ${DIFF} pascalprog.oku 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 ea317d6..b972b45 100755 --- a/gettext-tools/tests/lang-perl-1 +++ b/gettext-tools/tests/lang-perl-1 @@ -11,7 +11,7 @@ use strict; use Locale::Messages qw (textdomain bindtextdomain gettext ngettext); textdomain "prog"; -bindtextdomain "prog", "./l-perl-1"; +bindtextdomain "prog", "./"; my $n = 2; print gettext "'Your command, please?', asked the waiter."; print "\n"; @@ -24,10 +24,10 @@ EOF : ${XGETTEXT=xgettext} ${XGETTEXT} \ -k__ --flag=__:1:pass-perl-format --flag=__:1:pass-perl-brace-format \ - -o l-perl-1-prog.tmp --omit-header --no-location program1.pl || exit 1 -LC_ALL=C tr -d '\r' < l-perl-1-prog.tmp > l-perl-1-prog.pot || exit 1 + -o prog.tmp --omit-header --no-location program1.pl || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-perl-1-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -43,9 +43,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-perl-1-prog.ok l-perl-1-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-perl-1-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -68,26 +68,25 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-perl-1-fr.po.tmp l-perl-1-fr.po l-perl-1-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-perl-1-fr.po.tmp > l-perl-1-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-perl-1-fr.po l-perl-1-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-perl-1/fr/LC_MESSAGES/prog.mo l-perl-1-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po : ${DIFF=diff} -cat <<\EOF > l-perl-1-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-perl-1-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -102,12 +101,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 program1.pl > l-perl-1-prog.out || exit 1 - ${DIFF} l-perl-1-prog.ok l-perl-1-prog.out || exit 1 + LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program1.pl > prog.out || exit 1 + ${DIFF} prog.ok prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - 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 + LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program1.pl > prog.out || exit 1 + ${DIFF} prog.oku 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 5a8c30d..eb3701c 100755 --- a/gettext-tools/tests/lang-perl-2 +++ b/gettext-tools/tests/lang-perl-2 @@ -7,7 +7,7 @@ # Assumes the following packages are installed: perl, libintl-perl. cat <<\EOF > program2.pl -use Locale::TextDomain (prog => './l-perl-2'); +use Locale::TextDomain (prog => './'); my $n = 2; print __"'Your command, please?', asked the waiter."; print "\n"; @@ -23,10 +23,10 @@ ${XGETTEXT} \ -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 l-perl-2-prog.tmp --omit-header --no-location program2.pl || exit 1 -LC_ALL=C tr -d '\r' < l-perl-2-prog.tmp > l-perl-2-prog.pot || exit 1 + -o prog.tmp --omit-header --no-location program2.pl || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-perl-2-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -42,9 +42,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-perl-2-prog.ok l-perl-2-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-perl-2-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -67,26 +67,26 @@ msgstr "{new} remplace {old}." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-perl-2-fr.po.tmp l-perl-2-fr.po l-perl-2-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-perl-2-fr.po.tmp > l-perl-2-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-perl-2-fr.po l-perl-2-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-perl-2/fr/LC_MESSAGES/prog.mo l-perl-2-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po : ${DIFF=diff} -cat <<\EOF > l-perl-2-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-perl-2-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -101,12 +101,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 program2.pl > l-perl-2-prog.out || exit 1 - ${DIFF} l-perl-2-prog.ok l-perl-2-prog.out || exit 1 + LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program2.pl > prog.out || exit 1 + ${DIFF} prog.ok prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - 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 + LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program2.pl > prog.out || exit 1 + ${DIFF} prog.oku 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 3bc096d..e90ea1d 100755 --- a/gettext-tools/tests/lang-php +++ b/gettext-tools/tests/lang-php @@ -9,7 +9,7 @@ cat <<\EOF > prog.php <?php setlocale (LC_ALL, ""); textdomain ("prog"); - bindtextdomain ("prog", "l-php"); + bindtextdomain ("prog", "."); echo _("'Your command, please?', asked the waiter."); echo "\n"; printf(_("%s is replaced by %s."), "FF", "EUR"); @@ -18,10 +18,10 @@ cat <<\EOF > prog.php EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-php-prog.tmp --omit-header --no-location prog.php || exit 1 -LC_ALL=C tr -d '\r' < l-php-prog.tmp > l-php-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.php || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-php-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -31,9 +31,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-php-prog.ok l-php-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-php-fr.po +cat <<\EOF > fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -47,18 +47,17 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-php-fr.po.tmp l-php-fr.po l-php-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-php-fr.po.tmp > l-php-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-php-fr.po l-php-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-php/fr/LC_MESSAGES/prog.mo l-php-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of php version 4.0 or newer with gettext support. (php -v) >/dev/null 2>/dev/null @@ -102,11 +101,11 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-php-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF -cat <<\EOF > l-php-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -114,12 +113,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 > l-php-prog.out || exit 1 - ${DIFF} l-php-prog.ok l-php-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR php -q prog.php > prog.out || exit 1 + ${DIFF} prog.ok prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - 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 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 php -q prog.php > prog.out || exit 1 + ${DIFF} prog.oku prog.out || exit 1 fi exit 0 diff --git a/gettext-tools/tests/lang-po b/gettext-tools/tests/lang-po index 7b2824d..c04a343 100755 --- a/gettext-tools/tests/lang-po +++ b/gettext-tools/tests/lang-po @@ -21,15 +21,15 @@ msgstr "" EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-po-prog.tmp --omit-header --add-location prog-in.pot || exit 1 -LC_ALL=C tr -d '\r' < l-po-prog.tmp > l-po-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --add-location prog-in.pot || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 : ${DIFF=diff} -${DIFF} prog-in.pot l-po-prog.pot || exit 1 +${DIFF} prog-in.pot prog.pot || exit 1 # Test with PO format. -cat <<\EOF > l-po-prog-in.po +cat <<\EOF > prog-in.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -52,10 +52,10 @@ msgstr "%2$s remplace %1$s." EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-po-prog.tmp.po --omit-header --add-location l-po-prog-in.po || exit 1 -LC_ALL=C tr -d '\r' < l-po-prog.tmp.po > l-po-prog.po || exit 1 +${XGETTEXT} -o prog.tmp.po --omit-header --add-location prog-in.po || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp.po > prog.po || exit 1 : ${DIFF=diff} -${DIFF} l-po-prog-in.po l-po-prog.po || exit 1 +${DIFF} prog-in.po prog.po || exit 1 exit 0 diff --git a/gettext-tools/tests/lang-python-1 b/gettext-tools/tests/lang-python-1 index db91d47..2068bfa 100755 --- a/gettext-tools/tests/lang-python-1 +++ b/gettext-tools/tests/lang-python-1 @@ -11,7 +11,7 @@ cat <<\EOF > prog1.py import gettext gettext.textdomain('prog') -gettext.bindtextdomain('prog', 'l-python-1') +gettext.bindtextdomain('prog', '.') print gettext.gettext("'Your command, please?', asked the waiter.") print gettext.gettext("%(oldCurrency)s is replaced by %(newCurrency)s.") \ @@ -19,10 +19,10 @@ print gettext.gettext("%(oldCurrency)s is replaced by %(newCurrency)s.") \ EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-python-1-prog.tmp --omit-header --no-location prog1.py || exit 1 -LC_ALL=C tr -d '\r' < l-python-1-prog.tmp > l-python-1-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog1.py || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-python-1-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -32,9 +32,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-python-1-prog.ok l-python-1-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-python-1-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -50,18 +50,17 @@ msgstr "%(newCurrency)s remplace %(oldCurrency)s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-python-1-fr.po.tmp l-python-1-fr.po l-python-1-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-python-1-fr.po.tmp > l-python-1-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-python-1-fr.po l-python-1-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-python-1/fr/LC_MESSAGES/prog.mo l-python-1-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of python version 2.0 or newer. (python -V) >/dev/null 2>/dev/null \ @@ -72,11 +71,11 @@ case `python -c 'import sys; print sys.hexversion >= 0x20000F0'` in esac : ${DIFF=diff} -cat <<\EOF > l-python-1-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF -cat <<\EOF > l-python-1-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -84,13 +83,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 prog1.py > l-python-1-prog.out || exit 1 - ${DIFF} l-python-1-prog.ok l-python-1-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR python prog1.py > prog.out || exit 1 + ${DIFF} prog.ok 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 prog1.py > l-python-1-prog.out || exit 1 - ${DIFF} l-python-1-prog.oku l-python-1-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog1.py > prog.out || exit 1 + ${DIFF} prog.oku 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 eb58c1a..ca78d7a 100755 --- a/gettext-tools/tests/lang-python-2 +++ b/gettext-tools/tests/lang-python-2 @@ -15,7 +15,7 @@ import gettext n = int(sys.argv[1]) gettext.textdomain('prog') -gettext.bindtextdomain('prog', 'l-python-2') +gettext.bindtextdomain('prog', '.') print gettext.gettext("'Your command, please?', asked the waiter.") print gettext.ngettext("a piece of cake","%(count)d pieces of cake",n) \ @@ -25,10 +25,10 @@ print gettext.gettext("%(oldCurrency)s is replaced by %(newCurrency)s.") \ EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-python-2-prog.tmp --omit-header --no-location prog2.py || exit 1 -LC_ALL=C tr -d '\r' < l-python-2-prog.tmp > l-python-2-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog2.py || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-python-2-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -44,9 +44,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-python-2-prog.ok l-python-2-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-python-2-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -69,18 +69,17 @@ msgstr "%(newCurrency)s remplace %(oldCurrency)s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-python-2-fr.po.tmp l-python-2-fr.po l-python-2-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-python-2-fr.po.tmp > l-python-2-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-python-2-fr.po l-python-2-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-python-2/fr/LC_MESSAGES/prog.mo l-python-2-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of python version 2.3 or newer. (python -V) >/dev/null 2>/dev/null \ @@ -91,12 +90,12 @@ case `python -c 'import sys; print sys.hexversion >= 0x20300F0'` in esac : ${DIFF=diff} -cat <<\EOF > l-python-2-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-python-2-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. @@ -105,13 +104,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 prog2.py 2 > l-python-2-prog.out || exit 1 - ${DIFF} l-python-2-prog.ok l-python-2-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR python prog2.py 2 > prog.out || exit 1 + ${DIFF} prog.ok 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 prog2.py 2 > l-python-2-prog.out || exit 1 - ${DIFF} l-python-2-prog.oku l-python-2-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog2.py 2 > prog.out || exit 1 + ${DIFF} prog.oku 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 95fc934..6758564 100755 --- a/gettext-tools/tests/lang-rst +++ b/gettext-tools/tests/lang-rst @@ -20,10 +20,10 @@ rstconv.InvalidOutputFormat='Invalid output format -' EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-rst-prog.tmp --omit-header --add-location prog.rst || exit 1 -LC_ALL=C tr -d '\r' < l-rst-prog.tmp > l-rst-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --add-location prog.rst || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-rst-prog.ok +cat <<EOF > prog.ok #: rstconv.help msgid "" "rstconv [-h|--help] Displays this help\n" @@ -54,7 +54,7 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-rst-prog.ok l-rst-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 # The output of rstconv is slightly different: # - ModuleName:ConstName instead of ModuleName.ConstName @@ -62,9 +62,9 @@ ${DIFF} l-rst-prog.ok l-rst-prog.pot || exit 1 # - extra newline at the end : ${RSTCONV=rstconv} -if (${RSTCONV} -o l-rst-prog.pot -i prog.rst) >/dev/null 2>&1; then +if (${RSTCONV} -o prog.pot -i prog.rst) >/dev/null 2>&1; then -cat <<EOF > l-rst-prog.ok1 +cat <<EOF > 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 "" @@ -87,7 +87,7 @@ msgstr "" EOF -cat <<EOF > l-rst-prog.ok2 +cat <<EOF > prog.ok2 #: rstconv:help msgid "" "rstconv [-h|--help] Displays this help\n" @@ -119,7 +119,7 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-rst-prog.ok1 l-rst-prog.pot >/dev/null || ${DIFF} l-rst-prog.ok2 l-rst-prog.pot || exit 1 +${DIFF} prog.ok1 prog.pot >/dev/null || ${DIFF} prog.ok2 prog.pot || exit 1 fi diff --git a/gettext-tools/tests/lang-sh b/gettext-tools/tests/lang-sh index a4bb1fd..22da222 100755 --- a/gettext-tools/tests/lang-sh +++ b/gettext-tools/tests/lang-sh @@ -17,7 +17,7 @@ n=$1 TEXTDOMAIN=prog export TEXTDOMAIN -TEXTDOMAINDIR=l-sh +TEXTDOMAINDIR=. export TEXTDOMAINDIR $echo "`gettext \"'Your command, please?', asked the waiter.\"`" @@ -26,10 +26,10 @@ $echo "`eval_ngettext \"a piece of cake\" \"\\$n pieces of cake\" $n`" EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-sh-prog.tmp --omit-header --no-location prog.sh || exit 1 -LC_ALL=C tr -d '\r' < l-sh-prog.tmp > l-sh-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.sh || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<\EOF > l-sh-prog.ok +cat <<\EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -41,9 +41,9 @@ msgstr[1] "" EOF : ${DIFF=diff} -${DIFF} l-sh-prog.ok l-sh-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-sh-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -61,18 +61,17 @@ msgstr[1] "$n morceaux de gateau" EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-sh-fr.po.tmp l-sh-fr.po l-sh-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-sh-fr.po.tmp > l-sh-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-sh-fr.po l-sh-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-sh/fr/LC_MESSAGES/prog.mo l-sh-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test which of the fr_FR locales are installed. : ${LOCALE_FR=fr_FR} @@ -103,11 +102,11 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then fi : ${DIFF=diff} -cat <<\EOF > l-sh-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EOF -cat <<\EOF > l-sh-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EOF @@ -115,12 +114,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 > l-sh-prog.out || exit 1 - ${DIFF} l-sh-prog.ok l-sh-prog.out || exit 1 + LANGUAGE= LC_ALL=$LOCALE_FR sh ./prog.sh 2 > prog.out || exit 1 + ${DIFF} prog.ok prog.out || exit 1 fi if test $LOCALE_FR_UTF8 != none; then - 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 + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 sh ./prog.sh 2 > prog.out || exit 1 + ${DIFF} prog.oku prog.out || exit 1 fi exit 0 diff --git a/gettext-tools/tests/lang-smalltalk b/gettext-tools/tests/lang-smalltalk index 799ee69..e2bff00 100755 --- a/gettext-tools/tests/lang-smalltalk +++ b/gettext-tools/tests/lang-smalltalk @@ -12,12 +12,12 @@ Object subclass: #Main instanceVariableNames: '' classVariableNames: 'NLS' poolDictionaries: '' - category: 'L-Smalltalk-Program' + category: 'Program' ! !Main methodsFor: 'running'! run | n | - NLS := I18N Locale default messages domain: 'prog' localeDirectory: 'l-smalltalk'. + NLS := I18N Locale default messages domain: 'prog' localeDirectory: '.'. n := 2. Transcript showCr: (NLS ? '''Your command, please?'', asked the waiter.'). @@ -31,10 +31,10 @@ Main new run! EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-smalltalk-prog.tmp --omit-header --no-location prog.st || exit 1 -LC_ALL=C tr -d '\r' < l-smalltalk-prog.tmp > l-smalltalk-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.st || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-smalltalk-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -50,9 +50,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-smalltalk-prog.ok l-smalltalk-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-smalltalk-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -75,18 +75,17 @@ msgstr "%2 remplace %1." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-smalltalk-fr.po.tmp l-smalltalk-fr.po l-smalltalk-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-smalltalk-fr.po.tmp > l-smalltalk-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-smalltalk-fr.po l-smalltalk-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -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 +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-smalltalk/fr/LC_MESSAGES/prog.mo l-smalltalk-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of gst version 2.0.6 or newer. (gst --version) >/dev/null 2>/dev/null \ @@ -97,39 +96,39 @@ case `gst --version | sed -n -e 1p | sed -e 's/^[^0-9]*//'` in esac : ${DIFF=diff} -cat <<\EOF > l-smalltalk-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. EOF -cat <<\EOF > l-smalltalk-prog.oku +cat <<\EOF > 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 l-smalltalk-prog.ok; } > l-smalltalk-prog.ok2 -{ echo 'Loading package I18N'; cat l-smalltalk-prog.oku; } > l-smalltalk-prog.oku2 +{ echo 'Loading package I18N'; cat prog.ok; } > prog.ok2 +{ echo 'Loading package I18N'; cat prog.oku; } > 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 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 +{ 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 : ${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 > 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; } + 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; } fi if test $LOCALE_FR_UTF8 != none; then - 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; } + 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; } 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 d05ebeb..5f6ee8d 100755 --- a/gettext-tools/tests/lang-tcl +++ b/gettext-tools/tests/lang-tcl @@ -15,17 +15,17 @@ cat <<\EOF > program.tcl #!/usr/bin/env tclsh package require msgcat -::msgcat::mcload [file join [file dirname [info script]] l-tcl msgs] +::msgcat::mcload [file join [file dirname [info script]] . 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 : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-tcl-prog.tmp --omit-header -k_ program.tcl || exit 1 -LC_ALL=C tr -d '\r' < l-tcl-prog.tmp > l-tcl-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header -k_ program.tcl || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-tcl-prog.ok +cat <<EOF > prog.ok #: program.tcl:5 msgid "'Your command, please?', asked the waiter." msgstr "" @@ -37,9 +37,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-tcl-prog.ok l-tcl-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-tcl-fr.po +cat <<\EOF > fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -55,34 +55,33 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-tcl-fr.po.tmp l-tcl-fr.po l-tcl-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-tcl-fr.po.tmp > l-tcl-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-tcl-fr.po l-tcl-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -test -d l-tcl || mkdir l-tcl -test -d l-tcl/msgs || mkdir l-tcl/msgs +test -d msgs || mkdir msgs : ${MSGFMT=msgfmt} -${MSGFMT} --tcl -d l-tcl/msgs -l fr l-tcl-fr.po || exit 1 +${MSGFMT} --tcl -d msgs -l fr fr.po || exit 1 # Test for presence of tclsh with msgcat extension. -cat <<\EOF > l-tcl-version.tcl +cat <<\EOF > version.tcl package require msgcat puts $tcl_version EOF -(tclsh l-tcl-version.tcl) >/dev/null 2>/dev/null \ +(tclsh version.tcl) >/dev/null 2>/dev/null \ || { echo "Skipping test: tclsh not found or msgcat extension not present" exit 77 } : ${DIFF=diff} -cat <<\EOF > l-tcl-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF -cat <<\EOF > l-tcl-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -90,14 +89,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 > 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 + 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 fi if test $LOCALE_FR_UTF8 != none; then - 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 + 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 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-vala b/gettext-tools/tests/lang-vala index e442928..ae2cd2d 100755 --- a/gettext-tools/tests/lang-vala +++ b/gettext-tools/tests/lang-vala @@ -5,11 +5,11 @@ # Assumes an fr_FR locale is installed. # Assumes the following packages are installed: vala. -cat <<\EOF > l-vala-prog.vala +cat <<\EOF > prog.vala int main (string[] args) { Intl.setlocale (LocaleCategory.ALL, ""); Intl.textdomain ("prog"); - Intl.bindtextdomain ("prog", "l-vala"); + Intl.bindtextdomain ("prog", "."); stdout.printf ("%s\n", _("'Your command, please?', asked the waiter.")); stdout.printf ("%s\n", _("%s is replaced by %s.").printf ("FF", "EUR")); return 0; @@ -22,14 +22,14 @@ test $? -le 1 \ || { echo "Skipping test: valac not found"; exit 77; } : ${VALAC=valac} -${VALAC} --Xcc=-DGETTEXT_PACKAGE=\"prog\" l-vala-prog.vala 2>l-vala-prog.err \ - || { cat l-vala-prog.err 1>&2; exit 1; } +${VALAC} --Xcc=-DGETTEXT_PACKAGE=\"prog\" prog.vala 2>prog.err \ + || { cat prog.err 1>&2; exit 1; } : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-vala-prog.tmp --omit-header --no-location l-vala-prog.vala || exit 1 -LC_ALL=C tr -d '\r' < l-vala-prog.tmp > l-vala-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.vala || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-vala-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -39,9 +39,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-vala-prog.ok l-vala-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-vala-fr.po +cat <<\EOF > fr.po msgid "" msgstr "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -55,25 +55,24 @@ msgstr "%2$s remplace %1$s." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-vala-fr.po.tmp l-vala-fr.po l-vala-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-vala-fr.po.tmp > l-vala-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-vala-fr.po l-vala-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 -test -d l-vala || mkdir l-vala -test -d l-vala/fr || mkdir l-vala/fr -test -d l-vala/fr/LC_MESSAGES || mkdir l-vala/fr/LC_MESSAGES +test -d fr || mkdir fr +test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} -${MSGFMT} -o l-vala/fr/LC_MESSAGES/prog.mo l-vala-fr.po +${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po : ${DIFF=diff} -cat <<\EOF > l-vala-prog.ok +cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF -cat <<\EOF > l-vala-prog.oku +cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. EUR remplace FF. EOF @@ -81,17 +80,17 @@ EOF : ${LOCALE_FR=fr_FR} : ${LOCALE_FR_UTF8=fr_FR.UTF-8} if test $LOCALE_FR != none; then - LANGUAGE= LC_ALL=$LOCALE_FR ./l-vala-prog > l-vala-prog.out + LANGUAGE= LC_ALL=$LOCALE_FR ./prog > prog.out case $? in - 0) ${DIFF} l-vala-prog.ok l-vala-prog.out || exit 1;; + 0) ${DIFF} prog.ok prog.out || exit 1;; 77) LOCALE_FR=none;; *) exit 1;; esac fi if test $LOCALE_FR_UTF8 != none; then - LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 ./l-vala-prog > l-vala-prog.out + LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 ./prog > prog.out case $? in - 0) ${DIFF} l-vala-prog.oku l-vala-prog.out || exit 1;; + 0) ${DIFF} prog.oku prog.out || exit 1;; 77) LOCALE_FR_UTF8=none;; *) exit 1;; esac diff --git a/gettext-tools/tests/lang-ycp b/gettext-tools/tests/lang-ycp index fba8b12..941d8c2 100755 --- a/gettext-tools/tests/lang-ycp +++ b/gettext-tools/tests/lang-ycp @@ -14,10 +14,10 @@ cat <<\EOF > prog.ycp EOF : ${XGETTEXT=xgettext} -${XGETTEXT} -o l-ycp-prog.tmp --omit-header --no-location prog.ycp || exit 1 -LC_ALL=C tr -d '\r' < l-ycp-prog.tmp > l-ycp-prog.pot || exit 1 +${XGETTEXT} -o prog.tmp --omit-header --no-location prog.ycp || exit 1 +LC_ALL=C tr -d '\r' < prog.tmp > prog.pot || exit 1 -cat <<EOF > l-ycp-prog.ok +cat <<EOF > prog.ok msgid "'Your command, please?', asked the waiter." msgstr "" @@ -33,9 +33,9 @@ msgstr "" EOF : ${DIFF=diff} -${DIFF} l-ycp-prog.ok l-ycp-prog.pot || exit 1 +${DIFF} prog.ok prog.pot || exit 1 -cat <<\EOF > l-ycp-fr.po +cat <<\EOF > fr.po msgid "" msgstr "" "Content-Type: text/plain; charset=ISO-8859-1\n" @@ -58,10 +58,10 @@ msgstr "%2 remplace %1." EOF : ${MSGMERGE=msgmerge} -${MSGMERGE} -q -o l-ycp-fr.po.tmp l-ycp-fr.po l-ycp-prog.pot || exit 1 -LC_ALL=C tr -d '\r' < l-ycp-fr.po.tmp > l-ycp-fr.po.new || exit 1 +${MSGMERGE} -q -o fr.po.tmp fr.po prog.pot || exit 1 +LC_ALL=C tr -d '\r' < fr.po.tmp > fr.po.new || exit 1 : ${DIFF=diff} -${DIFF} l-ycp-fr.po l-ycp-fr.po.new || exit 1 +${DIFF} fr.po fr.po.new || exit 1 exit 0 |