• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test --extracted-comment option.
5
6cat <<\EOF > mg-test8.po
7msgid ""
8msgstr ""
9"Project-Id-Version: GNU gettext 0.11-pre1\n"
10"POT-Creation-Date: 2001-12-08 20:33+0100\n"
11"PO-Revision-Date: 2001-11-04 12:25+0100\n"
12"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
13"Language-Team: German <de@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=ISO-8859-1\n"
16"Content-Transfer-Encoding: 8bit\n"
17"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
19# Warum ist das nicht als c-form markiert?
20#: widgets.c:87
21msgid "About <tt>GNOME</tt>"
22msgstr "�ber <tt>GNOME</tt>"
23
24#. c-form
25#: widgets.c:118
26msgid "click <b>here</b>"
27msgstr "Klicken Sie <b>hier</b>."
28
29#: widgets.c:152
30#, c-format
31msgid "repeat %d times"
32msgstr "%d mal wiederholen"
33EOF
34
35: ${MSGGREP=msggrep}
36LC_MESSAGES=C LC_ALL= \
37${MSGGREP} -X -e c-form -o mg-test8.tmp mg-test8.po >mg-test8.err 2>&1
38result=$?
39cat mg-test8.err | grep -v 'warning: Locale charset' | grep -v '^ '
40test $result = 0 || { Exit 1; }
41LC_ALL=C tr -d '\r' < mg-test8.tmp > mg-test8.out || Exit 1
42
43cat <<\EOF > mg-test8.ok
44msgid ""
45msgstr ""
46"Project-Id-Version: GNU gettext 0.11-pre1\n"
47"POT-Creation-Date: 2001-12-08 20:33+0100\n"
48"PO-Revision-Date: 2001-11-04 12:25+0100\n"
49"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
50"Language-Team: German <de@li.org>\n"
51"MIME-Version: 1.0\n"
52"Content-Type: text/plain; charset=ISO-8859-1\n"
53"Content-Transfer-Encoding: 8bit\n"
54"Plural-Forms: nplurals=2; plural=(n != 1);\n"
55
56#. c-form
57#: widgets.c:118
58msgid "click <b>here</b>"
59msgstr "Klicken Sie <b>hier</b>."
60EOF
61
62: ${DIFF=diff}
63${DIFF} mg-test8.ok mg-test8.out
64result=$?
65
66exit $result
67