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.tmp.po xg-ob-2.po"
31 : ${XGETTEXT=xgettext}
32 ${XGETTEXT} --omit-header --no-location --add-comments=TRANSLATORS: \
33 -d xg-ob-2.tmp xg-ob-2.m
34 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
35 LC_ALL=C tr -d '\r' < xg-ob-2.tmp.po > xg-ob-2.po
36 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
38 tmpfiles="$tmpfiles xg-ob-2.ok"
39 cat <<EOF > xg-ob-2.ok
43 #. TRANSLATORS: This is an extracted comment.
51 #. Nickname of the Beatles
53 msgid "The Fabulous Four"
56 #. TRANSLATORS: The strings get concatenated.
58 "there is not enough room on a single line for this entire long, verbose "
64 ${DIFF} xg-ob-2.ok xg-ob-2.po