mirror of
https://github.com/openharmony/third_party_gettext.git
synced 2026-07-19 21:26:06 -04:00
29 lines
554 B
Bash
Executable File
29 lines
554 B
Bash
Executable File
#! /bin/sh
|
|
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
|
|
|
|
# Test C# support: extraction of contexts.
|
|
|
|
cat <<\EOF > xg-cs-7.cs
|
|
Console.WriteLine(rm.GetString("help"));
|
|
Console.WriteLine(rm.GetParticularString("Help", "about"));
|
|
EOF
|
|
|
|
: ${XGETTEXT=xgettext}
|
|
${XGETTEXT} --omit-header --no-location -d xg-cs-7.tmp xg-cs-7.cs || exit 1
|
|
LC_ALL=C tr -d '\r' < xg-cs-7.tmp.po > xg-cs-7.po || exit 1
|
|
|
|
cat <<EOF > xg-cs-7.ok
|
|
msgid "help"
|
|
msgstr ""
|
|
|
|
msgctxt "Help"
|
|
msgid "about"
|
|
msgstr ""
|
|
EOF
|
|
|
|
: ${DIFF=diff}
|
|
${DIFF} xg-cs-7.ok xg-cs-7.po
|
|
result=$?
|
|
|
|
exit $result
|