Feature #5716
closed
I18n module should fall back to English if a translation string was not found
Added by Holger Just about 14 years ago.
Updated over 13 years ago.
Description
Most of the time, a developer is able to contribute translations for her native tongue and English. It is also rather cumbersome to always having to update the translations files.
The I18n module should therefore directly search for a matching English translation before reporting a missing translation. This would allow to update translation files only when there are really new contributions. it would also prevent the language files getting "soiled" with English texts.
- Assignee deleted (
Azamat Hackimov)
How I many times have I wondered why that wasn't the case already!
(oh, and not sure how much Azamat can do about it, so I removed the auto-assigned-to)
Yes, this would be very useful. There already opened ticket #5518 about that.
- Status changed from New to Closed
- Resolution set to Duplicate
Felix Schäfer wrote:
How I many times have I wondered why that wasn't the case already!
Running a rake task to update the locales is not a big deal and people who want to update a translation file can easily see what is not translated yet. Fallbacks can be usefull for plugins that won't provide translations for all/future supported locales but we don't need to make the core slower:
>> Benchmark.ms { 1000.times { I18n.t(:test) } } # 1-level fallback
=> 93.75
>> Benchmark.ms { 1000.times { I18n.t(:test) } } # no fallback
=> 31.25
Fallbacks will be added in 1.2 (see #5518) but we'll keep updating core locales with english strings.
Also available in: Atom
PDF