Skip to content
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

Merged
merged 2 commits into from Jun 15, 2018

Conversation

bdunogier
Copy link
Member

@bdunogier bdunogier commented Jun 4, 2018

Question Answer
Tickets EZP-28890
Bug fix? no
New feature? no
BC breaks? no
Tests pass? yes
Doc needed? yes
License GPL-2.0

Adds support for in-context translation, as introduced in ezsystems/PlatformUIBundle#773.

Checklist:

  • Consider having a variable that sets the crowdin project, instead of hardcoding ezplatform. It would allow usage of in-context for any 3rd party bundle.
  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

Copy link
Member Author

@bdunogier bdunogier left a 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' %}
Copy link
Member Author

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">
Copy link
Member Author

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.

@bdunogier
Copy link
Member Author

Ping @sunpietro @dew326. This needs to move forward guys :)

Without it, no in-context.

@bdunogier bdunogier force-pushed the ezp28890-crowdin_in_context_js branch from 7a29230 to f048f88 Compare June 14, 2018 14:48
Copy link
Member

@lserwatka lserwatka left a 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.

@lserwatka lserwatka merged commit 5fe7cea into master Jun 15, 2018
@lserwatka lserwatka deleted the ezp28890-crowdin_in_context_js branch June 15, 2018 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants