Feature #5716

I18n module should fall back to English if a translation string was not found

Added by Holger Just over 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:2010-06-20
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Translations
Target version:-
Resolution:Duplicate

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

Duplicates Redmine - Feature #5518: Graceful fallback for "missing translation" needed Closed 2010-05-13

History

#1 Updated by Felix Schäfer over 7 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)

#2 Updated by Azamat Hackimov over 7 years ago

Yes, this would be very useful. There already opened ticket #5518 about that.

#3 Updated by Azamat Hackimov over 7 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

#4 Updated by Jean-Philippe Lang almost 7 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.

Also available in: Atom PDF