#! /bin/sh tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 tmpfiles="$tmpfiles xg-test8.in.po xg-test8.c xg-test8.cc" cat < xg-test8.in.po #: file1.c:199 #, fuzzy msgid "extract me" msgstr "some text to get fuzzy copied to result" #: file2.cc:200 msgid "what about me" msgstr "" #: file3.c:10 #, c-format, fuzzy msgid "hello" msgstr "Again some text for fuzzy" EOF cat < xg-test8.c #include #include int main (int argc, char *argv[]) { printf (dcgettext ("hello", "Hello, world.")); return 0; } EOF cat < xg-test8.cc #include #include #include int main (int argc, char *argv[]) { cout << dcgettext ("hello", "Hello world!", LC_MESSAGES) << endl; return 0; } EOF tmpfiles="$tmpfiles xg-test8.po" : ${XGETTEXT=xgettext} ${XGETTEXT} --omit-header -n xg-test8.in.po \ xg-test8.c xg-test8.cc -d xg-test8 tmpfiles="$tmpfiles xg-test8.ok" cat < xg-test8.ok #: file1.c:199 #, fuzzy msgid "extract me" msgstr "some text to get fuzzy copied to result" #: file2.cc:200 msgid "what about me" msgstr "" #: file3.c:10 #, fuzzy, c-format msgid "hello" msgstr "Again some text for fuzzy" #: xg-test8.c:6 msgid "Hello, world." msgstr "" #: xg-test8.cc:7 msgid "Hello world!" msgstr "" EOF : ${DIFF=diff} ${DIFF} xg-test8.ok xg-test8.po result=$? rm -fr $tmpfiles exit $result