diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-01-15 15:30:47 +1100 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-01-15 15:30:47 +1100 |
commit | b5f2bed1e406cd7fb6b50259a57be201c797db7d (patch) | |
tree | 84b36bf666d7565c747d0c4f75cd73d2310bd295 /lib | |
parent | 7a30900852b6fb3661f07c368796a78af434f9d9 (diff) |
Removed reserved keys in gettext_interpolation because they were unused and untested
Diffstat (limited to 'lib')
-rw-r--r-- | lib/i18n_fixes.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/i18n_fixes.rb b/lib/i18n_fixes.rb index 5fb5f03b7..a85faddcb 100644 --- a/lib/i18n_fixes.rb +++ b/lib/i18n_fixes.rb @@ -14,7 +14,6 @@ def _(key, options = {}) gettext_interpolate(translation, options) end -INTERPOLATION_RESERVED_KEYS = %w(scope default) MATCH = /\{\{([^\}]+)\}\}/ def gettext_interpolate(string, values) @@ -24,9 +23,7 @@ def gettext_interpolate(string, values) string = string.to_str.gsub(MATCH) do pattern, key = $1, $1.to_sym - if INTERPOLATION_RESERVED_KEYS.include?(pattern) - raise I18n::ReservedInterpolationKey.new(pattern, string) - elsif !values.include?(key) + if !values.include?(key) raise I18n::MissingInterpolationArgument.new(pattern, string) else v = values[key].to_s |