Strings on the template generator are not internationalized

Bug #1747302 reported by Yuko Katabami
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
heat-dashboard
In Progress
High
xinni

Bug Description

On the heat-dashboard, all strings (except the tab label) are not internationalized / localized thus rendered in English, even the Horizon language is set to a non-English locale.

It includes the following:

Template Generator

Please drag and drop resource icons into center canvas to define resource for template.

Template Version

Edit

Connect

Back

Template Generator

Manage Drafts

Clear Canvas

Revision history for this message
Yuko Katabami (ykatabam) wrote :
Yuko Katabami (ykatabam)
description: updated
Akihiro Motoki (amotoki)
summary: - Strings on the heat-dashboard are not internationalized
+ Strings on the template generator are not internationalized
Kaz Shinohara (kazsh)
Changed in heat-dashboard:
assignee: nobody → xinni (xinni-ge)
importance: Undecided → High
status: New → In Progress
Revision history for this message
xinni (xinni-ge) wrote :

Lack of translation needs to be fixed in different way case by case.

template_generator/index.html should be translated as django template. This may be merged into Queens release.

And some needs to be translated in an angular-gettext way. This may be fixed in later release.

As for translation in canvas, I agree to delete the hard-coding lines. And I suggest the deletion may be merged in Queens release, too.

Additionally, vis.js is used to implement the canvas, and it has its own way to localize (see link below).
http://visjs.org/docs/network/#locales
But only three simple words need translation in canvas, "Edit", "Connect", and "Back". Maybe we don't want to spend much time to solve this part.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat-dashboard (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat-dashboard (master)

Reviewed: https://review.openstack.org/541126
Committed: https://git.openstack.org/cgit/openstack/heat-dashboard/commit/?id=01828789e23ca75fca0c0a29d811dfbb7e2f35ba
Submitter: Zuul
Branch: master

commit 01828789e23ca75fca0c0a29d811dfbb7e2f35ba
Author: Akihiro Motoki <email address hidden>
Date: Tue Feb 6 13:51:53 2018 +0900

    i18n: Annotate template generator django template properly

    Strings in Django template for the template generator was previously
    annotated using angular-gettext syntax, but this is Djnago temaplate.
    Djnago templates need to be annotated in the Django i18n way [1].

    [1] https://docs.djangoproject.com/en/2.0/topics/i18n/translation/#internationalization-in-template-code

    Change-Id: I094fd3ab1c59bb1f96e713a70054cc5b99898974
    Partial-Bug: #1747302

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/541204
Committed: https://git.openstack.org/cgit/openstack/heat-dashboard/commit/?id=62a93c9b8056da5c969347a0ab7bd53755f7dc82
Submitter: Zuul
Branch: master

commit 62a93c9b8056da5c969347a0ab7bd53755f7dc82
Author: Xinni Ge <email address hidden>
Date: Tue Feb 6 16:53:24 2018 +0900

    Delete hard-coding lines of locale

    Hard-coding of canvas translation for ja-JP is not supposed to be
     in javasript files.
    Delete related lines in vis-network controller.

    Change-Id: Ic71d8b04607854d0cb40cd0de6751632f7380639
    Partial-Bug: #1747302

Revision history for this message
Yuko Katabami (ykatabam) wrote :

Thank you very much for the quick action to fix this.

Just reporting that I have checked the Template Generator tab on my test environment and found that majority of issues are resolved.
The page title, description, and menu buttons (and their tooltips) are localized now, however the button labels and the message shown on the top left of the canvas, as well as the messages shown on the top right after an action was performed are still unlocalized (see screenshot attached).

Revision history for this message
Yuko Katabami (ykatabam) wrote :

My apologies -- I have overlooked the comment #2:
   But only three simple words need translation in canvas, "Edit", "Connect", and "Back". Maybe we
   don't want to spend much time to solve this part.

Thank you once again for your quick action.

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

Other bug subscribers

Remote bug watches

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