Red Hat Bugzilla – Bug 1010132
zanata-cli failed to push the locales with underscore (e.g. gettext project), unless specify them using map-from
Last modified: 2015-07-30 21:13:24 EDT
Description of problem:
gettext project usually contains the po file with underscore filename, such as pt_BR.po,zh_CN.po,zh_TW.po. However, unless map-from is set, those files are skipped, thus not push to server.
Version-Release number of selected component (if applicable):
Zanata version 3.0.4-SNAPSHOT (20130920-0021)
Steps to Reproduce:
1. Download and extract ibus-chewing (http://ibus.googlecode.com/files/ibus-chewing-1.4.3-Source.tar.gz)
2. cd po
3. Create project ibus-chewing and version master
4. Make sure zh_CN and zh_TW are in the locale list.
5. Download zanata.xml by clicking Action "Config file" in ibus-chewing/master in WebUI
6. zanata-cli push --push-type both -s . -t .
zh_CN and zh_TW are ignored.
zh_CN and zh_TW are pushed.
Pulling also suffer similar bug. zh_CN is pulled as zh-CN.po thus cannot be used directly in build.
Each project type in the client should do any required mapping between the locale format used by that project type (ie with underscores for Java properties or gettext software) and the locale format used in Zanata server (with hyphens). We do this for "properties" projects, and we should also do it for "gettext" projects.
Since there is a workaround , I would be inclined to reduce the priority to medium, but as this is likely to affect virtually all gettext software projects (including Fedora software projects) I think we should keep the priority as high.
 Workaround: specify map-from in zanata.xml for the affected locales.
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-362