ng launch instance workflow: hard to control the word order in translations

Bug #1553610 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Akihiro Motoki

Bug Description

The following commit recently merged introduces a difficult situation for translations.

commit be9023d86e058d81d6c2504e87c3a385f34472e6
    Fix theming in angular launch instance

horizon/static/framework/widgets/load-edit/load-edit.html

    <span translate>Script size:</span>
    {$ (scriptLength || 0) | bytes $}
    <span translate>of</span>
    {$ config.MAX_SCRIPT_SIZE | bytes $}

It is "X of Y", but in some languages, a natural order is "trans(Y) trans(of) trans(X)".
The current code does not allow translators to control the word order.

angular-gettext allows Interpolation.
The above should be like:

  <span translation>Script size: {{scriptLength}} of {{max_size}}</span>

Unfortunately I am not familiar with how to use interpolate with filter. It would be nice if someone takes this bug.

Tags: i18n
Changed in horizon:
assignee: nobody → Rob Cresswell (robcresswell)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: New → In Progress
Changed in horizon:
assignee: Rob Cresswell (robcresswell) → Akihiro Motoki (amotoki)
Akihiro Motoki (amotoki)
summary: ng launch instance workflow: hard to control the word order in
- trasnlations
+ translations
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/289328
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=db63b9e0264df6029600b34f199767302d7c7353
Submitter: Jenkins
Branch: master

commit db63b9e0264df6029600b34f199767302d7c7353
Author: Rob Cresswell <email address hidden>
Date: Mon Mar 7 13:23:01 2016 +0000

    Fix translator word order control in load-edit

    The load-edit widget had a phrase passed as separate translated words,
    which makes it impossible for translators to control the word order.
    This patch passes it as a single translation, fixing the issue.

    Change-Id: I0dfd8e098b84241070a69938611a7e33ca3ab35a
    Closes-Bug: 1553610

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0rc1

This issue was fixed in the openstack/horizon 9.0.0.0rc1 release candidate.

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.