Incorrect PO-Revision-Date in some translation files for aodh project

Bug #1586041 reported by Alfredo Moralejo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack i18n
Fix Released
High
Unassigned

Bug Description

Following .po files have empty revision date, "PO-Revision-Date: \n":

 aodh/locale/it/LC_MESSAGES/aodh.po
 aodh/locale/pt_BR/LC_MESSAGES/aodh.po
 aodh/locale/zh_CN/LC_MESSAGES/aodh-log-info.po
 aodh/locale/zh_CN/LC_MESSAGES/aodh.po
 aodh/locale/zh_TW/LC_MESSAGES/aodh.po

This makes compile_catalog to fail:

$ python setup.py compile_catalog
running compile_catalog
compiling catalog aodh/locale/ja/LC_MESSAGES/aodh.po to aodh/locale/ja/LC_MESSAGES/aodh.mo
compiling catalog aodh/locale/ru/LC_MESSAGES/aodh.po to aodh/locale/ru/LC_MESSAGES/aodh.mo
compiling catalog aodh/locale/pt/LC_MESSAGES/aodh.po to aodh/locale/pt/LC_MESSAGES/aodh.mo
compiling catalog aodh/locale/en_GB/LC_MESSAGES/aodh.po to aodh/locale/en_GB/LC_MESSAGES/aodh.mo
compiling catalog aodh/locale/ko_KR/LC_MESSAGES/aodh.po to aodh/locale/ko_KR/LC_MESSAGES/aodh.mo
compiling catalog aodh/locale/de/LC_MESSAGES/aodh.po to aodh/locale/de/LC_MESSAGES/aodh.mo
Traceback (most recent call last):
  File "setup.py", line 29, in <module>
    pbr=True)
  File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/home/amoralej/eng/babel/lib/python2.7/site-packages/babel/messages/frontend.py", line 178, in run
    self._run_domain(domain)
  File "/home/amoralej/eng/babel/lib/python2.7/site-packages/babel/messages/frontend.py", line 218, in _run_domain
    catalog = read_po(infile, locale)
  File "/home/amoralej/eng/babel/lib/python2.7/site-packages/babel/messages/pofile.py", line 217, in read_po
    _add_message()
  File "/home/amoralej/eng/babel/lib/python2.7/site-packages/babel/messages/pofile.py", line 165, in _add_message
    catalog[msgid] = message
  File "/home/amoralej/eng/babel/lib/python2.7/site-packages/babel/messages/catalog.py", line 601, in __setitem__
    self.mime_headers = _parse_header(message.string).items()
  File "/home/amoralej/eng/babel/lib/python2.7/site-packages/babel/messages/catalog.py", line 420, in _set_mime_headers
    self.revision_date = _parse_datetime_header(value)
  File "/home/amoralej/eng/babel/lib/python2.7/site-packages/babel/messages/catalog.py", line 46, in _parse_datetime_header
    tt = time.strptime(match.group('datetime'), '%Y-%m-%d %H:%M')
  File "/usr/lib64/python2.7/_strptime.py", line 467, in _strptime_time
    return _strptime(data_string, format)[0]
  File "/usr/lib64/python2.7/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data u'' does not match format '%Y-%m-%d %H:%M'

I've checked in https://translate.openstack.org that files are wrong there too, not only in github.

Tags: infra
Revision history for this message
Alfredo Moralejo (amoralej) wrote :
Download full text (3.5 KiB)

Hi,

After revieweing all .po files in all projects, following files have this issue:

aodh/aodh/locale/it/LC_MESSAGES/aodh.po
aodh/aodh/locale/pt_BR/LC_MESSAGES/aodh.po
aodh/aodh/locale/zh_CN/LC_MESSAGES/aodh-log-info.po
aodh/aodh/locale/zh_CN/LC_MESSAGES/aodh.po
aodh/aodh/locale/zh_TW/LC_MESSAGES/aodh.po
ironic/ironic/locale/fr/LC_MESSAGES/ironic-log-critical.po
ironic/ironic/locale/ja/LC_MESSAGES/ironic-log-critical.po
ironic/ironic/locale/ko_KR/LC_MESSAGES/ironic-log-critical.po
ironic/ironic/locale/pt_BR/LC_MESSAGES/ironic-log-critical.po
neutron/neutron/locale/tr_TR/LC_MESSAGES/neutron-log-info.po
neutron/neutron/locale/tr_TR/LC_MESSAGES/neutron-log-warning.po
trove/trove/locale/fr/LC_MESSAGES/trove-log-error.po
trove/trove/locale/fr/LC_MESSAGES/trove-log-warning.po
oslo-cache/oslo_cache/locale/de/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/es/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/fr/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/it/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/ko_KR/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/pt_BR/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/ru/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/tr_TR/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/zh_CN/LC_MESSAGES/oslo_cache.po
oslo-cache/oslo_cache/locale/zh_TW/LC_MESSAGES/oslo_cache.po
oslo-policy/oslo_policy/locale/ar/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/cs/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/cs/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/de/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/de/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/en_AU/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/en_GB/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/es/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/es/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/fr/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/fr/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/it/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/it/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/ja/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/ko_KR/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/ko_KR/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/pt/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/pt_BR/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/pt_BR/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/ru/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/tr_TR/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/tr_TR/LC_MESSAGES/oslo_policy.po
oslo-policy/oslo_policy/locale/vi_VN/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/zh_CN/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/zh_TW/LC_MESSAGES/oslo_policy-log-error.po
oslo-policy/oslo_policy/locale/zh_TW/LC_MESSAGES/oslo_policy.po
oslo-utils/oslo_utils/locale/es/LC_MESSA...

Read more...

Changed in openstack-i18n:
status: New → Triaged
importance: Undecided → High
assignee: nobody → KATO Tomoyuki (kato-tomoyuki)
Revision history for this message
Alex Eng (loones1595) wrote :

Workaround right now is to update a single translation for all documents on all languages to produce the correct date. I am still getting more information on why this is happening.

Revision history for this message
Alex Eng (loones1595) wrote :
Revision history for this message
Alex Eng (loones1595) wrote :

I've applied the workaround to the list provided by Alfredo Moralejo (amoralej). Please confirm the fix.

Revision history for this message
KATO Tomoyuki (kato-tomoyuki) wrote :

aodh looks fine with today's import.

Revision history for this message
KATO Tomoyuki (kato-tomoyuki) wrote :

ironic looks fine, too.

Changed in openstack-i18n:
status: Triaged → In Progress
Revision history for this message
Alfredo Moralejo (amoralej) wrote :

Note that PatchSet 2 in aodh review https://review.openstack.org/#/c/325079/ seems to have reverted the workaround for aodh.

Revision history for this message
KATO Tomoyuki (kato-tomoyuki) wrote :

updated again.

Akihiro Motoki (amotoki)
tags: added: infra
Revision history for this message
KATO Tomoyuki (kato-tomoyuki) wrote :

Done for aodh.

Revision history for this message
Alfredo Moralejo (amoralej) wrote :
Download full text (4.1 KiB)

The issue is fixed for aodh, ironic and trove but I still have the issues for following files:

openstack-neutron/neutron/locale/tr_TR/LC_MESSAGES/neutron-log-info.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/es/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/fr/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/it/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/ko_KR/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/pt_BR/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/ru/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/tr_TR/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/zh_CN/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-cache/oslo_cache/locale/zh_TW/LC_MESSAGES/oslo_cache.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/ar/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/cs/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/cs/LC_MESSAGES/oslo_policy.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/de/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/de/LC_MESSAGES/oslo_policy.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/en_AU/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/en_GB/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/es/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/fr/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/fr/LC_MESSAGES/oslo_policy.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/it/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/it/LC_MESSAGES/oslo_policy.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/ja/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/ko_KR/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/ko_KR/LC_MESSAGES/oslo_policy.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/pt_BR/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/pt_BR/LC_MESSAGES/oslo_policy.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/pt/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/ru/LC_MESSAGES/oslo_policy.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/tr_TR/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/tr_TR/LC_MESSAGES/oslo_policy.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/locale/vi_VN/LC_MESSAGES/oslo_policy-log-error.po:"PO-Revision-Date: \n"
python-oslo-policy/oslo_policy/loc...

Read more...

Revision history for this message
KATO Tomoyuki (kato-tomoyuki) wrote :

Alfredo, thank you to follow up. I will update them, I'd like to check step by step.

Revision history for this message
Alfredo Moralejo (amoralej) wrote :

Hi,

https://review.openstack.org/#/c/352007 has introduced the error again in file aodh/locale/fr/LC_MESSAGES/aodh.po.

Could you please apply the workaround.

what's the status of the fix for the issue in zanata?

Best regards,

Alfredo

Revision history for this message
KATO Tomoyuki (kato-tomoyuki) wrote :

Alex, I'm not sure why this bug happen again for the new language resource. We don't "copy" at Zanata, I think.

Revision history for this message
Javier Peña (jpena-c) wrote :

It happened again with http://git.openstack.org/cgit/openstack/aodh/commit/?id=a0d95002ccb6016e6170091d6b8019664b3a50db, this time the Korean locale was affected.

Revision history for this message
Alfredo Moralejo (amoralej) wrote :

This is happening again, maybe a PO-Revision-Date check in the bot which propposes changes in translation files would be convenient?

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

What's the current status? is this still happening?

In addition, the assignee looks no longer active in OpenStack. Clearing the assignee.

Changed in openstack-i18n:
assignee: KATO Tomoyuki (kato-tomoyuki) → nobody
Revision history for this message
Ian Y. Choi (ianychoi) wrote :

https://zanata.atlassian.net/browse/ZNTA-1145 was patched in Zanata 3.9.1, and Infra team, I18n team, and Zanata development team upgraded Zanata (translate.openstack.org) to 3.9.6 on March this year. So it should be addressed. If someone see the bug again, please resubmit it.

Changed in openstack-i18n:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers