Content
Error found when access menu 'Work Package > New' using Thai Language
Added by Chate Kantapanit over 10 years ago
Hi, Experts,
When I change language preference into Thai (just add th.yml file then restart server)
everything works fines, language show properly, except menu Work Package > New
(This error not appear when I choose language as English)
I installed OpenProject 3.0 on Ubuntu 12.04 on MySQL
Kindly see detail below
TypeError in Work_packages#new
Showing /home/chate/openproject/app/views/attachments/_form.html.erb where line #41 raised:
wrong argument type String (expected Fixnum)
Extracted source (around line #41):
38: </div> 39: <br /> 40: <span class="add_another_file"> 41: <%= link_to l(:label_add_another_file), '#', :onclick => 'addFileField(); return false;' %> 42: (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) 43: </span>
Please see detail in attached file.
please let me know if you need any further information.
THanks.
Replies (4)
This issue also happen when I click open wiki and show forum in project as well,
please see attached.
Thank you.
This error still show when try to edit work package in Thai Language, but no problem when using English as user’s language preference,
Could you please help ?
TypeError in Work_packages#edit
Showing /home/chate/openproject/app/views/attachments/_nested_form.html.erb where line #50 raised:
wrong argument type String (expected Fixnum)
Extracted source (around line #50):
47: <span class="add_another_file"> 48: <%= link_to l(:label_add_another_file), 49: '#', 50: :onclick => 'addFileField(); return false;' %> 51: (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>) 52: </span>
Trace of template inclusion: app/views/work_packages/_edit.html.erb
Rails.root: /home/chate/openproject
Full Trace
actionpack (3.2.17) lib/action_view/helpers/number_helper.rb:363:in `round' actionpack (3.2.17) lib/action_view/helpers/number_helper.rb:363:in `number_with_precision' actionpack (3.2.17) lib/action_view/helpers/number_helper.rb:461:in `number_to_human_size' app/views/attachments/_nested_form.html.erb:50:in `_app_views_attachments__nested_form_html_erb__1342013699206002522_123223900' actionpack (3.2.17) lib/action_view/template.rb:145:in `block in render' activesupport (3.2.17) lib/active_support/notifications.rb:125:in `instrument' actionpack (3.2.17) lib/action_view/template.rb:143:in `render' actionpack (3.2.17) lib/action_view/renderer/partial_renderer.rb:265:in `render_partial' actionpack (3.2.17) lib/action_view/renderer/partial_renderer.rb:238:in `block in render' actionpack (3.2.17) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' activesupport (3.2.17) lib/active_support/notifications.rb:123:in `block in instrument' activesupport (3.2.17) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (3.2.17) lib/active_support/notifications.rb:123:in `instrument' actionpack (3.2.17) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' actionpack (3.2.17) lib/action_view/renderer/partial_renderer.rb:237:in `render' actionpack (3.2.17) lib/action_view/renderer/renderer.rb:41:in `render_partial' actionpack (3.2.17) lib/action_view/renderer/renderer.rb:15:in `render' actionpack (3.2.17) lib/action_view/helpers/rendering_helper.rb:24:in `render' prototype-rails (3.2.1) lib/prototype-rails/rendering.rb:8:in `render_with_update' app/views/work_packages/_edit.html.erb:98:in `block in _app_views_work_packages__edit_html_erb___2526559941324334089_82442120' actionpack (3.2.17) lib/action_view/helpers/capture_helper.rb:40:in `block in capture' actionpack (3.2.17) lib/action_view/helpers/capture_helper.rb:187:in `with_output_buffer' actionpack (3.2.17) lib/action_view/helpers/capture_helper.rb:40:in `capture' actionpack (3.2.17) lib/action_view/helpers/form_helper.rb:378:in `form_for' app/helpers/application_helper.rb:907:in `labelled_tabular_form_for' app/views/work_packages/_edit.html.erb:32:in `_app_views_work_packages__edit_html_erb___2526559941324334089_82442120' actionpack (3.2.17) lib/action_view/template.rb:145:in `block in render' activesupport (3.2.17) lib/active_support/notifications.rb:125:in `instrument' actionpack (3.2.17) lib/action_view/template.rb:143:in `render' actionpack (3.2.17) lib/action_view/renderer/partial_renderer.rb:265:in `render_partial' actionpack (3.2.17) lib/action_view/renderer/partial_renderer.rb:238:in `block in render' actionpack (3.2.17) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' activesupport (3.2.17) lib/active_support/notifications.rb:123:in `block in instrument' activesupport (3.2.17) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (3.2.17) lib/active_support/notifications.rb:123:in `instrument' actionpack (3.2.17) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' actionpack (3.2.17) lib/action_view/renderer/partial_renderer.rb:237:in `render' actionpack (3.2.17) lib/action_view/renderer/renderer.rb:41:in `render_partial' actionpack (3.2.17) lib/action_view/renderer/renderer.rb:15:in `render' actionpack (3.2.17) lib/abstract_controller/rendering.rb:110:in `_render_template' actionpack (3.2.17) lib/action_controller/metal/streaming.rb:225:in `_render_template' actionpack (3.2.17) lib/abstract_controller/rendering.rb:103:in `render_to_body' actionpack (3.2.17) lib/action_controller/metal/renderers.rb:28:in `render_to_body' actionpack (3.2.17) lib/action_controller/metal/compatibility.rb:50:in `render_to_body' actionpack (3.2.17) lib/abstract_controller/rendering.rb:88:in `render' actionpack (3.2.17) lib/action_controller/metal/rendering.rb:16:in `render' actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:40:in `block (2 levels) in render' activesupport (3.2.17) lib/active_support/core_ext/benchmark.rb:5:in `block in ms' /home/chate/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/benchmark.rb:294:in `realtime' activesupport (3.2.17) lib/active_support/core_ext/benchmark.rb:5:in `ms' actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:40:in `block in render' actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:83:in `cleanup_view_runtime' activerecord (3.2.17) lib/active_record/railties/controller_runtime.rb:24:in `cleanup_view_runtime' actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:39:in `render' app/controllers/work_packages_controller.rb:173:in `block (2 levels) in edit' actionpack (3.2.17) lib/action_controller/metal/mime_responds.rb:196:in `call' actionpack (3.2.17) lib/action_controller/metal/mime_responds.rb:196:in `respond_to' app/controllers/work_packages_controller.rb:168:in `edit' actionpack (3.2.17) lib/action_controller/metal/implicit_render.rb:4:in `send_action' actionpack (3.2.17) lib/abstract_controller/base.rb:167:in `process_action' actionpack (3.2.17) lib/action_controller/metal/rendering.rb:10:in `process_action' actionpack (3.2.17) lib/abstract_controller/callbacks.rb:18:in `block in process_action' activesupport (3.2.17) lib/active_support/callbacks.rb:557:in `_run__1823539893332287255__process_action__3598601365017769222__callbacks' activesupport (3.2.17) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.17) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' activesupport (3.2.17) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.2.17) lib/abstract_controller/callbacks.rb:17:in `process_action' actionpack (3.2.17) lib/action_controller/metal/rescue.rb:29:in `process_action' actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' activesupport (3.2.17) lib/active_support/notifications.rb:123:in `block in instrument' activesupport (3.2.17) lib/active_support/notifications/instrumenter.rb:20:in `instrument' activesupport (3.2.17) lib/active_support/notifications.rb:123:in `instrument' actionpack (3.2.17) lib/action_controller/metal/instrumentation.rb:29:in `process_action' actionpack (3.2.17) lib/action_controller/metal/params_wrapper.rb:207:in `process_action' activerecord (3.2.17) lib/active_record/railties/controller_runtime.rb:18:in `process_action' actionpack (3.2.17) lib/abstract_controller/base.rb:121:in `process' actionpack (3.2.17) lib/abstract_controller/rendering.rb:45:in `process' actionpack (3.2.17) lib/action_controller/metal.rb:203:in `dispatch' actionpack (3.2.17) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' actionpack (3.2.17) lib/action_controller/metal.rb:246:in `block in action' actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:73:in `call' actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:73:in `dispatch' actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:36:in `call' journey (1.0.4) lib/journey/router.rb:68:in `block in call' journey (1.0.4) lib/journey/router.rb:56:in `each' journey (1.0.4) lib/journey/router.rb:56:in `call' actionpack (3.2.17) lib/action_dispatch/routing/route_set.rb:608:in `call' request_store (1.0.5) lib/request_store/middleware.rb:9:in `call' /home/chate/.rvm/gems/ruby-2.1.1/bundler/gems/i18n-js-8801f8d17ef9/lib/i18n/js/middleware.rb:11:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' rack (1.4.5) lib/rack/etag.rb:23:in `call' rack (1.4.5) lib/rack/conditionalget.rb:25:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/head.rb:14:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/params_parser.rb:21:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/flash.rb:242:in `call' rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context' rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/cookies.rb:341:in `call' activerecord (3.2.17) lib/active_record/query_cache.rb:64:in `call' activerecord (3.2.17) lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' activesupport (3.2.17) lib/active_support/callbacks.rb:405:in `_run__1346238357084724606__call__2244646284498460543__callbacks' activesupport (3.2.17) lib/active_support/callbacks.rb:405:in `__run_callback' activesupport (3.2.17) lib/active_support/callbacks.rb:385:in `_run_call_callbacks' activesupport (3.2.17) lib/active_support/callbacks.rb:81:in `run_callbacks' actionpack (3.2.17) lib/action_dispatch/middleware/callbacks.rb:27:in `call' rails-dev-tweaks (0.6.1) lib/rails_dev_tweaks/granular_autoload/middleware.rb:34:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/remote_ip.rb:31:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' railties (3.2.17) lib/rails/rack/logger.rb:32:in `call_app' railties (3.2.17) lib/rails/rack/logger.rb:16:in `block in call' activesupport (3.2.17) lib/active_support/tagged_logging.rb:22:in `tagged' railties (3.2.17) lib/rails/rack/logger.rb:16:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/request_id.rb:22:in `call' rack (1.4.5) lib/rack/methodoverride.rb:21:in `call' rack (1.4.5) lib/rack/runtime.rb:17:in `call' activesupport (3.2.17) lib/active_support/cache/strategy/local_cache.rb:72:in `call' rack (1.4.5) lib/rack/lock.rb:15:in `call' actionpack (3.2.17) lib/action_dispatch/middleware/static.rb:63:in `call' railties (3.2.17) lib/rails/engine.rb:484:in `call' railties (3.2.17) lib/rails/application.rb:231:in `call' railties (3.2.17) lib/rails/railtie/configurable.rb:30:in `method_missing' /home/chate/.rvm/gems/ruby-2.1.1/bundler/gems/rack-protection-5a7d1bd2f05c/lib/rack/protection/frame_options.rb:31:in `call' /home/chate/.rvm/gems/ruby-2.1.1/bundler/gems/rack-protection-5a7d1bd2f05c/lib/rack/protection/json_csrf.rb:18:in `call' rack (1.4.5) lib/rack/content_length.rb:14:in `call' railties (3.2.17) lib/rails/rack/log_tailer.rb:17:in `call' thin (1.5.1) lib/thin/connection.rb:81:in `block in pre_process' thin (1.5.1) lib/thin/connection.rb:79:in `catch' thin (1.5.1) lib/thin/connection.rb:79:in `pre_process' thin (1.5.1) lib/thin/connection.rb:54:in `process' thin (1.5.1) lib/thin/connection.rb:39:in `receive_data' eventmachine (1.0.3) lib/eventmachine.rb:187:in `run_machine' eventmachine (1.0.3) lib/eventmachine.rb:187:in `run' thin (1.5.1) lib/thin/backends/base.rb:63:in `start' thin (1.5.1) lib/thin/server.rb:159:in `start' rack (1.4.5) lib/rack/handler/thin.rb:13:in `run' rack (1.4.5) lib/rack/server.rb:268:in `start' railties (3.2.17) lib/rails/commands/server.rb:70:in `start' railties (3.2.17) lib/rails/commands.rb:55:in `block in <top (required)>' railties (3.2.17) lib/rails/commands.rb:50:in `tap' railties (3.2.17) lib/rails/commands.rb:50:in `<top (required)>' script/rails:6:in `require' script/rails:6:in `<main>'
Thank you so much
Hi,
there was a bug with some translations where some plural words are missing in non-english translations. This might be the case with your
th.yml
and the cause of your problem.The error should be fixed if you use the openproject-translations plugin (use the
dev
branch for daily updated translations). Because we translate OpenProject via this crowdin project you can even contribute to the translations to make them better.yours,
tessi
Hello Tessi
Thank you so much,
I will try replace file
th.yml
with the new versionRegards,
Chate