Defect #18518
closedI18n::MissingTranslationData: translation missing: en.date.formats.default
0%
Description
Translations are at place (en.yml, ru.yml)
But sometimes this error is raised:
/gems/i18n-0.6.11/lib/i18n.rb:314 in "handle_exception" /gems/i18n-0.6.11/lib/i18n.rb:160 in "translate" /gems/i18n-0.6.11/lib/i18n/backend/base.rb:59 in "localize" /gems/i18n-0.6.11/lib/i18n.rb:246 in "localize" /lib/redmine/i18n.rb:60 in "format_date" /lib/redmine/i18n.rb:71 in "format_time" /app/helpers/application_helper.rb:451 in "time_tag" /app/helpers/application_helper.rb:443 in "authoring" /app/views/news/_news.html.erb:6 in "_app_views_news__news_html_erb__3800985998352011220_70351071650260" /gems/actionview-4.1.8/lib/action_view/template.rb:145 in "block in render" /gems/activesupport-4.1.8/lib/active_support/notifications.rb:161 in "instrument" /gems/actionview-4.1.8/lib/action_view/template.rb:339 in "instrument" /gems/actionview-4.1.8/lib/action_view/template.rb:143 in "render" /gems/actionview-4.1.8/lib/action_view/renderer/partial_renderer.rb:399 in "block in collection_with_template" /gems/actionview-4.1.8/lib/action_view/renderer/partial_renderer.rb:395 in "map" /gems/actionview-4.1.8/lib/action_view/renderer/partial_renderer.rb:395 in "collection_with_template" /gems/actionview-4.1.8/lib/action_view/renderer/partial_renderer.rb:291 in "render_collection" /gems/actionview-4.1.8/lib/action_view/renderer/partial_renderer.rb:275 in "block in render" /gems/actionview-4.1.8/lib/action_view/renderer/abstract_renderer.rb:38 in "block in instrument" /gems/activesupport-4.1.8/lib/active_support/notifications.rb:159 in "block in instrument" /gems/activesupport-4.1.8/lib/active_support/notifications/instrumenter.rb:20 in "instrument" /gems/activesupport-4.1.8/lib/active_support/notifications.rb:159 in "instrument" /gems/actionview-4.1.8/lib/action_view/renderer/abstract_renderer.rb:38 in "instrument" /gems/actionview-4.1.8/lib/action_view/renderer/partial_renderer.rb:274 in "render" /gems/actionview-4.1.8/lib/action_view/renderer/renderer.rb:47 in "render_partial" /gems/actionview-4.1.8/lib/action_view/renderer/renderer.rb:21 in "render" /gems/actionview-4.1.8/lib/action_view/helpers/rendering_helper.rb:32 in "render" /app/views/welcome/index.html.erb:8 in "_app_views_welcome_index_html_erb__2078558413296639286_70351050851840" /gems/actionview-4.1.8/lib/action_view/template.rb:145 in "block in render" /gems/activesupport-4.1.8/lib/active_support/notifications.rb:161 in "instrument" /gems/actionview-4.1.8/lib/action_view/template.rb:339 in "instrument" /gems/actionview-4.1.8/lib/action_view/template.rb:143 in "render" /gems/actionview-4.1.8/lib/action_view/renderer/template_renderer.rb:55 in "block (2 levels) in render_template" /gems/actionview-4.1.8/lib/action_view/renderer/abstract_renderer.rb:38 in "block in instrument" /gems/activesupport-4.1.8/lib/active_support/notifications.rb:159 in "block in instrument" /gems/activesupport-4.1.8/lib/active_support/notifications/instrumenter.rb:20 in "instrument" /gems/activesupport-4.1.8/lib/active_support/notifications.rb:159 in "instrument" /gems/actionview-4.1.8/lib/action_view/renderer/abstract_renderer.rb:38 in "instrument" /gems/actionview-4.1.8/lib/action_view/renderer/template_renderer.rb:54 in "block in render_template" /gems/actionview-4.1.8/lib/action_view/renderer/template_renderer.rb:62 in "render_with_layout" /gems/actionview-4.1.8/lib/action_view/renderer/template_renderer.rb:53 in "render_template" /gems/actionview-4.1.8/lib/action_view/renderer/template_renderer.rb:17 in "render" /gems/actionview-4.1.8/lib/action_view/renderer/renderer.rb:42 in "render_template" /gems/actionview-4.1.8/lib/action_view/renderer/renderer.rb:23 in "render" /gems/actionview-4.1.8/lib/action_view/rendering.rb:99 in "_render_template" /gems/actionpack-4.1.8/lib/action_controller/metal/streaming.rb:217 in "_render_template" /gems/actionview-4.1.8/lib/action_view/rendering.rb:82 in "render_to_body" /gems/actionpack-4.1.8/lib/action_controller/metal/rendering.rb:32 in "render_to_body" /gems/actionpack-4.1.8/lib/action_controller/metal/renderers.rb:32 in "render_to_body" /gems/actionpack-4.1.8/lib/abstract_controller/rendering.rb:25 in "render" /gems/actionpack-4.1.8/lib/action_controller/metal/rendering.rb:16 in "render" /gems/actionpack-4.1.8/lib/action_controller/metal/instrumentation.rb:41 in "block (2 levels) in render" /gems/activesupport-4.1.8/lib/active_support/core_ext/benchmark.rb:12 in "block in ms" /usr/local/lib/ruby/2.0.0/benchmark.rb:296 in "realtime" /gems/activesupport-4.1.8/lib/active_support/core_ext/benchmark.rb:12 in "ms" /gems/actionpack-4.1.8/lib/action_controller/metal/instrumentation.rb:41 in "block in render" /gems/actionpack-4.1.8/lib/action_controller/metal/instrumentation.rb:84 in "cleanup_view_runtime" /gems/activerecord-4.1.8/lib/active_record/railties/controller_runtime.rb:25 in "cleanup_view_runtime" /gems/actionpack-4.1.8/lib/action_controller/metal/instrumentation.rb:40 in "render" /gems/actionpack-4.1.8/lib/action_controller/metal/implicit_render.rb:10 in "default_render" /gems/actionpack-4.1.8/lib/action_controller/metal/implicit_render.rb:5 in "send_action" /gems/actionpack-4.1.8/lib/abstract_controller/base.rb:189 in "process_action" /gems/actionpack-4.1.8/lib/action_controller/metal/rendering.rb:10 in "process_action" /gems/actionpack-4.1.8/lib/abstract_controller/callbacks.rb:20 in "block in process_action" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:113 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:113 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:287 in "block in halting_and_conditional" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "block in halting" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "block in halting" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "block in halting" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "block in halting" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "block in halting" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "block in halting" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:229 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:229 in "block in halting" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:166 in "block in halting" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86 in "call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:86 in "run_callbacks" /gems/actionpack-4.1.8/lib/abstract_controller/callbacks.rb:19 in "process_action" /gems/actionpack-4.1.8/lib/action_controller/metal/rescue.rb:29 in "process_action" /gems/actionpack-4.1.8/lib/action_controller/metal/instrumentation.rb:31 in "block in process_action" /gems/activesupport-4.1.8/lib/active_support/notifications.rb:159 in "block in instrument" /gems/activesupport-4.1.8/lib/active_support/notifications/instrumenter.rb:20 in "instrument" /gems/activesupport-4.1.8/lib/active_support/notifications.rb:159 in "instrument" /gems/actionpack-4.1.8/lib/action_controller/metal/instrumentation.rb:30 in "process_action" /gems/actionpack-4.1.8/lib/action_controller/metal/params_wrapper.rb:250 in "process_action" /gems/activerecord-4.1.8/lib/active_record/railties/controller_runtime.rb:18 in "process_action" /gems/actionpack-4.1.8/lib/abstract_controller/base.rb:136 in "process" /gems/actionview-4.1.8/lib/action_view/rendering.rb:30 in "process" /gems/actionpack-4.1.8/lib/action_controller/metal.rb:196 in "dispatch" /gems/actionpack-4.1.8/lib/action_controller/metal/rack_delegation.rb:13 in "dispatch" /gems/actionpack-4.1.8/lib/action_controller/metal.rb:232 in "block in action" /gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:82 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:82 in "dispatch" /gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:50 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/journey/router.rb:73 in "block in call" /gems/actionpack-4.1.8/lib/action_dispatch/journey/router.rb:59 in "each" /gems/actionpack-4.1.8/lib/action_dispatch/journey/router.rb:59 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/routing/route_set.rb:678 in "call" /gems/rack-openid-1.4.2/lib/rack/openid.rb:98 in "call" /gems/request_store-1.0.5/lib/request_store/middleware.rb:9 in "call" /gems/rack-1.5.2/lib/rack/etag.rb:23 in "call" /gems/rack-1.5.2/lib/rack/conditionalget.rb:25 in "call" /gems/rack-1.5.2/lib/rack/head.rb:11 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/params_parser.rb:27 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/flash.rb:254 in "call" /gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225 in "context" /gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/cookies.rb:560 in "call" /gems/activerecord-4.1.8/lib/active_record/query_cache.rb:36 in "call" /gems/activerecord-4.1.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:621 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/callbacks.rb:29 in "block in call" /gems/activesupport-4.1.8/lib/active_support/callbacks.rb:82 in "run_callbacks" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/callbacks.rb:27 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/remote_ip.rb:76 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/debug_exceptions.rb:17 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/show_exceptions.rb:30 in "call" /gems/railties-4.1.8/lib/rails/rack/logger.rb:38 in "call_app" /gems/railties-4.1.8/lib/rails/rack/logger.rb:20 in "block in call" /gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:68 in "block in tagged" /gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:26 in "tagged" /gems/activesupport-4.1.8/lib/active_support/tagged_logging.rb:68 in "tagged" /gems/railties-4.1.8/lib/rails/rack/logger.rb:20 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/request_id.rb:21 in "call" /gems/rack-1.5.2/lib/rack/methodoverride.rb:21 in "call" /gems/rack-1.5.2/lib/rack/runtime.rb:17 in "call" /gems/activesupport-4.1.8/lib/active_support/cache/strategy/local_cache_middleware.rb:26 in "call" /gems/actionpack-4.1.8/lib/action_dispatch/middleware/static.rb:84 in "call" /gems/rack-1.5.2/lib/rack/sendfile.rb:112 in "call" /gems/railties-4.1.8/lib/rails/engine.rb:514 in "call" /gems/railties-4.1.8/lib/rails/application.rb:144 in "call" /gems/railties-4.1.8/lib/rails/railtie.rb:194 in "public_send" /gems/railties-4.1.8/lib/rails/railtie.rb:194 in "method_missing" /opt/passenger/passenger-4.0.53/lib/phusion_passenger/rack/thread_handler_extension.rb:74 in "process_request" /opt/passenger/passenger-4.0.53/lib/phusion_passenger/request_handler/thread_handler.rb:141 in "accept_and_process_next_request" /opt/passenger/passenger-4.0.53/lib/phusion_passenger/request_handler/thread_handler.rb:109 in "main_loop" /opt/passenger/passenger-4.0.53/lib/phusion_passenger/request_handler.rb:455 in "block (3 levels) in start_threads"
Environment: Redmine version 2.6.0.devel Ruby version 2.1.1-p76 (2014-02-24) [x86_64-darwin13.0] Rails version 4.1.8 Environment production Database adapter PostgreSQL SCM: Subversion 1.6.23 Git 2.1.0 Filesystem Redmine plugins: redmine_mili 0.0.1 redmine_s3_attachments 0.0.3
Files
Updated by Toshi MARUYAMA over 9 years ago
Try clear cache (see #13520#note-12).
Ruby version 2.1.1-p76 (2014-02-24) [x86_64-darwin13.0]
Try recent Ruby.
Latest ruby version is 2.1.5.
https://www.ruby-lang.org/en/
Redmine plugins:
redmine_mili 0.0.1
redmine_s3_attachments 0.0.3
If you don't intend Rails 4 porting of plugins, please try without plugins.
Updated by Denis Savitskiy over 9 years ago
Toshi MARUYAMA wrote:
Try clear cache (see #13520#note-12).
It doesn't help.
Try recent Ruby.
Latest ruby version is 2.1.5.
https://www.ruby-lang.org/en/
Thanks! I'll try.
If you don't intend Rails 4 porting of plugins, please try without plugins.
I ported them. The error is raised even in pure redmine installation running locally through
rails s
Updated by Denis Savitskiy over 9 years ago
Ruby update to 2.1.5 and update with trunk didn't help.
Updated by Toshi MARUYAMA about 9 years ago
- Status changed from New to Needs feedback
- Target version deleted (
3.0.0)
I cannot reproduce on trunk r13839.
Started GET "/" for 192.168.11.10 at 2015-01-05 16:23:31 +0900 Processing by WelcomeController#index as HTML Current user: anonymous Rendered news/_news.html.erb (3.7ms) Rendered welcome/index.html.erb within layouts/base (7.3ms) Completed 200 OK in 27ms (Views: 15.9ms | ActiveRecord: 1.5ms)
$ ruby --version ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
i18n gem has updated to 0.7.0.
Try "bundle update".
Updated by Denis Savitskiy about 9 years ago
Seems to be phusion passenger bug. Close.
Updated by Toshi MARUYAMA about 9 years ago
- Status changed from Needs feedback to Closed
- Resolution set to Invalid
Thank you for your feedback.
Updated by Denis Savitskiy about 9 years ago
- Status changed from Closed to Reopened
Well, tested on 2.6.1 stable running in development environment with Webrick, but the error repeated - with default app locale set to Russian, when user logins with locale set to English, app crashes with:
ActionView::Template::Error (translation missing: en.date.formats.default): 3: <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %> 4: <br /> 5: <% unless news.summary.blank? %><span class="summary"><%=h news.summary %></span><br /><% end %> 6: <span class="author"><%= authoring news.created_on, news.author %></span></p> lib/redmine/i18n.rb:60:in `format_date' lib/redmine/i18n.rb:71:in `format_time' app/helpers/application_helper.rb:455:in `time_tag' app/helpers/application_helper.rb:447:in `authoring' app/views/news/_news.html.erb:6:in `_app_views_news__news_html_erb___2426905220672602597_70277980553640' app/views/welcome/index.html.erb:8:in `_app_views_welcome_index_html_erb___1996514463793302823_70277985384900'
Updated by Toshi MARUYAMA about 9 years ago
- Status changed from Reopened to Closed
I cannot reproduce on 2.6.1.
All tests pass.
http://www.redmine.org/builds/index.html
Updated by Denis Savitskiy about 9 years ago
Toshi MARUYAMA wrote:
I cannot reproduce on 2.6.1.
All tests pass.
http://www.redmine.org/builds/index.html
I think, it is not covered in tests. Try: set default language to English, login, change profile language to Russian, shut down the server. Run it again and login. Boom!
Updated by dominik ch about 9 years ago
I got this issue,
I think it's related to debug mode and some cache files, my redmine is run in debug console via ruby, when I open it in that mode there are labels "pl:translation_is_missing:..." for some plugins links etc. Then when lang is changed to en - there is 500 error in both production and debug
clearing cache + restart helps
Updated by Denis Savitskiy about 9 years ago
dominik ch wrote:
I got this issue,
I think it's related to debug mode and some cache files, my redmine is run in debug console via ruby, when I open it in that mode there are labels "pl:translation_is_missing:..." for some plugins links etc. Then when lang is changed to en - there is 500 error in both production and debug
clearing cache + restart helps
This is because Redmine extends I18n with its own caching methods.
Updated by dominik ch about 9 years ago
I found a clue to my error here:
http://www.redmine.org/issues/12900
There were language files with wrong name, in my case pl.yml with first line as: "en:"
when I corrected this - no error 500
Hope this will help someone else and maybe there is a way to detect such errors in lang files? It can be in any plugin :(
Updated by Denis Savitskiy about 9 years ago
dominik ch wrote:
I found a clue to my error here:
http://www.redmine.org/issues/12900There were language files with wrong name, in my case pl.yml with first line as: "en:"
when I corrected this - no error 500
Hope this will help someone else and maybe there is a way to detect such errors in lang files? It can be in any plugin :(
Yepp, I had the same error in a plugin.