New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-28890: Added crowdin in-context translation JS code #499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be improved before it is merged.
@@ -34,6 +34,13 @@ | |||
</script> | |||
<script src="/bundles/fosjsrouting/js/router.js"></script> | |||
<script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script> | |||
{% if app.request.locale == 'ach_UG' %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be abstracted so that the way to detect in-context isn't bound to the implementation (if app.in_context_translation_enabled
).
@@ -34,6 +34,13 @@ | |||
</script> | |||
<script src="/bundles/fosjsrouting/js/router.js"></script> | |||
<script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script> | |||
{% if app.request.locale == 'ach_UG' %} | |||
<script type="text/javascript"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could/should be moved to the bottom of the file. It could also be added by an external file, as it is supported by the template. Pointers appreciated.
Ping @sunpietro @dew326. This needs to move forward guys :) Without it, no in-context. |
7a29230
to
f048f88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should proceed with it for now.
Adds support for in-context translation, as introduced in ezsystems/PlatformUIBundle#773.
Checklist:
ezplatform
. It would allow usage of in-context for any 3rd party bundle.$ composer fix-cs
)