hdgarrood / redmine_release_notes

A plugin to add release notes to Redmine
GNU General Public License v3.0
73 stars 47 forks source link

buggy language files #90

Closed cforce closed 11 years ago

cforce commented 11 years ago

I get following eeeor whenn i surf to redmineinst.local/invoices/1

ActionView::Template::Error ((/home/user/redmine-2.3/plugins/redmine_release_notes/config/locales/ru.yml): did not find expected key while parsing a block mapping at line 86 column 8):
    28:     <th class="start-date"><%=l(:field_invoice_date)%>:</th><td class="start-date"><%= format_date(@invoice.invoice_date) %></td>
    29: </tr>
    30: <tr>
    31:     <th class="contact"><%=l(:field_invoice_language)%>:</th><td class="language"><%= invoice_avaliable_locales_hash[@invoice.language.blank? ? 'default' : @invoice.language] %></td>
    32:     <th class="due-date"><%=l(:field_invoice_due_date)%>:</th><td class="due-date"><%= format_date(@invoice.due_date) %></td>
    33: </tr>
    34: <tr>
  lib/redmine/i18n.rb:152:in `init_translations'
  lib/redmine/i18n.rb:166:in `lookup'
  lib/redmine/i18n.rb:52:in `ll'
cforce commented 11 years ago

see also http://redminecrm.com/boards/7/topics/1199-bugreport-cross-plugin-issue-with-redmine-release-notes-plugin

hdgarrood commented 11 years ago

Can you bundle exec rails c and post the output of I18n.load_path?

hdgarrood commented 11 years ago

Also, what was the locale set to when this happened?

cforce commented 11 years ago

There are also problems when trying to start redmine admin confif menu.

ActionView::Template::Error ((/home/user/WK/redmine-2.3/plugins/redmine_release_notes/config/locales/pt-BR.yml): found character that cannot start any token while scanning for the next token at line 55 column 1): 3:

4:

<%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank => :label_default, :label => :label_theme %>

5: 6:

<%= setting_select :default_language, lang_options_for_select(false) %>

7: 8:

<%= setting_select :start_of_week, [[day_name(1),'1'], [day_name(6),'6'], [day_name(7),'7']], :blank => :label_language_based %>

9: <% locale = User.current.language.blank? ? ::I18n.locale : User.current.language %> lib/redmine/i18n.rb:152:in init_translations' lib/redmine/i18n.rb:166:inlookup' lib/redmine/i18n.rb:52:in ll' lib/redmine/i18n.rb:96:inblock (2 levels) in languages_options' lib/redmine/i18n.rb:96:in map' lib/redmine/i18n.rb:96:inblock in languages_options' lib/redmine/i18n.rb:95:in languages_options' app/helpers/application_helper.rb:933:inlang_options_for_select' app/views/settings/_display.html.erb:6:in block in _app_views_settings__display_html_erb___345460764_123897390' app/views/settings/_display.html.erb:1:in_app_views_settingsdisplay_html_erb___345460764_123897390' app/views/common/_tabs.html.erb:24:in `block in _app_views_commontabs_html_erb_478406564_121255710' app/views/common/_tabs.html.erb:23:ineach' app/views/common/_tabs.html.erb:23:in_app_views_common__tabs_htmlerb478406564_121255710' app/helpers/application_helper.rb:271:inrender_tabs' app/views/settings/edit.html.erb:3:in_app_views_settings_edit_html_erb___82890199_121061670' app/controllers/settings_controller.rb:28:in`index'

cforce commented 11 years ago

Similar problem witrh ru.yml.

I removed both, now the admin menu nworks again.

cforce commented 11 years ago

redmineinst.local/invoices/1 now works also.

There are bugs in bhoth language files.

Please fix!

hdgarrood commented 11 years ago

It's kinda irritating when I ask questions to try to understand the problem and then you ignore them.

Anyway, I worked it out. Fix is on the way. You should close the other issue -- the problem is in this plugin, not redmine_crm

cforce commented 11 years ago

It's kinda irritating when I ask questions to try to understand the problem and then you ignore them.

I did not read ur question being offline at the week end, so debugging already and found the locale problem. So i didn't see it useful to search another way the bug cause i already found. Do you understand?

hdgarrood commented 11 years ago

Oh, I see. That makes sense. I guess I didn't understand when you said 'there are bugs in both language files' -- the fact that deleting them made the error stop appearing doesn't necessarily mean that the problem is in the language files. (I would have understood if you'd said something like "it's invalid YAML: If you go to https://yaml-online-parser.appspot.com/ and copy the contents in, it gives the same error message")

Anyway, I'm sorry. That was mean and uncalled for. Especially since redmine_release_notes is probably much more robust than it would have been if you hadn't been reporting the bugs you found. I will make more of an effort to be nice.