Feature #5716
closedI18n module should fall back to English if a translation string was not found
0%
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.
Related issues
Updated by Felix Schäfer over 14 years ago
- 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)
Updated by Azamat Hackimov over 14 years ago
Yes, this would be very useful. There already opened ticket #5518 about that.
Updated by Azamat Hackimov over 14 years ago
- Status changed from New to Closed
- Resolution set to Duplicate
Updated by Jean-Philippe Lang almost 14 years ago
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.