#! /bin/sh # Test msgmerge when a msgid_plural changed but msgid remained the same, # and --previous was specified. # Reported by Chusslove Illich (Часлав Илић). tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles mm-test23.po" cat <<\EOF > mm-test23.po msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-01-13 16:59+0100\n" "PO-Revision-Date: 2007-06-28 16:37+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\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" #, c-format msgid "%n lines" msgstr "" #, c-format msgid "%n areas" msgstr "%n Flächen" #, c-format msgid "One object" msgid_plural "%n objects" msgstr[0] "" msgstr[1] "" #, c-format msgid "One volume" msgid_plural "%n volumes" msgstr[0] "Ein Band" msgstr[1] "%n Bände" EOF tmpfiles="$tmpfiles mm-test23.pot" cat <<\EOF > mm-test23.pot msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-01-13 16:59+0100\n" "PO-Revision-Date: 2007-06-28 16:37+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #, kde-format msgid "%1 lines" msgstr "" #, kde-format msgid "%1 areas" msgstr "" #, kde-format msgid "One object" msgid_plural "%1 objects" msgstr[0] "" msgstr[1] "" #, kde-format msgid "One volume" msgid_plural "%1 volumes" msgstr[0] "" msgstr[1] "" EOF tmpfiles="$tmpfiles mm-test23.tmp.po mm-test23.new.po" : ${MSGMERGE=msgmerge} ${MSGMERGE} -q --previous -o mm-test23.tmp.po mm-test23.po mm-test23.pot test $? = 0 || { rm -fr $tmpfiles; exit 1; } LC_ALL=C tr -d '\r' < mm-test23.tmp.po > mm-test23.new.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles mm-test23.ok" cat <<\EOF > mm-test23.ok msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-01-13 16:59+0100\n" "PO-Revision-Date: 2007-06-28 16:37+0200\n" "Last-Translator: \n" "Language-Team: \n" "Language: de\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" #, kde-format msgid "%1 lines" msgstr "" #, fuzzy, kde-format #| msgid "%n areas" msgid "%1 areas" msgstr "%n Flächen" #, kde-format msgid "One object" msgid_plural "%1 objects" msgstr[0] "" msgstr[1] "" #, fuzzy, kde-format #| msgid "One volume" #| msgid_plural "%n volumes" msgid "One volume" msgid_plural "%1 volumes" msgstr[0] "Ein Band" msgstr[1] "%n Bände" EOF : ${DIFF=diff} ${DIFF} mm-test23.ok mm-test23.new.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } tmpfiles="$tmpfiles mm-test23.mo" : ${MSGFMT=msgfmt} ${MSGFMT} --check -o mm-test23.mo mm-test23.new.po test $? = 0 || { rm -fr $tmpfiles; exit 1; } rm -fr $tmpfiles exit 0