aboutsummaryrefslogtreecommitdiffstats
path: root/lib/i18n_fixes.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-01-15 15:30:47 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-01-15 15:30:47 +1100
commitb5f2bed1e406cd7fb6b50259a57be201c797db7d (patch)
tree84b36bf666d7565c747d0c4f75cd73d2310bd295 /lib/i18n_fixes.rb
parent7a30900852b6fb3661f07c368796a78af434f9d9 (diff)
Removed reserved keys in gettext_interpolation because they were unused and untested
Diffstat (limited to 'lib/i18n_fixes.rb')
-rw-r--r--lib/i18n_fixes.rb5
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