Bug 1010132

Summary: zanata-cli failed to push the locales with underscore (e.g. gettext project), unless specify them using map-from
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: Component-zanata-clientAssignee: David Mason <damason>
Status: CLOSED UPSTREAM QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.0CC: piotrdrag
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-31 01:13:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1098836, 1139950    
Bug Blocks: 1110627    

Description Ding-Yi Chen 2013-09-20 04:59:03 UTC
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-cli-3.1.2
Zanata version 3.0.4-SNAPSHOT (20130920-0021)

How reproducible:
Always

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 .

Actual results:
zh_CN and zh_TW are ignored.

Expected results:
zh_CN and zh_TW are pushed.

Additional info:
Pulling also suffer similar bug. zh_CN is pulled as zh-CN.po thus cannot be used directly in build.

Comment 1 Sean Flanigan 2014-07-17 08:15:25 UTC
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 [1], 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.

[1] Workaround: specify map-from in zanata.xml for the affected locales.

Comment 2 Zanata Migrator 2015-07-31 01:13:24 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-362