summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/msgmerge-24
blob: 42b6d6fa708fde711d36e91a6ad89fb372675241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test msgmerge and msgcmp: handling of 'range:' flags.

cat <<\EOF > mm-test24.po
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#, c-format
msgid "one day"
msgid_plural "%d days"
msgstr[0] "un jour"
msgstr[1] "%d jours"

#, c-format, range: 1..6
msgid "one week and one day"
msgid_plural "one week and %d days"
msgstr[0] "une semaine et un jour"
msgstr[1] "une semaine et %d jours"

#, c-format, range: 1..7
msgid "two weeks and one day"
msgid_plural "two weeks and %d days"
msgstr[0] "deux semaines et un jour"
msgstr[1] "deux semaines et %d jours"

#, c-format, range: 0..6
msgid "three weeks and one day"
msgid_plural "three weeks and %d days"
msgstr[0] "trois semaines et un jour"
msgstr[1] "trois semaines et %d jours"

#, c-format, range: 0..7
msgid "four weeks and one day"
msgid_plural "four weeks and %d days"
msgstr[0] "quatre semaines et un jour"
msgstr[1] "quatre semaines et %d jours"

#, c-format, range: 1..6
msgid "five weeks and one day"
msgid_plural "five weeks and %d days"
msgstr[0] "cinq semaines et un jour"
msgstr[1] "cinq semaines et %d jours"
EOF

cat <<\EOF > mm-test24.pot
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#, c-format, range: 1..6
msgid "one day"
msgid_plural "%d days"
msgstr[0] ""
msgstr[1] ""

#, c-format
msgid "one week and one day"
msgid_plural "one week and %d days"
msgstr[0] ""
msgstr[1] ""

#, c-format, range: 0..6
msgid "two weeks and one day"
msgid_plural "two weeks and %d days"
msgstr[0] ""
msgstr[1] ""

#, c-format, range: 1..7
msgid "three weeks and one day"
msgid_plural "three weeks and %d days"
msgstr[0] ""
msgstr[1] ""

#, c-format, range: 1..6
msgid "four weeks and one day"
msgid_plural "four weeks and %d days"
msgstr[0] ""
msgstr[1] ""

#, c-format, range: 0..7
msgid "five weeks and one day"
msgid_plural "five weeks and %d days"
msgstr[0] ""
msgstr[1] ""
EOF

: ${MSGCMP=msgcmp}
${MSGCMP} --use-fuzzy --use-untranslated mm-test24.po mm-test24.pot 2>/dev/null || Exit 1

: ${MSGMERGE=msgmerge}
${MSGMERGE} -q -o mm-test24.tmp.po mm-test24.po mm-test24.pot || Exit 1
LC_ALL=C tr -d '\r' < mm-test24.tmp.po > mm-test24.new.po || Exit 1

cat <<\EOF > mm-test24.ok
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: \n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#, c-format, range: 1..6
msgid "one day"
msgid_plural "%d days"
msgstr[0] "un jour"
msgstr[1] "%d jours"

#, fuzzy, c-format
msgid "one week and one day"
msgid_plural "one week and %d days"
msgstr[0] "une semaine et un jour"
msgstr[1] "une semaine et %d jours"

#, fuzzy, c-format, range: 0..6
msgid "two weeks and one day"
msgid_plural "two weeks and %d days"
msgstr[0] "deux semaines et un jour"
msgstr[1] "deux semaines et %d jours"

#, fuzzy, c-format, range: 1..7
msgid "three weeks and one day"
msgid_plural "three weeks and %d days"
msgstr[0] "trois semaines et un jour"
msgstr[1] "trois semaines et %d jours"

#, c-format, range: 1..6
msgid "four weeks and one day"
msgid_plural "four weeks and %d days"
msgstr[0] "quatre semaines et un jour"
msgstr[1] "quatre semaines et %d jours"

#, fuzzy, c-format, range: 0..7
msgid "five weeks and one day"
msgid_plural "five weeks and %d days"
msgstr[0] "cinq semaines et un jour"
msgstr[1] "cinq semaines et %d jours"
EOF

: ${DIFF=diff}
${DIFF} mm-test24.ok mm-test24.new.po || Exit 1

: ${MSGCMP=msgcmp}
${MSGCMP} --use-fuzzy --use-untranslated mm-test24.new.po mm-test24.pot || Exit 1

Exit 0