Project

General

Profile

Actions

Defect #19181

closed

Something wrong with sl.yml file: expects it to return a hash, but does not

Added by Ivan Cenov about 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Translations
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

When opening Administration.Settings Internal error 500 arises. Here is the log:

Started GET "/settings" for 192.168.20.155 at 2015-02-25 09:47:29 +0200
Processing by SettingsController#index as HTML
  Current user: imc (id=3)
  Rendered settings/_general.html.erb (15.6ms)
  Rendered settings/_display.html.erb (7843.8ms)
  Rendered common/_tabs.html.erb (7984.4ms)
  Rendered settings/edit.html.erb within layouts/admin (7984.4ms)
Completed 500 Internal Server Error in 8093.8ms

ActionView::Template::Error (can not load translations from e:/data/redmine/config/locales/sl.yml: expects it to return a hash, but does not):
    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_check_box :force_default_language_for_anonymous %></p>
    9: 
  lib/redmine/i18n.rb:167:in `init_translations'
  lib/redmine/i18n.rb:181:in `lookup'
  lib/redmine/i18n.rb:98:in `block in languages_options'
  lib/redmine/i18n.rb:97:in `select'
  lib/redmine/i18n.rb:97:in `languages_options'
  lib/redmine/i18n.rb:103:in `block in languages_options'
  lib/redmine/i18n.rb:102:in `languages_options'
  app/helpers/application_helper.rb:1041:in `lang_options_for_select'
  app/views/settings/_display.html.erb:6:in `block in _app_views_settings__display_html_erb___883592265_43148952'
  app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb___883592265_43148952'
  app/views/common/_tabs.html.erb:22:in `block in _app_views_common__tabs_html_erb__542797332_42179844'
  app/views/common/_tabs.html.erb:21:in `each'
  app/views/common/_tabs.html.erb:21:in `_app_views_common__tabs_html_erb__542797332_42179844'
  app/helpers/application_helper.rb:328:in `render_tabs'
  app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb___546118604_40738836'
  app/controllers/settings_controller.rb:28:in `index'

There is something bad with Slovenian language file sl.yml.
Affected version is 2.6.2, but older versions suffer too. After removing sl.yml, /settings page appeared normally.


Files

sl.png (64.8 KB) sl.png Toshi MARUYAMA, 2015-02-25 13:44
Actions #1

Updated by Toshi MARUYAMA about 9 years ago

  • File sl.png sl.png added
  • Status changed from New to Needs feedback

I cannot reproduce.

$ hg parent --template='{branch}:{desc}\n'
2.6-stable:tagged version 2.6.2

$ ruby --version
ruby 1.9.3p551 (2014-11-13) [i386-mingw32]

$ rake locales:check_parsing_by_psych
parsing ./config/locales/ar.yml...
parsing ./config/locales/az.yml...
parsing ./config/locales/bg.yml...
parsing ./config/locales/bs.yml...
parsing ./config/locales/ca.yml...
parsing ./config/locales/cs.yml...
parsing ./config/locales/da.yml...
parsing ./config/locales/de.yml...
parsing ./config/locales/el.yml...
parsing ./config/locales/en-GB.yml...
parsing ./config/locales/en.yml...
parsing ./config/locales/es.yml...
parsing ./config/locales/et.yml...
parsing ./config/locales/eu.yml...
parsing ./config/locales/fa.yml...
parsing ./config/locales/fi.yml...
parsing ./config/locales/fr.yml...
parsing ./config/locales/gl.yml...
parsing ./config/locales/he.yml...
parsing ./config/locales/hr.yml...
parsing ./config/locales/hu.yml...
parsing ./config/locales/id.yml...
parsing ./config/locales/it.yml...
parsing ./config/locales/ja.yml...
parsing ./config/locales/ko.yml...
parsing ./config/locales/lt.yml...
parsing ./config/locales/lv.yml...
parsing ./config/locales/mk.yml...
parsing ./config/locales/mn.yml...
parsing ./config/locales/nl.yml...
parsing ./config/locales/no.yml...
parsing ./config/locales/pl.yml...
parsing ./config/locales/pt-BR.yml...
parsing ./config/locales/pt.yml...
parsing ./config/locales/ro.yml...
parsing ./config/locales/ru.yml...
parsing ./config/locales/sk.yml...
parsing ./config/locales/sl.yml...
parsing ./config/locales/sq.yml...
parsing ./config/locales/sr-YU.yml...
parsing ./config/locales/sr.yml...
parsing ./config/locales/sv.yml...
parsing ./config/locales/th.yml...
parsing ./config/locales/tr.yml...
parsing ./config/locales/uk.yml...
parsing ./config/locales/vi.yml...
parsing ./config/locales/zh-TW.yml...
parsing ./config/locales/zh.yml...
$

Actions #2

Updated by Ivan Cenov about 9 years ago

The root cause could be some plugin in my system.
The log does not tell which line of sl.yml causes the problem. It if would help, I may investigate which one of the labels is the problem.

Actions #3

Updated by Ivan Cenov about 9 years ago

I returned sl.yml at its place and restarted Redmine and the browser Firefox. Internal error did not occurred. However in the profile page, 'Slovenščina' did not appeared in language selection drop-down list. There is nothing suspicious in the log file.

Actions #4

Updated by Go MAEDA about 9 years ago

Ivan Cenov wrote:

However in the profile page, 'Slovenščina' did not appeared in language selection drop-down list. There is nothing suspicious in the log file.

Please run bundle exec rake tmp:clear.
Items in the drop-down list are cached.

Actions #5

Updated by Go MAEDA over 7 years ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Invalid

Maybe the problem was solved, because Ivan Cenov contributing so frequently now. Closing.

Actions

Also available in: Atom PDF