RFE: utf8 encoding should be persistant with "rip po2json"

Bug #1664161 reported by sandeep_s
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Expired
Undecided
Unassigned

Bug Description

My browser (firefox-50, chromium-54) and gnome-terminal-3.18.3 is configured to handle UTF-8 encoding.
However, above tools cannot handle UTF-8 bytes / byte sequence at [1] and fails to produce desired characters/output.

Actual Result
"ValidationsList.validations": "\u9a8c\u8bc1"

Expected Result
 "ValidationsList.validations": "验证"

Additional info:
https://runkit.com/npm/react-intl-po/test/temp/translations/zh-CN.json?t=1486901361525 shows desired characters or output (instead of \u escaped byte sequence)

[1]
line 139: https://github.com/openstack/tripleo-ui/blob/master/i18n/locales/zh-CN.json

Tags: i18n ui
Changed in tripleo:
importance: Undecided → Low
status: New → Triaged
milestone: none → pike-3
Revision history for this message
Julie Pichon (jpichon) wrote :

By default, when running po2json the JSON files are created as a one liner containing all translations. In order to minimise git diffs with translation imports patches, we pass the output through python -m json.tool to format it with one translation per line:

http://git.openstack.org/cgit/openstack-infra/project-config/tree/jenkins/scripts/propose_translation_update.sh?id=307190#n222

Minimising the diffs was a requirement from the infra team. As a bonus, this also ensures we get valid JSON or the call will fail. That json.tool script also happens to convert the characters into byte sequences, that in the end display just fine on the web interface which is the main goal.

Translation reviews are meant to happen on Zanata so although it would be nice, I'm not sure what purpose using a different encoding in the JSON files would fulfil.

FWIW and for reference, should we want to change it anyway, someone'll need to create a script that flattens the one-liner JSON while preserving the current encoding, submit it to infra, make sure the periodic jobs [1] proposing the translation updates still work smoothly and that the end result displays fine on the UI.

[1] http://status.openstack.org/openstack-health/#/g/build_queue/periodic?groupKey=build_queue&searchJob=tripleo-ui-propose-translation-update

Changed in tripleo:
milestone: pike-3 → pike-rc1
Changed in tripleo:
milestone: pike-rc1 → queens-1
Changed in tripleo:
milestone: queens-1 → queens-2
Changed in tripleo:
milestone: queens-2 → queens-3
Changed in tripleo:
milestone: queens-3 → queens-rc1
Changed in tripleo:
milestone: queens-rc1 → rocky-1
Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Revision history for this message
Emilien Macchi (emilienm) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (FUTURE, PIKE, QUEENS, ROCKY, STEIN).
  Valid example: CONFIRMED FOR: FUTURE

Changed in tripleo:
importance: Low → Undecided
status: Triaged → Expired
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.