diff options
Diffstat (limited to 'gettext-tools/tests/lang-sh')
-rwxr-xr-x | gettext-tools/tests/lang-sh | 49 |
1 files changed, 25 insertions, 24 deletions
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 gar�on. 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 |