2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test C support: extraction of contexts.
7 // (KDE) The 1-argument i18n macro is a simple gettext without context.
9 // (KDE) The 2-argument i18n macro has the context first.
10 print (i18n ("Help", "about"));
11 // (Qt) The 2-argument tr function has the context last.
13 print (tr ("open", "File"));
16 : ${XGETTEXT=xgettext}
17 ${XGETTEXT} --omit-header --no-location \
18 --keyword=i18n:1 --keyword=i18n:1c,2 --keyword=tr:1 --keyword=tr:1,2c \
19 -d xg-c-10.tmp xg-c-10.c || exit 1
20 LC_ALL=C tr -d '\r' < xg-c-10.tmp.po > xg-c-10.po || exit 1
22 cat <<EOF > xg-c-10.ok
39 ${DIFF} xg-c-10.ok xg-c-10.po