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