Patch #12753

Update config.i18n.load_path for plugin-supplied locales

Added by Takeshi Yaegashi over 5 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:I18n
Target version:2.5.0

Description

With Rails 3 Redmine::Plugin.register should update Rails.application.config.i18n.load_path for plugin-supplied locales to allow them to override system locales. I18n.load_path is overriden with system locales by an after_initialize hook in active_support/i18n_railtie.rb, thus currently plugins like https://github.com/edavis10/redmine_language_change won't work.

The attached patch is against 2.1-stable branch.

0001-Update-config.i18n.load_path-for-plugin-locales.patch Magnifier (1.06 KB) Takeshi Yaegashi, 2013-01-06 10:37


Related issues

Duplicated by Redmine - Defect #14758: Can't override default locale with plugin Closed

Associated revisions

Revision 12482
Added by Jean-Philippe Lang over 4 years ago

Use Rails.application.config.i18n.load_path for adding plugin locales (#12753).

Patch by Takeshi Yaegashi.

History

#1 Updated by Jean-Philippe Lang over 5 years ago

Can you add a test to your patch?

#2 Updated by Siegfried Vogel over 5 years ago

+1

Need the string customization scheme in plugins of previous Redmine versions back, too!

#3 Updated by Daniel Felix almost 5 years ago

Hi there,

any news on this? Did you write a test? :-)

#4 Updated by Toshi MARUYAMA almost 5 years ago

  • Duplicated by Defect #14758: Can't override default locale with plugin added

#5 Updated by Ebrahim Mohammadi over 4 years ago

This is absolutely needed.

#6 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.4.3

redmine_language_change plugin works fine for me without the patch applied but it's committed in r12482 anyway as it seems safer to use Rails config instead.

#7 Updated by Jean-Philippe Lang over 4 years ago

  • Status changed from Resolved to Closed
  • Target version changed from 2.4.3 to 2.5.0

Also available in: Atom PDF