Error raised by locale file.
Added by Ivan Cenov about 11 years ago
An error happened after I upgraded to 1.4.0. When entering in /settings, Internal server error occurred:
Started GET "/settings" for 192.168.20.155 at 2013-11-21 19:27:53 +0200 Processing by SettingsController#index as HTML Current user: imc (id=3) Rendered settings/_general.html.erb (15.6ms) Rendered settings/_display.html.erb (13343.8ms) Rendered common/_tabs.html.erb (13406.2ms) Rendered settings/edit.html.erb within layouts/admin (13484.4ms) Completed 500 Internal Server Error in 13546.9ms ActionView::Template::Error (can not load translations from e:/data/redmine/config/locales/tr.yml: #<Psych::SyntaxError: (e:/data/redmine/config/locales/tr.yml): did not find expected key while parsing a block mapping at line 1 column 4>): 3: <div class="box tabular settings"> 4: <p><%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank => :label_default, :label => :label_theme %></p> 5: 6: <p><%= setting_select :default_language, lang_options_for_select(false) %></p> 7: 8: <p><%= setting_select :start_of_week, [[day_name(1),'1'], [day_name(6),'6'], [day_name(7),'7']], :blank => :label_language_based %></p> 9: <% locale = User.current.language.blank? ? ::I18n.locale : User.current.language %> 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:961:in `lang_options_for_select' app/views/settings/_display.html.erb:6:in `block in _app_views_settings__display_html_erb___151484405_25284228' app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb___151484405_25284228' app/views/common/_tabs.html.erb:24:in `block in _app_views_common__tabs_html_erb__587700844_25097064' app/views/common/_tabs.html.erb:23:in `each' app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb__587700844_25097064' app/helpers/application_helper.rb:271:in `render_tabs' app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb__612579191_8236524' app/controllers/settings_controller.rb:28:in `index'
There was something wrong with tr.yml file. This was at the beginning
locale: native_name: Türkçe address_separator: " "I compared tr.yml with several other *.yml files. The above was not in them; so I removed it from tr.yml and the internal error disappeared.
Ivan
Replies (1)
RE: Error raised by locale file. - Added by Martin Denizet (redmine.org team member) about 11 years ago
If it's a bug with Redmine, I suggest you create an issue about it if nobody already did it.
Thanks!