Source locale is not excluded in target file mappings
Using the maven plugin configured as shown bellow:
And using this config file (zanata.xml):
My project file structure is like this:
src/main/resources/conf/i18n/sourcefile_es.properties <- example source file
src/main/resources/conf/i18n/exampletargetfile_pt.properties <- example target file
The targets (translations) aren't recognized because the filename always contains the source locale. Using "both" pushType, translations are never uploaded
I think that the problem is in this line https://github.com/zanata/zanata-platform/blob/c8173883718b857ff04249ee7fc843c32a173170/client/zanata-client-commands/src/main/java/org/zanata/client/commands/FileMappingRuleHandler.java#L134 because only removes the extension to build the filename placeholder/variable.
Ubuntu 16.04.1 LTS, java version "1.8.0_45", Apache Maven 3.3.3 (default locale: es_ES, platform encoding: UTF-8)
It's a bug introduced by this commit fad3d89d8ce937abda8e1ef9920b69648e8d8fb3
The bug is in file org.zanata.client.commands.pull.PropertiesStrategy
for now looks like the only way is to use the command hook workaround I suggested in previous comment
Hmm... the rules work like they should work. Patrick what do you think?
here's my config file:
Carlos's suggestion should also work. Can you show us your config file?
Unfortunately we don't support this usage natively. We consider filename being the file without extension, regardless whether you have locale embedded in it or not. In fact, it's hard to tell whether a portion in filename is actually locale. If you don't want to include 'es' in your translation file name, here is a workaround by using command hooks http://docs.zanata.org/en/release/client/command-hook/:
This should give you a relatively clean configuration. You still need to specify '--src-lang es' (if use zanata-cli) or '<srcLang>es</srcLang>' in pom if use maven. Zanata has bugs in the areas where English is not source language. See ZNTA-1587. I will also link this issue to that one.