This project is archived and is in readonly mode.
[PATCH] scoped translation throws an exception
-
John Pignata
This is really broken in Rails 3 due to the Action View refactoring. The test continues to pass because of a stub but when trying to use scoped keys, a call to the removed path_without_format_and_extension causes an error.
I guess we'll have to patch the translation helper to do its own parsing of template.identifier to support scoped keys in the 3. Any thoughts?
-
John Pignata
- Tag changed from i18n to i18n, rails3
- Title changed from translation helper fails in localized views to scoped translation throws an exception
To clarify the above - this is verified in 2-3-stable, and even worse in master as translation_helper hasn't been refactored to be in step with the new Action View code.
-
John Pignata
- Assigned user set to Yehuda Katz (wycats)
Here's my attempt at a fix. I've added the details previously accessible in path_without_format_and_extension by the translation helper to the new details hash.
-
John Pignata
- Title changed from scoped translation throws an exception to [PATCH] scoped translation throws an exception
Here's a patch to fix the more minor problem of scoped translations not working in localized views on 2.3.3.
-
Martin Andert
The patch for rails3 doesn't apply (anymore). The
templateVariable seems to be alwaysnil. As a fix for this I changed a line inaction_view/render/rendering.rb:def render_template(options) _evaluate_assigns_and_ivars #template, layout, partial = options.values_at(:_template, :_layout, :_partial) self.template, layout, partial = options.values_at(:_template, :_layout, :_partial) _render_template(template, layout, options, partial) endBut then the
scope_key_by_partialmethod intranslation_helper.rbreturns a localization key with double periods ("..") in it. -
Martin Andert
- Tag changed from i18n, rails3 to bugmash, i18n, rails3
-
Rohit Arondekar
- State changed from new to stale
- Importance changed from to
Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.
