Bug 1112205
| Summary: | Unable to push the POT file beginning from the underscore (_) in the filename | ||
|---|---|---|---|
| Product: | [Retired] Zanata | Reporter: | Akira TAGOH <tagoh> |
| Component: | Component-Maven | Assignee: | Patrick Huang <pahuang> |
| Status: | CLOSED UPSTREAM | QA Contact: | Zanata-QA Mailling List <zanata-qa> |
| Severity: | high | Docs Contact: | |
| Priority: | urgent | ||
| Version: | client-3.3 | CC: | damason, dchen, pahuang, zanata-bugs |
| Target Milestone: | --- | ||
| Target Release: | client-3.4 | ||
| 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:43:57 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: | |||
|
Description
Akira TAGOH
2014-06-23 10:40:50 UTC
This can also be reproduced with Server: Zanata 3.4.2-SNAPSHOT (git-server-3.4.1-47-g88e8fe3) Client: zanata-maven-plugin:3.3.2:push client API version: 3.3.1, server API version: 3.3.1 Project type: gettext Filename: libstdc++-v3/po/libstdc++.pot (gcc-4.9.0) This has something to do with RESTEasy paths, and there would probably be similar issues with some other characters such as commas. The problem stems from the use of filenames as part of a URL: the rules for what can be in a URL are a lot more stringent than for what can be in a filename. Proposed fix: Make filenames a query parameter with escaping. This would get around this and all other issues with RESTEasy's handling of different characters. This would require deprecating the current REST endpoint and implementing a new endpoint with the filename as a query parameter. A workaround exists:
Add command hook to zanata.xml to rename the file before push and back again after pull.
Example (not tested only in theory)
<hooks>
<hook command="push">
<before>mv _Exit.2.pot Exit.2.pot</before>
<after>mv Exit.2.pot _Exit.2.pot</after>
</hook>
<hook command="pull">
<!-- assuming this is a gettext project. For podir it will be different -->
<!-- need to rename all locales but here just use ja as one example -->
<after>mv Exit_ja.po _Exit_ja.po</after>
</hook>
</hooks>
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-519 |