Feature #36728

Reintroduce lazy loading of i18n files

Added by Pavel Rosický 4 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:

0%

Category:I18n
Target version:5.0.0
Resolution:

Description

this change restores a removed optimization https://www.redmine.org/issues/31384

see https://github.com/ruby-i18n/i18n/pull/612

diff --git a/lib/redmine/i18n.rb b/lib/redmine/i18n.rb
index b1066539f..13b84512f 100644
--- a/lib/redmine/i18n.rb
+++ b/lib/redmine/i18n.rb
@@ -157,7 +157,7 @@ module Redmine

     # Custom backend based on I18n::Backend::Simple with the following changes:
     # * available_locales are determined by looking at translation file names
-    class Backend < ::I18n::Backend::Simple
+    class Backend < ::I18n::Backend::LazyLoadable
       module Implementation
         # Get available locales from the translations filenames
         def available_locales


Related issues

Related to Redmine - Patch #31384: Remove custom lazy loading of i18n files Closed
Related to Redmine - Patch #36564: Update I18n to 1.10 Closed
Related to Redmine - Defect #36998: Revert lazy loading of i18n files introduced in Redmine 5.0 Closed

Associated revisions

Revision 21448
Added by Marius BALTEANU 4 months ago

Lazy load locales (#36728).

Patch by Pavel Rosický.

History

#1 Updated by Go MAEDA 4 months ago

  • Related to Patch #31384: Remove custom lazy loading of i18n files added

#2 Updated by Go MAEDA 4 months ago

#3 Updated by Go MAEDA 4 months ago

  • Target version set to Candidate for next major release

#4 Updated by Marius BALTEANU 4 months ago

  • Category set to I18n
  • Status changed from New to Resolved
  • Assignee set to Marius BALTEANU
  • Target version changed from Candidate for next major release to 5.0.0

Patch committed, thanks!

#5 Updated by Marius BALTEANU 4 months ago

  • Status changed from Resolved to Closed

#6 Updated by Go MAEDA 3 months ago

  • Tracker changed from Patch to Feature

#7 Updated by Go MAEDA 2 months ago

  • Related to Defect #36998: Revert lazy loading of i18n files introduced in Redmine 5.0 added

#8 Updated by Marius BALTEANU about 1 month ago

Feature reverted in Redmine 5.0.1 (#36998).

Also available in: Atom PDF