dashboard: Some templates are hard to translate due to string concatenation

Bug #1625292 reported by Akihiro Motoki
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
Critical
Akihiro Motoki
Newton
Fix Released
Critical
Akihiro Motoki

Bug Description

String concatenation is used in the following templates. As a result, translator cannot control the word order.
In blocktrans, we can use a variable [1] and it is the recommended way.

[1] https://docs.djangoproject.com/ja/1.10/topics/i18n/translation/#std:templatetag-blocktrans

sahara_dashboard/content/data_processing/clusters/templates/cluster_templates/_config_domain_names_help.html

    {% blocktrans %}Selected domain name should already exist in the Designate.
    You can check it in "DNS" tab on the left menu or by executing {% endblocktrans %}
    "designate domain-list"
    {% blocktrans %}on the controller node.{% endblocktrans %}

sahara_dashboard/content/data_processing/clusters/templates/cluster_templates/_configure_general_help.html

          <p> {% blocktrans %} Version {% endblocktrans %}: <b>{{ hadoop_version }}</b>
              {% blocktrans %} of plugin {% endblocktrans %} <b>{{ plugin_name }} </b>
              {% blocktrans %} is now deprecated. {% endblocktrans %}
          </p>

Tags: dashboard i18n
Akihiro Motoki (amotoki)
Changed in sahara:
assignee: nobody → Akihiro Motoki (amotoki)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara-dashboard (master)

Fix proposed to branch: master
Review: https://review.openstack.org/372652

Changed in sahara:
status: New → In Progress
Changed in sahara:
importance: Undecided → High
milestone: none → ocata-1
Changed in sahara:
importance: High → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara-dashboard (master)

Reviewed: https://review.openstack.org/372652
Committed: https://git.openstack.org/cgit/openstack/sahara-dashboard/commit/?id=1f507c330c4a8a3e019e4b5d9a0fe3341ce65692
Submitter: Jenkins
Branch: master

commit 1f507c330c4a8a3e019e4b5d9a0fe3341ce65692
Author: Akihiro Motoki <email address hidden>
Date: Tue Sep 20 02:37:21 2016 +0900

    Allow translators to control word order in templates

    Different languages use different word order, so string concatenation
    in the source code prevents translators from using natural wording
    in their languages.

    blocktrans allows developers to use variables and it is the recommented way.
    https://docs.djangoproject.com/ja/1.10/topics/i18n/translation/#std:templatetag-blocktrans

    Change-Id: I9d69152ea1c45d465488d1a87be29def538f9c8a
    Closes-Bug: #1625292

Changed in sahara:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to sahara-dashboard (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/372931

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara-dashboard (stable/newton)

Reviewed: https://review.openstack.org/372884
Committed: https://git.openstack.org/cgit/openstack/sahara-dashboard/commit/?id=8bc78d829f1e0ee597ee1a226c8f7db70294271e
Submitter: Jenkins
Branch: stable/newton

commit 8bc78d829f1e0ee597ee1a226c8f7db70294271e
Author: Akihiro Motoki <email address hidden>
Date: Tue Sep 20 02:37:21 2016 +0900

    Allow translators to control word order in templates

    Different languages use different word order, so string concatenation
    in the source code prevents translators from using natural wording
    in their languages.

    blocktrans allows developers to use variables and it is the recommented way.
    https://docs.djangoproject.com/ja/1.10/topics/i18n/translation/#std:templatetag-blocktrans

    Change-Id: I9d69152ea1c45d465488d1a87be29def538f9c8a
    Closes-Bug: #1625292
    (cherry picked from commit 1f507c330c4a8a3e019e4b5d9a0fe3341ce65692)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to sahara-dashboard (master)

Reviewed: https://review.openstack.org/372931
Committed: https://git.openstack.org/cgit/openstack/sahara-dashboard/commit/?id=3a7ef163669e1a96362903d69a30f89c06673e05
Submitter: Jenkins
Branch: master

commit 3a7ef163669e1a96362903d69a30f89c06673e05
Author: Akihiro Motoki <email address hidden>
Date: Tue Sep 20 06:27:02 2016 +0000

    Allow translators to control word order in templates (again)

    There is one remaining thing which is not covered by
    https://review.openstack.org/#/c/372652/ .

    Change-Id: Idf3880c9348b41523dafe19fe88c71a63c7012ee
    Related-Bug: #1625292

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to sahara-dashboard (stable/newton)

Related fix proposed to branch: stable/newton
Review: https://review.openstack.org/373024

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to sahara-dashboard (stable/newton)

Reviewed: https://review.openstack.org/373024
Committed: https://git.openstack.org/cgit/openstack/sahara-dashboard/commit/?id=0ff74de8c95be72daf36da4a1276eb102d5ac357
Submitter: Jenkins
Branch: stable/newton

commit 0ff74de8c95be72daf36da4a1276eb102d5ac357
Author: Akihiro Motoki <email address hidden>
Date: Tue Sep 20 06:27:02 2016 +0000

    Allow translators to control word order in templates (again)

    There is one remaining thing which is not covered by
    https://review.openstack.org/#/c/372652/ .

    Change-Id: Idf3880c9348b41523dafe19fe88c71a63c7012ee
    Related-Bug: #1625292
    (cherry picked from commit 3a7ef163669e1a96362903d69a30f89c06673e05)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/sahara-dashboard 5.0.0.0rc2

This issue was fixed in the openstack/sahara-dashboard 5.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/sahara-dashboard 5.0.0

This issue was fixed in the openstack/sahara-dashboard 5.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/sahara-dashboard 6.0.0.0b1

This issue was fixed in the openstack/sahara-dashboard 6.0.0.0b1 development milestone.

tags: removed: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/sahara-dashboard 5.0.0

This issue was fixed in the openstack/sahara-dashboard 5.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.