Pseudo-translation generation fails

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

Bug Description

Pseudo-translations fail to generate; it looks the logic expects the "pofile" name to be a babel function, not the string that holds the filename. Not sure if this is old logic, but I was following along with https://docs.openstack.org/horizon/latest/contributor/topics/translation.html#pseudo-translation-tool

$ tox -e manage -- update_catalog -l fr --pseudo
...
  File "/Users/npt/Code/Ar/horizon/openstack_dashboard/management/commands/update_catalog.py", line 105, in handle
    pot_cat = pofile.read_po(f, ignore_obsolete=True)
AttributeError: 'str' object has no attribute 'read_po'
ERROR: InvocationError: '/Users/npt/Code/Ar/horizon/.tox/manage/bin/python /Users/npt/Code/Ar/horizon/manage.py update_catalog -l fr --pseudo'

Change submitted to https://review.openstack.org/492670

Changed in horizon:
assignee: nobody → Nick Timkovich (nicktimko)
status: New → In Progress
Changed in horizon:
milestone: none → pike-rc2
importance: Undecided → High
Changed in horizon:
milestone: pike-rc2 → queens-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit 846fc19d719182700656039f91f09e212cabd9ec
Author: Nick Timkovich <email address hidden>
Date: Thu Aug 10 15:07:52 2017 -0500

    Fix pofile for pseudo translations

    The pofile name in the pseudo translation logic appears to expect the
    babel.messages object, not the string holding the location of the pofile.

    Trimmed a string that gettext reacts poorly with when creating pseudo-
    translations.

    Change-Id: I811711412d85a989826a946d1d57ed39790e34ed
    Closes-Bug: 1710003

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b1

This issue was fixed in the openstack/horizon 13.0.0.0b1 development milestone.

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.