PERF: stop messing with strings that come back from I18n.t

allows better caching
This commit is contained in:
Sam
2014-02-18 11:14:35 +11:00
parent a5e3e9ae2a
commit a28a0bbeeb
4 changed files with 6 additions and 5 deletions

View File

@ -16,10 +16,10 @@ module I18n
k = [args,config.locale,config.backend.object_id]
t = @cache.fetch(k){found=false}
unless found
t = @cache[k] = translate_no_cache(*args)
t = @cache[k] = translate_no_cache(*args).freeze
end
t.dup
t
end
alias_method :t, :translate