• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test Smalltalk support: --add-comments option.
5
6cat <<EOF > xg-st-1.st
7"This comment will not be extracted."
8Transcript showCr: (NLS ? 'help').
9" TRANSLATORS: This is an extracted comment."
10Transcript showCr: (NLS ? 'me').
11"Not extracted either."
12Transcript showCr: (NLS ? 'Hey Jude').
13"TRANSLATORS:
14     Nickname of the Beatles
15"
16Transcript showCr: (NLS ? 'The Fabulous Four').
17EOF
18
19: ${XGETTEXT=xgettext}
20${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
21  -d xg-st-1.tmp xg-st-1.st || Exit 1
22LC_ALL=C tr -d '\r' < xg-st-1.tmp.po > xg-st-1.po || Exit 1
23
24cat <<EOF > xg-st-1.ok
25msgid "help"
26msgstr ""
27
28#. TRANSLATORS: This is an extracted comment.
29msgid "me"
30msgstr ""
31
32msgid "Hey Jude"
33msgstr ""
34
35#. TRANSLATORS:
36#. Nickname of the Beatles
37#.
38msgid "The Fabulous Four"
39msgstr ""
40EOF
41
42: ${DIFF=diff}
43${DIFF} xg-st-1.ok xg-st-1.po
44result=$?
45
46exit $result
47