Project

General

Profile

Actions

Defect #14428

closed

ActionView::Template::Error (translation missing: en.number.human.storage_units.format)

Added by Leo L. over 11 years ago. Updated about 10 years ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hello,

We are 5 in a team. Most of us have a french environment, but one has an english environment.
The one with english environment can't connect Redmine : He got a "500 internal error".
The rest connect fine !

So I took a look at the logs, and I can see the following error when he tries to connect :

@Started GET "/" for 213.30.164.210 at 2013-07-09 18:11:17 +0200
Processing by WelcomeController#index as HTML
Current user: anonymous
Redirected to https://druide.123-opportunity.com/login?back_url=https%3A%2F%2Fdruide.123-opportunity.com%2F
Filter chain halted as :check_if_login_required rendered or redirected
Completed 302 Found in 3ms (ActiveRecord: 0.6ms)
Started GET "/login?back_url=https%3A%2F%2Fdruide.123-opportunity.com%2F" for 213.30.164.210 at 2013-07-09 18:11:17 +0200
Processing by AccountController#login as HTML
Parameters: {"back_url"=>"https://druide.123-opportunity.com/"}
Current user: anonymous
Rendered account/login.html.erb within layouts/base (1.3ms)
Rendered plugins/redmine_improved_searchbox/app/views/redmine_improved_searchbox/_redmine_improved_searchbox_partial.html.erb (1.4ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (1.3ms)
Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (3.7ms)
Completed 500 Internal Server Error in 15ms

ActionView::Template::Error (translation missing: en.number.human.storage_units.format):
2: <span id="cbp_images_form">
3: <span id="cbp_image_fields"></span>
4: <span class="add_attachment"><%= link_to_function(l(:cbp_txt_add_image), 'cbImagePaste.showPasteDialog(); return false;', :class => 'add_attachment') >
5: (<
= l(:label_max_size) >: <= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</span>
6: </span>
7:
8: <!-- input field span inspired by redmine/app/views/attachments/_form.html.erb -->
lib/redmine/hook.rb:111:in `block in render_on'
lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
lib/redmine/hook.rb:61:in `each'
lib/redmine/hook.rb:61:in `block in call_hook'
lib/redmine/hook.rb:58:in `tap'
lib/redmine/hook.rb:58:in `call_hook'
lib/redmine/hook.rb:158:in `call_hook'
app/views/layouts/base.html.erb:75:in `_app_views_layouts_base_html_erb__350208797_383876100'@

I tried to google it but I couldn't find a solution or a clear indication.

For information :
Environment:
Redmine version 2.3.1.stable.11981
Ruby version 1.9.3 (i386-freebsd9)
Rails version 3.2.13
Environment production
Database adapter Mysql2
Redmine plugins:
clipboard_image_paste 1.6a
projects_tree_view 0.0.8
redmine_all_files 0.0.3
redmine_documents_short 0.2.0
redmine_improved_searchbox 0.0.3
redmine_issue_checklist 2.0.5
redmine_monitoring_controlling 0.1.1

Actions #1

Updated by Leo L. over 11 years ago

I found the solution : In firefox, for example, if the variable "intl.accept-languages" is set to "en, en-us" only, the "500 internal error" shows up.
You have to manually set it to "en, en-us, fr, fr-fr" (or every locale of your language) to avoid the error.

--
Léo.

Actions #2

Updated by Leo L. over 11 years ago

  • Status changed from New to Resolved
Actions #3

Updated by Jan Niggemann (redmine.org team member) over 11 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Glad you figured it out

Actions #4

Updated by Leo L. over 11 years ago

But do you know why redmine does not detect the en.yml locale existing in /config/locale/ ?
If the locale exists, shouldn't redmine be in english ?

--
Léo.

Actions #5

Updated by Andreas Hartmann almost 11 years ago

We've got the exactly same Issue here with a Redmine installation running in German and users with browsers set to en_US.

The logs show:

ActionView::Template::Error (translation missing: en.number.human.storage_units.format):

Furthermore the translation has been updated and redmine restarted. But the error still shows up.

Any idea on how to fix this issue on the server side?

Kind regards,

Andreas

Actions #6

Updated by Adi Kriegisch about 10 years ago

please reopen this issue: whatever client side setting shall never, ever cause a server error (500)!

I may probably add some details to this error (I use the Debian Redmine packages and tried to install redmine_dmsf):
my redmine instances (yes, I run several instances with the debian packages just fine) are served by uwsgi

probably another symptom that may help with diagnozing the issue is that I explicitly needed to add
'require 'simple_enum'" in app/models/dmsf_lock.rb to be able to run the migrate task.
Furthermore I removed "require ::File.expand_path('../config/environment', FILE)" to fix a runtime error caused by wrong absolute path as this expand_path expands to /usr/share/redmine/plugins/redmine_dmsf/app/controllers/config/environment.

somehow there are path issues as soon as there is the plugin enabled:

I18n::InvalidLocaleData (can not load translations from /usr/lib/ruby/vendor_ruby/../locales/en.yml: #<Errno::ENO
ENT: No such file or directory - /usr/lib/ruby/vendor_ruby/../locales/en.yml>):

when I create a link to a locales directory I get different errors

Actions #7

Updated by Toshi MARUYAMA about 10 years ago

Adi Kriegisch wrote:

please reopen this issue: whatever client side setting shall never, ever cause a server error (500)!

Please contact plugin author.

Actions

Also available in: Atom PDF