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

Unified Diff: grit/format/chrome_messages_json_unittest.py

Issue 1425693007: Fix placeholder syntax for Chrome extensions. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: Added unit test. Created 5 years, 1 month 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/chrome_messages_json.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/format/chrome_messages_json_unittest.py
diff --git a/grit/format/chrome_messages_json_unittest.py b/grit/format/chrome_messages_json_unittest.py
index 373751eadc868c4ca5a7cf5fa7bb2eb826e35cea..504a8eb154cf8a3571815c47775b8a7e1022f4c5 100644
--- a/grit/format/chrome_messages_json_unittest.py
+++ b/grit/format/chrome_messages_json_unittest.py
@@ -32,6 +32,9 @@ class ChromeMessagesJsonFormatUnittest(unittest.TestCase):
<message name="IDS_PLACEHOLDERS">
<ph name="ERROR_COUNT">%1$d<ex>1</ex></ph> error, <ph name="WARNING_COUNT">%2$d<ex>1</ex></ph> warning
</message>
+ <message name="IDS_PLACEHOLDERS_SUBSTITUTED_BY_GETMESSAGE">
+ <ph name="BEGIN">$1<ex>a</ex></ph>test<ph name="END">$2<ex>b</ex></ph>
+ </message>
<message name="IDS_STARTS_WITH_SPACE">
''' (<ph name="COUNT">%d<ex>2</ex></ph>)
</message>
@@ -64,6 +67,17 @@ class ChromeMessagesJsonFormatUnittest(unittest.TestCase):
"PLACEHOLDERS": {
"message": "%1$d error, %2$d warning"
},
+ "PLACEHOLDERS_SUBSTITUTED_BY_GETMESSAGE": {
+ "message": "$1$test$2$",
+ "placeholders": {
+ "1": {
+ "content": "$1"
+ },
+ "2": {
+ "content": "$2"
+ }
+ }
+ },
"STARTS_WITH_SPACE": {
"message": " (%d)"
},
« no previous file with comments | « grit/format/chrome_messages_json.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698