This project is archived and is in readonly mode.
I18n: introduce I18n.load_path in favor of I18n.load_translations and change Simple backend to load translations lazily
Reported by Sven Fuchs | September 15th, 2008 @ 09:38 AM | in 2.x
Rails libraries announce their translation files to the I18n library when they're loaded during Rails init process. So far the translations are immediately loaded by the backend which makes it hard to swap the backend after the Rails libraries have been loaded (e.g. custom initializer or plugin).
We've discussed various options to solve this and we believe that the best solution is to remove #load_translations from I18n in favor of a #load_path array which only collects the announced translation sources. The Simple backend can then lazy-load the translations at the latest possible point, i.e. before the first lookup happens.
The attached patch should apply but might rely on #1044 being applied. Maybe it's easier to pull from my fork instead: http://github.com/svenfuchs/rail...
Comments and changes to this ticket
-
Sven Fuchs September 15th, 2008 @ 09:38 AM
- no changes were found...
-
Repository September 20th, 2008 @ 07:27 PM
- State changed from new to resolved
- Tag changed from i18n, patch to i18n, patch
(from [a3b7fa78bfdc33e45e39c095b67e02d50a2c7bea]) I18n: Introduce I18n.load_path in favor of I18n.load_translations and change Simple backend to load translations lazily. [#1048 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 1048 I18n: introduce I18n.load_path in favor of I18n.load_translations and change Simple backend to load translations lazily (from [a3b7fa78bfdc33e45e39c095b67e02d50a2c7bea]) I18n: I...