Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Unified Diff: grit/format/android_xml_unittest.py

Issue 1258833004: Compile plural strings to android <plurals> elem (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Removed debugging output again again again (sorry) Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « grit/format/android_xml.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/format/android_xml_unittest.py
diff --git a/grit/format/android_xml_unittest.py b/grit/format/android_xml_unittest.py
index c5ce00f0d5c9896a2a0d92be0fa450b57918eeb7..87973343d89e0add2c6b893ca997ac26b5d27202 100644
--- a/grit/format/android_xml_unittest.py
+++ b/grit/format/android_xml_unittest.py
@@ -50,6 +50,11 @@ a sledge hammer.
<message name="IDS_PLACEHOLDERS" desc="A string with placeholders">
I'll buy a <ph name="WAVELENGTH">%d<ex>200</ex></ph> nm laser at <ph name="STORE_NAME">%s<ex>the grocery store</ex></ph>.
</message>
+ <message name="IDS_PLURALS" desc="A string using the ICU plural format">
+ {NUM_THINGS, plural,
+ =1 {Maybe I'll get one laser.}
+ other {Maybe I'll get # lasers.}}
+ </message>
</messages>
""")
@@ -69,6 +74,10 @@ a sledge hammer."</string>
<string name="product_specific" product="nosdcard">"Lasers will probably be helpful."</string>
<string name="custom_name" product="default">"You have an SD card"</string>
<string name="placeholders">"I\'ll buy a %d nm laser at %s."</string>
+<plurals name="plurals">
+ <item quantity="one">"Maybe I\'ll get one laser."</item>
+ <item quantity="other">"Maybe I\'ll get %d lasers."</item>
+</plurals>
</resources>
"""
self.assertEqual(output.strip(), expected.strip())
« no previous file with comments | « grit/format/android_xml.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698