Change interpolation syntax to %{key}

This commit is contained in:
Simon Eskildsen
2013-08-30 12:31:57 -04:00
parent 5ee4f960e8
commit df5980f23f
3 changed files with 7 additions and 15 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
---
simple: "less is more"
whatever: "something :something"
whatever: "something %{something}"
errors:
i18n:
undefined_interpolation: "undefined key :key"
unknown_translation: "translation ':name' wasn't found"
undefined_interpolation: "undefined key %{key}"
unknown_translation: "translation '%{name}' wasn't found"
syntax:
oops: "something wasn't right"
-8
View File
@@ -34,12 +34,4 @@ class I18nTest < Test::Unit::TestCase
def test_sets_default_path_to_en
assert_equal I18n::DEFAULT_LOCALE, I18n.new.path
end
def test_escaping_of_symbols
assert_equal "do replaced! not :gsub", @i18n.send(:interpolate,
'do :replace not \\:gsub',
{
:replace => "replaced!"
})
end
end