~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to gettext-tools/tests/xgettext-objc-2

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-03-14 17:40:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314174002-p1ad5ldve1hqzhye
Tags: 0.14.1-2
* Added libexpat1-dev to Build-Depends, for glade support.
* Added libc0.1-dev to Build-Depends, for GNU/kFreeBSD.
* Removed special-casing of knetbsd-gnu in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# Test ObjectiveC support: --add-comments option.
 
4
 
 
5
tmpfiles=""
 
6
trap 'rm -fr $tmpfiles' 1 2 3 15
 
7
 
 
8
tmpfiles="$tmpfiles xg-ob-2.m"
 
9
cat <<EOF > xg-ob-2.m
 
10
// This comment will not be extracted.
 
11
print (NSLocalizedString (@
 
12
"help"));
 
13
//  TRANSLATORS: This is an extracted comment.
 
14
print (NSLocalizedString (@
 
15
"me"));
 
16
/* Not extracted either. */
 
17
print (NSLocalizedString (@
 
18
"Hey Jude"));
 
19
/*  TRANSLATORS:
 
20
     Nickname of the Beatles
 
21
*/
 
22
print (NSLocalizedString (@
 
23
"The Fabulous Four"));
 
24
/* TRANSLATORS: The strings get concatenated.  */
 
25
print (NSLocalizedString (@ "there is not enough"
 
26
@" room on a single line for this entire long, " // confusing, eh?
 
27
@ "verbose string"));
 
28
EOF
 
29
 
 
30
tmpfiles="$tmpfiles xg-ob-2.po"
 
31
: ${XGETTEXT=xgettext}
 
32
${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
 
33
  xg-ob-2.m -d xg-ob-2
 
34
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
35
 
 
36
tmpfiles="$tmpfiles xg-ob-2.ok"
 
37
cat <<EOF > xg-ob-2.ok
 
38
msgid "help"
 
39
msgstr ""
 
40
 
 
41
#. TRANSLATORS: This is an extracted comment.
 
42
msgid "me"
 
43
msgstr ""
 
44
 
 
45
msgid "Hey Jude"
 
46
msgstr ""
 
47
 
 
48
#. TRANSLATORS:
 
49
#. Nickname of the Beatles
 
50
#.
 
51
msgid "The Fabulous Four"
 
52
msgstr ""
 
53
 
 
54
#. TRANSLATORS: The strings get concatenated.
 
55
msgid ""
 
56
"there is not enough room on a single line for this entire long, verbose "
 
57
"string"
 
58
msgstr ""
 
59
EOF
 
60
 
 
61
: ${DIFF=diff}
 
62
${DIFF} xg-ob-2.ok xg-ob-2.po
 
63
result=$?
 
64
 
 
65
rm -fr $tmpfiles
 
66
 
 
67
exit $result