No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-ycp-2
blob08d81121723f12c7d005cc7a4c882374299e8f20
1 #!/bin/sh
3 # Test YCP support: --add-comments option.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-y-2.ycp"
9 cat <<EOF > xg-y-2.ycp
10 // This comment will not be extracted.
11 print (_("help"));
12 // TRANSLATORS: This is an extracted comment.
13 print (_("me"));
14 # TRANSLATORS: This is extracted too.
15 print (_("and you"));
16 /* Not extracted either. */
17 print (_("Hey Jude"));
18 /* TRANSLATORS:
19 Nickname of the Beatles
21 print (_("The Fabulous Four"));
22 EOF
24 tmpfiles="$tmpfiles xg-y-2.po"
25 : ${XGETTEXT=xgettext}
26 ${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
27 xg-y-2.ycp -d xg-y-2
28 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
30 tmpfiles="$tmpfiles xg-y-2.ok"
31 cat <<EOF > xg-y-2.ok
32 msgid "help"
33 msgstr ""
35 #. TRANSLATORS: This is an extracted comment.
36 msgid "me"
37 msgstr ""
39 #. TRANSLATORS: This is extracted too.
40 msgid "and you"
41 msgstr ""
43 msgid "Hey Jude"
44 msgstr ""
46 #. TRANSLATORS:
47 #. Nickname of the Beatles
49 msgid "The Fabulous Four"
50 msgstr ""
51 EOF
53 : ${DIFF=diff}
54 ${DIFF} xg-y-2.ok xg-y-2.po
55 result=$?
57 rm -fr $tmpfiles
59 exit $result