diff options
author | Bruno Haible <bruno@clisp.org> | 2007-09-01 21:44:28 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:15:02 +0200 |
commit | 2f0998ce845443cbefb2944c850c639767b4f2bb (patch) | |
tree | ea8dceabef003bf32bfd1f49b3733c684555e7ae /gettext-tools/tests/lang-java | |
parent | 3cd293f1a57e802a6270b5322a8dcd04128f1fca (diff) | |
download | external_gettext-2f0998ce845443cbefb2944c850c639767b4f2bb.zip external_gettext-2f0998ce845443cbefb2944c850c639767b4f2bb.tar.gz external_gettext-2f0998ce845443cbefb2944c850c639767b4f2bb.tar.bz2 |
Implement msgctxt for Java ResourceBundles.
Diffstat (limited to 'gettext-tools/tests/lang-java')
-rwxr-xr-x | gettext-tools/tests/lang-java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gettext-tools/tests/lang-java b/gettext-tools/tests/lang-java index 64d6d57..b89d891 100755 --- a/gettext-tools/tests/lang-java +++ b/gettext-tools/tests/lang-java @@ -67,6 +67,8 @@ cat <<\EOF >> Program.java System.out.println(GettextResource.gettext(catalog,"'Your command, please?', asked the waiter.")); System.out.println(MessageFormat.format(GettextResource.ngettext(catalog,"a piece of cake","{0,number} pieces of cake",n), new Object[] { new Integer(n) })); System.out.println(MessageFormat.format(GettextResource.gettext(catalog,"{0} is replaced by {1}."), new Object[] { "FF", "EUR" })); + System.out.println(MessageFormat.format(GettextResource.npgettext(catalog,"++","a piece of cake","{0,number} pieces of cake",n), new Object[] { new Integer(n) })); + System.out.println(MessageFormat.format(GettextResource.pgettext(catalog,"++","{0} is replaced by {1}."), new Object[] { "FF", "EUR" })); } } EOF @@ -97,6 +99,18 @@ msgstr[1] "" #, java-format msgid "{0} is replaced by {1}." msgstr "" + +#, java-format +msgctxt "++" +msgid "a piece of cake" +msgid_plural "{0,number} pieces of cake" +msgstr[0] "" +msgstr[1] "" + +#, java-format +msgctxt "++" +msgid "{0} is replaced by {1}." +msgstr "" EOF : ${DIFF=diff} @@ -123,6 +137,20 @@ msgstr[1] "{0,number} morceaux de gateau" #, java-format msgid "{0} is replaced by {1}." msgstr "{1} remplace {0}." + +# Euphemistic formulation. +#, java-format +msgctxt "++" +msgid "a piece of cake" +msgid_plural "{0,number} pieces of cake" +msgstr[0] "un morceau de gateau succulent" +msgstr[1] "{0,number} morceaux de gateau succulent" + +# Euphemistic formulation. +#, java-format +msgctxt "++" +msgid "{0} is replaced by {1}." +msgstr "Le nouveau {1} remplace le vieux {0}." EOF tmpfiles="$tmpfiles fr.po.tmp fr.po.new" @@ -173,11 +201,15 @@ cat <<\EOF > prog.ok «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. +2 morceaux de gateau succulent +Le nouveau EUR remplace le vieux FF. EOF cat <<\EOF > prog.oku «Votre commande, s'il vous plait», dit le garçon. 2 morceaux de gateau EUR remplace FF. +2 morceaux de gateau succulent +Le nouveau EUR remplace le vieux FF. EOF : ${LOCALE_FR=fr_FR} |