• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test merging of a message which has plural forms in ref.pot but not
5# in def.po.
6
7cat <<EOF > mm-test11.po
8# SOME DESCRIPTIVE TITLE.
9# Copyright (C) YEAR Free Software Foundation, Inc.
10# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
11#
12msgid ""
13msgstr ""
14"Project-Id-Version: cog_training 1.0\n"
15"POT-Creation-Date: 2001-04-29 22:40+0200\n"
16"PO-Revision-Date: 2001-04-29 21:19+02:00\n"
17"Last-Translator: Felix N. <xyz@zyx.uucp>\n"
18"Language-Team: German <de@li.org>\n"
19"MIME-Version: 1.0\n"
20"Content-Type: text/plain; charset=ISO-8859-1\n"
21"Content-Transfer-Encoding: 8bit\n"
22"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
23"%100==4 ? 2 : 3);\n"
24
25#:foobar.c:29
26#, c-format
27msgid "%d error"
28msgstr "%d erreur"
29EOF
30
31cat <<EOF > mm-test11.pot
32# SOME DESCRIPTIVE TITLE.
33# Copyright (C) YEAR Free Software Foundation, Inc.
34# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
35#
36msgid ""
37msgstr ""
38"Project-Id-Version: PACKAGE VERSION\n"
39"POT-Creation-Date: 2001-04-30 18:51+0200\n"
40"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
41"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
42"Language-Team: LANGUAGE <LL@li.org>\n"
43"MIME-Version: 1.0\n"
44"Content-Type: text/plain; charset=ISO-8859-1\n"
45"Content-Transfer-Encoding: 8bit\n"
46
47#:foobar.c:32
48#, c-format
49msgid "%d error"
50msgid_plural "%d errors"
51msgstr[0] ""
52msgstr[1] ""
53EOF
54
55: ${MSGMERGE=msgmerge}
56${MSGMERGE} -q -o mm-test11.tmp mm-test11.po mm-test11.pot || Exit 1
57LC_ALL=C tr -d '\r' < mm-test11.tmp > mm-test11.out || Exit 1
58
59cat <<EOF > mm-test11.ok
60# SOME DESCRIPTIVE TITLE.
61# Copyright (C) YEAR Free Software Foundation, Inc.
62# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
63#
64msgid ""
65msgstr ""
66"Project-Id-Version: cog_training 1.0\n"
67"POT-Creation-Date: 2001-04-30 18:51+0200\n"
68"PO-Revision-Date: 2001-04-29 21:19+02:00\n"
69"Last-Translator: Felix N. <xyz@zyx.uucp>\n"
70"Language-Team: German <de@li.org>\n"
71"Language: de\n"
72"MIME-Version: 1.0\n"
73"Content-Type: text/plain; charset=ISO-8859-1\n"
74"Content-Transfer-Encoding: 8bit\n"
75"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
76"%100==4 ? 2 : 3);\n"
77
78#: foobar.c:32
79#, fuzzy, c-format
80msgid "%d error"
81msgid_plural "%d errors"
82msgstr[0] "%d erreur"
83msgstr[1] "%d erreur"
84msgstr[2] "%d erreur"
85msgstr[3] "%d erreur"
86EOF
87
88: ${DIFF=diff}
89${DIFF} mm-test11.ok mm-test11.out
90result=$?
91
92exit $result
93