PO file: translator notice is ignored

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

Bug Description

After Horizon team decided to use pybabel to extract message catalogs,
"Comments for Translators" [1] are ignored.
PyBabel does not support "Comments for Translators".
Is there any solution?

I see several strings in our test codes are marked as translatable and they have no translation comments.
I tried to add comments for translators, but I failed to do it.

Pybabel migration almost succeeds but it is one of drawbacks.
We are now not compatible with Django standard way.

To raise an attraction, I intentionally target it to Mitaka-RC1.
Feel free to move it out.

[1] https://docs.djangoproject.com/es/1.9/topics/i18n/translation/#comments-for-translators

Tags: i18n
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (master)

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

Revision history for this message
Akihiro Motoki (amotoki) wrote :

After investigating this, it turns out that we need to pass "--add-comments=Translators: " to pybabel extract.
At now the infra script does this, so horizon is not directly related.
One thing to be fixed is run_tests.sh --makemessasges.
Thus we can mark it as Low and there is no need to target it to Mitaka-RC1.

Changed in horizon:
importance: Undecided → Low
milestone: mitaka-rc1 → newton-1
Revision history for this message
Akihiro Motoki (amotoki) wrote :

Some fix is needed in Horizon side too.
Hopefully it is merged before Mitaka release.

Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Akihiro Motoki (<email address hidden>) on branch: master
Review: https://review.openstack.org/288938

Revision history for this message
Akihiro Motoki (amotoki) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit ce6e34a5e4c8841ff0d8da738339cb374beb0949
Author: Akihiro Motoki <email address hidden>
Date: Mon Mar 7 00:58:00 2016 +0900

    Honor comments for translators when extracting messages

    To extract commments for translators, '--add-comments' option
    must be passed to pybabel. Comments for translators were extracted
    when we used Django tools to extract messages, but when we switched
    to pybabel it was lost. This commit adds the option to run_tests.sh.

    Move the place of existing comments for translators
    so that pybabel can find them. Django tool and pybabel
    expect a bit different places.
    Also add comments to ungettext_lazy in test codes.

    Closes-Bug: #1553581
    Change-Id: Ia2df36dfebb59bede19d57b2158a907126ca1944

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.