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