Project

General

Profile

Actions

Feature #5518

closed

Graceful fallback for "missing translation" needed

Added by Victor Dulepov over 14 years ago. Updated almost 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
I18n
Target version:
Start date:
2010-05-13
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Scenario: user selected a language in "My account", some plugin or core translation is missing for that language.

Current behavior: translation missing: ru, %control_code% is displayed. Requires me to have all components translated to use a language?

Expected: display the control label from the default language (the one set in Administration/Settings/Display).
More fallback levels - if the default language translation is still missing, try en-US, and then - the first one found in plugin's /config/locales


Related issues

Has duplicate Redmine - Feature #5716: I18n module should fall back to English if a translation string was not foundClosed2010-06-20

Actions
Blocked by Redmine - Defect #5608: broken with i18n 0.4.0ClosedJean-Baptiste Barth2010-05-28

Actions
Actions #1

Updated by Enderson Maia over 14 years ago

+1

Should use the i18n gem, I'll make some tests here and report the results.

Actions #2

Updated by Holger Just over 14 years ago

The current I18n gem (0.4.1) provides a fallback mechanism out of the box. But I think, it it too late to move there for 1.0.

Also, I think, there are some compatibility issues with Rails 2.3.5. See #5608 for details. So either we copy some of the functionality in the i18n gem now or we wait for an update to rails 2.3.8 -> 3.0 which is still going to take significant time.

Actions #3

Updated by Enrique Garcia about 14 years ago

While this is implemented, it might be useful to put Redmine in 'English-only mode'.

The easiest way I could find to do this was changing lib/redmine/i18n.rb . If there is a simpler way, please do let me know.

    def set_language_if_valid(lang)
      # Temp fix until http://www.redmine.org/issues/5518 is resolved
      # if l = find_language(lang)
      #  ::I18n.locale = l
      # end
      ::I18n.locale = 'en'
    end
Actions #4

Updated by Jean-Philippe Lang almost 14 years ago

  • Category changed from Translations to I18n
  • Assignee deleted (Azamat Hackimov)
Actions #5

Updated by Jean-Philippe Lang almost 14 years ago

  • Target version set to 1.2.0
Actions #6

Updated by Jean-Philippe Lang almost 14 years ago

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

Fallback to en locale added in r4679.
Falling back to the application default language is not desirable IMHO. If a user uses a different language than the default one, there is no reason he'll prefer to fallback in this default language rather than in english.

Actions

Also available in: Atom PDF