You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1012 B

#! /bin/sh
tmpfiles="xg-test2.in.c"
cat <<EOF > xg-test2.in.c
This is a test of the xgettext functionality.
/* xgettext:no-c-format */
_("extract me")
Sometimes keywords can be spread apart
xgettext:no-c-format
_ ( "what about me" )
And even further on accasion
_
(
"hello"
)
EOF
tmpfiles="$tmpfiles xg-test2.po"
: ${XGETTEXT=xgettext}
${XGETTEXT} -d xg-test2 -k_ --omit-header xg-test2.in.c
tmpfiles="$tmpfiles xg-test2.ok"
cat <<EOF > xg-test2.ok
#, no-c-format
msgid "extract me"
msgstr ""
msgid "what about me"
msgstr ""
msgid "hello"
msgstr ""
EOF
: ${DIFF=diff}
${DIFF} xg-test2.ok xg-test2.po
result=$?
rm -fr $tmpfiles
exit $result
# Preserve executable bits for this shell script.
# Thanks to Noah Friedman for this great trick.
Local Variables:
eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
eval:(make-local-variable 'file-mode)
eval:setq file-mode (file-modes (buffer-file-name)))
eval:(make-local-variable 'after-save-hook)
eval:(add-hook 'after-save-hook 'frobme)
End: