• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test msgfmt on a PO file with previous msgids.
5
6cat <<\EOF > mf-16.po
7msgid ""
8msgstr ""
9"Report-Msgid-Bugs-To: \n"
10"Content-Type: text/plain; charset=UTF-8\n"
11"Content-Transfer-Encoding: 8bit\n"
12
13#. TRANSLATORS: An error message.
14#: src/args.c:242
15#, fuzzy, c-format
16#| msgid "too many arguments"
17msgid "Too many arguments."
18msgstr "zu viele Argumente"
19
20#. TRANSLATORS: An error message.
21#: src/args.c:247
22#, fuzzy, c-format
23#| msgid "too many arguments"
24msgid "Too few arguments."
25msgstr "zu viele Argumente"
26
27# Oder besser "fehlende Argumente"?
28#. TRANSLATORS: An error message.
29#: src/args.c:273
30#, c-format
31#| msgid "missing arguments"
32msgid "Missing arguments."
33msgstr "Argumente fehlen."
34
35#, fuzzy
36#~| msgid "%s: invalid option -- %c\n"
37#~ msgid "%s: illegal option -- %c\n"
38#~ msgstr "%s: ungültige Option -- %c\n"
39
40#~ msgid "%s: invalid option -- %c\n"
41#~ msgstr "%s: ungültige Option -- %c\n"
42EOF
43
44: ${MSGFMT=msgfmt}
45${MSGFMT} -o mf-16.mo mf-16.po || Exit 1
46
47: ${MSGUNFMT=msgunfmt}
48${MSGUNFMT} -o mf-16.tmp mf-16.mo || Exit 1
49LC_ALL=C tr -d '\r' < mf-16.tmp > mf-16.out || Exit 1
50
51cat <<\EOF > mf-16.ok
52msgid ""
53msgstr ""
54"Report-Msgid-Bugs-To: \n"
55"Content-Type: text/plain; charset=UTF-8\n"
56"Content-Transfer-Encoding: 8bit\n"
57
58msgid "Missing arguments."
59msgstr "Argumente fehlen."
60EOF
61
62: ${DIFF=diff}
63${DIFF} mf-16.ok mf-16.out
64result=$?
65
66exit $result
67