3
# Test ObjectiveC support: --add-comments option.
6
trap 'rm -fr $tmpfiles' 1 2 3 15
8
tmpfiles="$tmpfiles xg-ob-2.m"
10
// This comment will not be extracted.
11
print (NSLocalizedString (@
13
// TRANSLATORS: This is an extracted comment.
14
print (NSLocalizedString (@
16
/* Not extracted either. */
17
print (NSLocalizedString (@
20
Nickname of the Beatles
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?
30
tmpfiles="$tmpfiles xg-ob-2.po"
31
: ${XGETTEXT=xgettext}
32
${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
34
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
36
tmpfiles="$tmpfiles xg-ob-2.ok"
37
cat <<EOF > xg-ob-2.ok
41
#. TRANSLATORS: This is an extracted comment.
49
#. Nickname of the Beatles
51
msgid "The Fabulous Four"
54
#. TRANSLATORS: The strings get concatenated.
56
"there is not enough room on a single line for this entire long, verbose "
62
${DIFF} xg-ob-2.ok xg-ob-2.po