Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #728 from ochameau/unicode-test@825803
Browse files Browse the repository at this point in the history
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 203f880
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/addons/l10n/locale/en-GB.properties
Expand Up @@ -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 " @ "
4 changes: 4 additions & 0 deletions test/addons/l10n/main.js
Expand Up @@ -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",
Expand Down

0 comments on commit 203f880

Please sign in to comment.