https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292014-01-05T03:25:16ZRedmineRedmine - Feature #12475: Lazy loading of translation files for faster startuphttps://www.redmine.org/issues/12475?journal_id=541172014-01-05T03:25:16ZStefano Gargiulo
<ul></ul><p>Is this really implemented?</p>
<p>I was using redmine in Italian (IT_it) locale but i was getting this error 500 on administrative user editing pages:</p>
<p>ActionView::Template::Error (can not load translations from /omissis/path/config/locales/*sr-CY.yml*: #<Errno::ENOENT: No such file or directory - /</p>
<p>Full trace:</p>
<pre>
Started GET "/users/13/edit" for 151.15.191.145 at 2014-01-05 04:18:34 +0100
Processing by UsersController#edit as HTML
Parameters: {"id"=>"13"}
Current user: stefano (id=1)
Rendered users/_form.html.erb (3.5ms)
Rendered users/_general.html.erb (4.1ms)
Rendered common/_tabs.html.erb (5.0ms)
Rendered users/edit.html.erb within layouts/admin (7.0ms)
Completed 500 Internal Server Error in 10.8ms
ActionView::Template::Error (can not load translations from /omissis/path/config/locales/sr-CY.yml: #<Errno::ENOENT: No such file or directory - / /omissis/path/config/locales/sr-CY.yml>):
9: <p><%= f.text_field :firstname, :required => true %></p>
10: <p><%= f.text_field :lastname, :required => true %></p>
11: <p><%= f.text_field :mail, :required => true %></p>
12: <p><%= f.select :language, lang_options_for_select %></p>
13: <% if Setting.openid? %>
14: <p><%= f.text_field :identity_url %></p>
15: <% end %>
lib/redmine/i18n.rb:152:in `init_translations'
lib/redmine/i18n.rb:166:in `lookup'
lib/redmine/i18n.rb:52:in `ll'
lib/redmine/i18n.rb:96:in `block (2 levels) in languages_options'
lib/redmine/i18n.rb:96:in `map'
lib/redmine/i18n.rb:96:in `block in languages_options'
lib/redmine/i18n.rb:95:in `languages_options'
app/helpers/application_helper.rb:962:in `lang_options_for_select'
app/views/users/_form.html.erb:12:in `_app_views_users__form_html_erb___1844358433978560630_70070849426320'
app/views/users/_general.html.erb:2:in `block in _app_views_users__general_html_erb__2956019574731655906_70070848366580'
app/helpers/application_helper.rb:977:in `labelled_form_for'
app/views/users/_general.html.erb:1:in `_app_views_users__general_html_erb__2956019574731655906_70070848366580'
app/views/common/_tabs.html.erb:24:in `block in _app_views_common__tabs_html_erb___2205524068201026269_70070848303940'
app/views/common/_tabs.html.erb:23:in `each'
app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb___2205524068201026269_70070848303940'
app/helpers/application_helper.rb:272:in `render_tabs'
app/views/users/edit.html.erb:9:in `_app_views_users_edit_html_erb___280756995300269414_44922720'
</pre>
<p>sr-CY is not a language that I was using in any way!!! And the only web browser that was browsing the redmine instance was mine in IT_it locale.</p>
<p>I removed the sr-CY.yml file and the error fixed, anyway this means that translation is not really lazy loaded (I'm using redmine 2.4.2 and ruby 1.9.3), contrary an error in a unused translation parsing is blocking for the used translation too!</p> Redmine - Feature #12475: Lazy loading of translation files for faster startuphttps://www.redmine.org/issues/12475?journal_id=541202014-01-05T05:44:10ZToshi MARUYAMA
<ul></ul><p>sr-CY.yml was removed by <a class="changeset" title="Translation updates for upcoming release * de (#6079) * es (#6021) * it (#6093) * nl (#6025) * ru..." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4003">r4003</a>.</p> Redmine - Feature #12475: Lazy loading of translation files for faster startuphttps://www.redmine.org/issues/12475?journal_id=541272014-01-05T14:47:55ZStefano Gargiulo
<ul></ul><p>I apologize it was my bad, i did a wrong redmine upgrade keeping the old files too!</p>