diff options
author | Bruno Haible <bruno@clisp.org> | 2007-10-20 21:55:49 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:15:20 +0200 |
commit | 4c48345df67797fc67814c2611609814b5fbdc1b (patch) | |
tree | 09f663503f0405c8d835adf41677e64dc0313bc0 /gettext-tools/tests/msgmerge-22 | |
parent | 8916b54d3ddc3f28b56fa11d351ee143c63efb1b (diff) | |
download | external_gettext-4c48345df67797fc67814c2611609814b5fbdc1b.zip external_gettext-4c48345df67797fc67814c2611609814b5fbdc1b.tar.gz external_gettext-4c48345df67797fc67814c2611609814b5fbdc1b.tar.bz2 |
Set a message fuzzy if the msgid_plural has changed.
Diffstat (limited to 'gettext-tools/tests/msgmerge-22')
-rw-r--r-- | gettext-tools/tests/msgmerge-22 | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/gettext-tools/tests/msgmerge-22 b/gettext-tools/tests/msgmerge-22 new file mode 100644 index 0000000..75fed04 --- /dev/null +++ b/gettext-tools/tests/msgmerge-22 @@ -0,0 +1,90 @@ +#! /bin/sh + +# Test msgmerge when a msgid_plural changed but msgid remained the same. +# Reported by Chusslove Illich (Часлав Илић). + +tmpfiles="" +trap 'rm -fr $tmpfiles' 1 2 3 15 + +tmpfiles="$tmpfiles mm-test22.po" +cat <<\EOF > mm-test22.po +msgid "" +msgstr "" +"Project-Id-Version: GNU gettext-tools 0.16\n" +"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n" +"POT-Creation-Date: 2007-10-18 02:57+0200\n" +"PO-Revision-Date: 2007-06-28 16:37+0200\n" +"Last-Translator: Karl Eichwalder <ke@suse.de>\n" +"Language-Team: German <translation-team-de@lists.sourceforge.net>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +msgid "Add resource from addressbook" +msgid_plural "Add %n resources from addressbook" +msgstr[0] "Engadir un recurso dende o libro de enderezos" +msgstr[1] "Engadir %n recursos dende o libro de enderezos" +EOF + +tmpfiles="$tmpfiles mm-test22.pot" +cat <<\EOF > mm-test22.pot +msgid "" +msgstr "" +"Project-Id-Version: GNU gettext-tools 0.16\n" +"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n" +"POT-Creation-Date: 2007-10-19 02:57+0200\n" +"PO-Revision-Date: 2007-06-28 16:37+0200\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Add resource from addressbook" +msgid_plural "Add %1 resources from addressbook" +msgstr[0] "" +msgstr[1] "" +EOF + +tmpfiles="$tmpfiles mm-test22.tmp.po mm-test22.new.po" +: ${MSGMERGE=msgmerge} +${MSGMERGE} -q -o mm-test22.tmp.po mm-test22.po mm-test22.pot +test $? = 0 || { rm -fr $tmpfiles; exit 1; } +tr -d '\r' < mm-test22.tmp.po > mm-test22.new.po +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-test22.ok" +cat <<\EOF > mm-test22.ok +msgid "" +msgstr "" +"Project-Id-Version: GNU gettext-tools 0.16\n" +"Report-Msgid-Bugs-To: bug-gnu-gettext@gnu.org\n" +"POT-Creation-Date: 2007-10-19 02:57+0200\n" +"PO-Revision-Date: 2007-06-28 16:37+0200\n" +"Last-Translator: Karl Eichwalder <ke@suse.de>\n" +"Language-Team: German <translation-team-de@lists.sourceforge.net>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#, fuzzy +msgid "Add resource from addressbook" +msgid_plural "Add %1 resources from addressbook" +msgstr[0] "Engadir un recurso dende o libro de enderezos" +msgstr[1] "Engadir %n recursos dende o libro de enderezos" +EOF + +: ${DIFF=diff} +${DIFF} mm-test22.ok mm-test22.new.po +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +tmpfiles="$tmpfiles mm-test22.mo" +: ${MSGFMT=msgfmt} +${MSGFMT} --check -o mm-test22.mo mm-test22.new.po +test $? = 0 || { rm -fr $tmpfiles; exit 1; } + +rm -fr $tmpfiles + +exit 0 |