Bug 1139950 - RFE: Flexible Translation file naming
Summary: RFE: Flexible Translation file naming
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Maven, Component-zanata-client, Component-zanata-client-ivy
Version: client-3.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: client-3.4
Assignee: Patrick Huang
QA Contact: Ding-Yi Chen
: 1098836 (view as bug list)
Depends On:
Blocks: 1010132 1124615
TreeView+ depends on / blocked
Reported: 2014-09-10 04:37 UTC by Carlos Munoz
Modified: 2015-04-20 01:14 UTC (History)
3 users (show)

Fixed In Version: commit 07f42ed1ac87976f8a68a5109aa2c91d6e404011
Doc Type: Bug Fix
Doc Text:
Story Points: 5
Clone Of:
Last Closed: 2015-04-20 01:14:42 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1035959 0 unspecified CLOSED RFE: Remove Project Type, Zanata should recognise file types individually 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1098836 0 high CLOSED mvn failed to push the locales with underscore (e.g. gettext project), unless specify them using map-from 2021-02-22 00:41:40 UTC

Internal Links: 1035959 1098836

Description Carlos Munoz 2014-09-10 04:37:48 UTC
The client will get all source files that match the includes pattern. Then, it will try to find all translation files using the given rule patterns. 

Multiple mapping rules are possible.

The rules will be available in zanata.xml only.

Existing projects are still handled in the current way.

The client will try to apply the mapping pattern to any found translation file, and based on that result it will choose a source document to upload to.

This is only for translation files.

Available placeholders: {path}/{filename}/{locale}/{localeWithUnderscores}/{extension}
(The placeholder delimiter is TBD, but {} sounds like a good fit.)

Comment 1 Patrick Huang 2014-09-11 05:43:18 UTC
placeholder {path} is anything between src-dir and filename. 
For example, if src-dir is my/directory and the source file found is my/directory/foo/bar/message.pot, then {path} is "foo/bar", {filename} is "message", {extension} is "pot". 

Given locale "de-DE", trans-dir "trans" and rule "{path}/{filename}_{local_with_underscore}.po",

The final translation file will be put under:

Comment 2 Patrick Huang 2014-09-18 00:47:48 UTC
This bug will also address bug 1098836. For gettext project it will auto covert '-' to '_' in locale code.

Comment 3 Patrick Huang 2014-09-25 06:01:37 UTC

Comment 5 Ding-Yi Chen 2014-10-08 03:12:18 UTC
*** Bug 1098836 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.