Permalink
Browse files

Merge pull request #728 from ochameau/unicode-test@825803

Bug 825803: Add test for escaping Unicode sequences in .properties files r=@erikvold
  • Loading branch information...
erikvold committed Jan 19, 2013
2 parents 94d4173 + af85d88 commit 203f880da7465442e5f56c84da15206d5983729c
Showing with 10 additions and 0 deletions.
  1. +6 −0 test/addons/l10n/locale/en-GB.properties
  2. +4 −0 test/addons/l10n/main.js
@@ -14,3 +14,9 @@ pluralTest[zero]=optional zero form
explicitPlural[one]=one
explicitPlural[other]=other
+
+# You can use unicode char escaping in order to inject space at the beginning/
+# end of your string. (Regular spaces are automatically ignore by .properties
+# file parser)
+unicodeEscape = \u0020\u0040\u0020
+# this string equals to " @ "
View
@@ -131,6 +131,10 @@ exports.testEnUsLocaleName = createTest("en-US", function(assert, loader, done)
assert.equal(_("Translated"), "Yes",
"String with translation is correctly translated");
+ // Check Unicode char escaping sequences
+ assert.equal(_("unicodeEscape"), " @ ",
+ "Unicode escaped sequances are correctly converted");
+
// Check plural forms regular matching
assert.equal(_("downloadsCount", 0),
"0 downloads",

0 comments on commit 203f880

Please sign in to comment.