File: msgfmt-10

package info (click to toggle)
gettext 0.23.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 168,104 kB
  • sloc: ansic: 532,579; sh: 68,252; perl: 28,011; makefile: 9,068; lisp: 3,184; yacc: 1,055; java: 615; cs: 589; cpp: 397; objc: 343; sed: 79; tcl: 63; xml: 40; pascal: 11; awk: 7; php: 7
file content (80 lines) | stat: -rwxr-xr-x 2,250 bytes parent folder | download | duplicates (4)
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
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test format string checking in plural entries.

cat <<\EOF > mf-test10.po1
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: GNU bison\n"
"PO-Revision-Date: 2001-04-05 19:47+0200\n"
"Last-Translator: ABC DEF <abc@gnu.uucp>\n"
"Language-Team: test <test@li.org>\n"
"Language: test\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-9\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: src/reduce.c:511
#, c-format
msgid "%d useless nonterminal"
msgid_plural "%d useless nonterminals"
msgstr[0] "1 yararsz deiken simge"
msgstr[1] "%d yararsz deiken simges"

#: src/reduce.c:520
#, c-format
msgid "one useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d yararsz kural"
msgstr[1] "%d yararsz kurals"
EOF

: ${MSGFMT=msgfmt}
${MSGFMT} --check -o /dev/null mf-test10.po1 || Exit 1

cat <<\EOF > mf-test10.po2
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: GNU bison\n"
"PO-Revision-Date: 2001-04-05 19:47+0200\n"
"Last-Translator: ABC DEF <abc@gnu.uucp>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-9\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: src/reduce.c:520
#, c-format
msgid "one useless rule"
msgid_plural "%d useless rules"
msgstr[0] "%d yararsz kural"
msgstr[1] "%d yararsz kural%s"
EOF

: ${MSGFMT=msgfmt}
LC_MESSAGES=C LC_ALL= \
${MSGFMT} --check -o /dev/null mf-test10.po2 \
    2>&1 | grep -v '^==' | sed -e 's|[^ ]*\\msgfmt\.exe|msgfmt|' -e 's|^msgfmt\.exe|msgfmt|' -e 's|^/cygdrive/[^ ]*/msgfmt|msgfmt|' | LC_ALL=C tr -d '\r' > mf-test10.err

cat << EOF > mf-test10.ok
mf-test10.po2:6: warning: header field 'Language-Team' missing in header
mf-test10.po2:6: warning: header field 'Language' missing in header
mf-test10.po2:19: number of format specifications in 'msgid_plural' and 'msgstr[1]' does not match
msgfmt: found 1 fatal error
EOF

: ${DIFF=diff}
${DIFF} mf-test10.ok mf-test10.err
result=$?

exit $result