PO files broken

Bug #1536214 reported by Andreas Jaeger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Andreas Jaeger
Kilo
Fix Released
Undecided
Andreas Jaeger
Liberty
Fix Released
High
Andreas Jaeger

Bug Description

python setup.py compile_catalog fails to compile the existing translated files for Spanish and Turkish - both in master and liberty.

Suggested action:
1) Fix the strings in translation server so that next translation import gets strings that are valid
2) Add lint check that checks that translations are valid.

For 2: Add to tox.ini a check like it's done for keystone:
  # Check that .po and .pot files are valid.
  bash -c "find nova -type f -regex '.*\.pot?' -print0| \
           xargs -0 -n 1 msgfmt --check-format -o /dev/null"

Change 2) will take care that the daily translation import cannot import again non-valid translations. 2) should only merge once 1) is fixed and imported.

Tags: i18n
Revision history for this message
Andreas Jaeger (jaegerandi) wrote :
Changed in nova:
assignee: nobody → Andreas Jaeger (jaegerandi)
Matt Riedemann (mriedem)
Changed in nova:
status: New → In Progress
importance: Undecided → High
tags: added: i18n
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/270268

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

Reviewed: https://review.openstack.org/270190
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=b18c5c34229b7f401e09f77bfde3be808e0e50d5
Submitter: Jenkins
Branch: master

commit b18c5c34229b7f401e09f77bfde3be808e0e50d5
Author: Andreas Jaeger <email address hidden>
Date: Wed Jan 20 14:41:24 2016 +0100

    Validate translations

    Validate that translations are ok using msgfmt, so that no invalid
    ones can be imported.

    Closes-Bug: #1536214
    Change-Id: Ic1f106684270a8f2197e0fb2a67d6fc00535ee65

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/liberty)

Reviewed: https://review.openstack.org/270223
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a0ffd8c39caac12437263e7a4e4568632d178435
Submitter: Jenkins
Branch: stable/liberty

commit a0ffd8c39caac12437263e7a4e4568632d178435
Author: Andreas Jaeger <email address hidden>
Date: Wed Jan 20 15:33:50 2016 +0100

    Validate translations

    Validate that translations are ok using msgfmt, so that no invalid
    ones can be imported.

    Closes-Bug: #1536214
    Change-Id: Ic1f106684270a8f2197e0fb2a67d6fc00535ee65

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/kilo)

Reviewed: https://review.openstack.org/270268
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=092a3f3e375d37a133e8bfe5c26822a3a0d4cba4
Submitter: Jenkins
Branch: stable/kilo

commit 092a3f3e375d37a133e8bfe5c26822a3a0d4cba4
Author: Andreas Jaeger <email address hidden>
Date: Wed Jan 20 16:52:53 2016 +0100

    Fix es translations

    There's a problem in the Spanish translations where they are invalid
    and cannot get compiled.

    We're not syncing with translation server anymore, so update the strings
    manually and fix them.

    To verify run
    find nova -type f -regex '.*\.pot?' -print0| xargs -0 -n 1 msgfmt \
    --check-format -o /dev/null

    Before this change:
    nova/locale/es/LC_MESSAGES/nova.po:5557: 'msgstr' is not a valid Python
    format string, unlike 'msgid'. Reason: The string ends in the middle of
    a directive.
    nova/locale/es/LC_MESSAGES/nova.po:5567: 'msgstr' is not a valid Python
    format string, unlike 'msgid'. Reason: The string ends in the middle of
    a directive.
    msgfmt: found 2 fatal errors
    nova/locale/es/LC_MESSAGES/nova-log-error.po:1366: a format
    specification for argument 'args' doesn't exist in 'msgstr'
    msgfmt: found 1 fatal error

    Now this works fine.

    Closes-Bug: #1536214
    Change-Id: I4717ecce0f640ffa9538a54a3e7fce85795d2515

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 13.0.0.0b3

This issue was fixed in the openstack/nova 13.0.0.0b3 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 12.0.2

This issue was fixed in the openstack/nova 12.0.2 release.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/nova 2015.1.4

This issue was fixed in the openstack/nova 2015.1.4 release.

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

This issue was fixed in the openstack/nova 2015.1.4 release.

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.