1 1.1 christos #! /bin/sh 2 1.1 christos 3 1.1 christos # Test comparison with PO files with previous msgids. 4 1.1 christos # Test --use-fuzzy option. 5 1.1 christos 6 1.1 christos tmpfiles="" 7 1.1 christos trap 'rm -fr $tmpfiles' 1 2 3 15 8 1.1 christos 9 1.1 christos tmpfiles="$tmpfiles mc-test4.pot" 10 1.1 christos cat <<\EOF > mc-test4.pot 11 1.1 christos # SOME DESCRIPTIVE TITLE. 12 1.1 christos # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 13 1.1 christos # This file is distributed under the same license as the PACKAGE package. 14 1.1 christos # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 15 1.1 christos # 16 1.1 christos #, fuzzy 17 1.1 christos msgid "" 18 1.1 christos msgstr "" 19 1.1 christos "Project-Id-Version: PACKAGE VERSION\n" 20 1.1 christos "Report-Msgid-Bugs-To: \n" 21 1.1 christos "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 22 1.1 christos "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 23 1.1 christos "Language-Team: LANGUAGE <LL (at] li.org>\n" 24 1.1 christos "MIME-Version: 1.0\n" 25 1.1 christos "Content-Type: text/plain; charset=UTF-8\n" 26 1.1 christos "Content-Transfer-Encoding: 8bit\n" 27 1.1 christos 28 1.1 christos #. TRANSLATORS: An error message. 29 1.1 christos #: src/args.c:242 30 1.1 christos #, c-format 31 1.1 christos msgid "Too many arguments." 32 1.1 christos msgstr "" 33 1.1 christos 34 1.1 christos #. TRANSLATORS: An error message. 35 1.1 christos #: src/args.c:247 36 1.1 christos #, c-format 37 1.1 christos msgid "Too few arguments." 38 1.1 christos msgstr "" 39 1.1 christos 40 1.1 christos # Oder besser "fehlende Argumente"? 41 1.1 christos #. TRANSLATORS: An error message. 42 1.1 christos #: src/args.c:273 43 1.1 christos #, c-format 44 1.1 christos msgid "Missing arguments." 45 1.1 christos msgstr "" 46 1.1 christos EOF 47 1.1 christos 48 1.1 christos tmpfiles="$tmpfiles mc-test4.po1" 49 1.1 christos cat <<\EOF > mc-test4.po1 50 1.1 christos msgid "" 51 1.1 christos msgstr "" 52 1.1 christos "Report-Msgid-Bugs-To: \n" 53 1.1 christos "Content-Type: text/plain; charset=UTF-8\n" 54 1.1 christos "Content-Transfer-Encoding: 8bit\n" 55 1.1 christos 56 1.1 christos #. TRANSLATORS: An error message. 57 1.1 christos #: src/args.c:242 58 1.1 christos #, fuzzy, c-format 59 1.1 christos #| msgid "too many arguments" 60 1.1 christos msgid "Too many arguments." 61 1.1 christos msgstr "zu viele Argumente" 62 1.1 christos 63 1.1 christos #. TRANSLATORS: An error message. 64 1.1 christos #: src/args.c:247 65 1.1 christos #, fuzzy, c-format 66 1.1 christos #| msgid "too many arguments" 67 1.1 christos msgid "Too few arguments." 68 1.1 christos msgstr "zu viele Argumente" 69 1.1 christos 70 1.1 christos # Oder besser "fehlende Argumente"? 71 1.1 christos #. TRANSLATORS: An error message. 72 1.1 christos #: src/args.c:273 73 1.1 christos #, fuzzy, c-format 74 1.1 christos #| msgid "missing arguments" 75 1.1 christos msgid "Missing arguments." 76 1.1 christos msgstr "Argumente fehlen" 77 1.1 christos 78 1.1 christos #: getopt.c:796 getopt.c:799 79 1.1 christos #, fuzzy, c-format 80 1.1 christos #| msgid "%s: invalid option -- %c\n" 81 1.1 christos msgid "%s: illegal option -- %c\n" 82 1.1 christos msgstr "%s: ungltige Option -- %c\n" 83 1.1 christos 84 1.1 christos #: getopt.c:805 getopt.c:808 85 1.1 christos #, c-format 86 1.1 christos msgid "%s: invalid option -- %c\n" 87 1.1 christos msgstr "%s: ungltige Option -- %c\n" 88 1.1 christos EOF 89 1.1 christos 90 1.1 christos # Verify that with fuzzies, all msgids of the POT file are covered. 91 1.1 christos tmpfiles="$tmpfiles mc-test4.out11" 92 1.1 christos : ${MSGCMP=msgcmp} 93 1.1 christos LC_MESSAGES=C LC_ALL= \ 94 1.1 christos ${MSGCMP} --use-fuzzy mc-test4.po1 mc-test4.pot > mc-test4.out11 2>&1 95 1.1 christos test $? = 0 || { rm -fr $tmpfiles; exit 1; } 96 1.1 christos if grep -v 'warning:' mc-test4.out11 > /dev/null; then 97 1.1 christos rm -fr $tmpfiles; exit 1; 98 1.1 christos fi 99 1.1 christos 100 1.1 christos # Verify that without fuzzies, not all msgids of the POT file are covered. 101 1.1 christos tmpfiles="$tmpfiles mc-test4.out12" 102 1.1 christos : ${MSGCMP=msgcmp} 103 1.1 christos LC_MESSAGES=C LC_ALL= \ 104 1.1 christos ${MSGCMP} mc-test4.po1 mc-test4.pot > mc-test4.out12 2>&1 105 1.1 christos test $? = 1 || { rm -fr $tmpfiles; exit 1; } 106 1.1 christos grep -v 'warning:' mc-test4.out12 > /dev/null 107 1.1 christos test $? = 0 || { rm -fr $tmpfiles; exit 1; } 108 1.1 christos 109 1.1 christos tmpfiles="$tmpfiles mc-test4.po2" 110 1.1 christos cat <<\EOF > mc-test4.po2 111 1.1 christos msgid "" 112 1.1 christos msgstr "" 113 1.1 christos "Report-Msgid-Bugs-To: \n" 114 1.1 christos "Content-Type: text/plain; charset=UTF-8\n" 115 1.1 christos "Content-Transfer-Encoding: 8bit\n" 116 1.1 christos 117 1.1 christos #. TRANSLATORS: An error message. 118 1.1 christos #: src/args.c:242 119 1.1 christos #, c-format 120 1.1 christos #| msgid "too many arguments" 121 1.1 christos msgid "Too many arguments." 122 1.1 christos msgstr "Zu viele Argumente." 123 1.1 christos 124 1.1 christos #. TRANSLATORS: An error message. 125 1.1 christos #: src/args.c:247 126 1.1 christos #, c-format 127 1.1 christos #| msgid "too many arguments" 128 1.1 christos msgid "Too few arguments." 129 1.1 christos msgstr "Zu wenige Argumente." 130 1.1 christos 131 1.1 christos # Oder besser "fehlende Argumente"? 132 1.1 christos #. TRANSLATORS: An error message. 133 1.1 christos #: src/args.c:273 134 1.1 christos #, c-format 135 1.1 christos #| msgid "missing arguments" 136 1.1 christos msgid "Missing arguments." 137 1.1 christos msgstr "Argumente fehlen." 138 1.1 christos 139 1.1 christos #: getopt.c:796 getopt.c:799 140 1.1 christos #, fuzzy, c-format 141 1.1 christos #| msgid "%s: invalid option -- %c\n" 142 1.1 christos msgid "%s: illegal option -- %c\n" 143 1.1 christos msgstr "%s: ungltige Option -- %c\n" 144 1.1 christos 145 1.1 christos #: getopt.c:805 getopt.c:808 146 1.1 christos #, c-format 147 1.1 christos msgid "%s: invalid option -- %c\n" 148 1.1 christos msgstr "%s: ungltige Option -- %c\n" 149 1.1 christos EOF 150 1.1 christos 151 1.1 christos # Verify that without fuzzies, all msgids of the POT file are covered. 152 1.1 christos # Verify that previous msgids are ignored even when specified on non-fuzzy 153 1.1 christos # messages. 154 1.1 christos tmpfiles="$tmpfiles mc-test4.out2" 155 1.1 christos : ${MSGCMP=msgcmp} 156 1.1 christos LC_MESSAGES=C LC_ALL= \ 157 1.1 christos ${MSGCMP} mc-test4.po2 mc-test4.pot > mc-test4.out2 2>&1 158 1.1 christos test $? = 0 || { rm -fr $tmpfiles; exit 1; } 159 1.1 christos if grep -v 'warning:' mc-test4.out2 > /dev/null; then 160 1.1 christos rm -fr $tmpfiles; exit 1; 161 1.1 christos fi 162 1.1 christos 163 1.1 christos rm -fr $tmpfiles 164 1.1 christos 165 1.1 christos exit $result 166