Permalink
Browse files

dup translations right after lookup in I18n::Backend::Base. based on …

…a suggestion from Erik Andrejko, https://gist.github.com/31e5aa46c8d5544df994
  • Loading branch information...
1 parent 41ee0db commit 0ca77036fccec252a546db51d29430bdaccf9878 Erik Andrejko committed with Sven Fuchs Apr 5, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/i18n/backend/base.rb
View
2 lib/i18n/backend/base.rb
@@ -117,7 +117,7 @@ def lookup(locale, key, scope = [], options = {})
return nil unless result.is_a?(Hash) && result.has_key?(key)
result = result[key]
result = resolve(locale, key, result, options) if result.is_a?(Symbol)
- result
+ String === result ? result.dup : result
end
end

0 comments on commit 0ca7703

Please sign in to comment.