Hi Einav,

Thanks for your reply.

This is very helpful. But I think we could fake these  'on the fly' English .properties files and just use them for zanata push operation. So we don't have to rename these files every time we pull them.

What do you think ?

---
Thanks,
plysan



2014-04-25 2:59 GMT+08:00 Einav Cohen <ecohen@redhat.com>:
Hi plysan,

the 9 documents with the strange name/location [1] are properties
files that do not have matching English .properties files in the
oVirt-engine code repo (as opposed to LocalizedEnums_zh_CN.properties
and messages_zh_CN.properties that do have matching English .properties
files in the ovirt-engine code repo [2]).

The matching English strings for the documents in [1] reside in the
ovirt-engine code repo within GWT Constants/Message interface Java
files, rather than English .properties files.
Zanata cannot receive GWT Constants/Message interface Java files as
input. So the process of pushing the English strings to Zanata for
translation includes a GWT-compilation-based auto-generation of 'on
the fly' English .properties files with similar strange naming/location
(those English .properties files are not pushed into the ovirt-engine
code repo), which consequently leads to the strange naming/location of
the zh-CN files as well.

the names/locations of the files in [1] should actually be [3]. so
if you want the translations that you are pulling from Zanata to
be named correctly and reside in the correct location in your local
ovirt-engine code directory, simply run [4] after doing the pull
from Zanata.

----
Thanks,
Einav


[1]
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.common.CommonApplicationConstants_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.common.CommonApplicationMessages_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.SpiceRedKeys_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.UIConstants_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.UIMessages_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.userportal.ApplicationConstants_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.userportal.ApplicationMessages_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.webadmin.ApplicationConstants_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.webadmin.ApplicationMessages_zh_CN.properties

[2]
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
packaging/branding/ovirt.brand/messages.properties

[3]
frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/CommonApplicationConstants_zh_CN.properties
frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/CommonApplicationMessages_zh_CN.properties
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/SpiceRedKeys_zh_CN.properties
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/UIConstants_zh_CN.properties
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/UIMessages_zh_CN.properties
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/ApplicationConstants_zh_CN.properties
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/ApplicationMessages_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/ApplicationConstants_zh_CN.properties
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/ApplicationMessages_zh_CN.properties

[4]
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.common.CommonApplicationConstants_zh_CN.properties frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/CommonApplicationConstants_zh_CN.properties
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.common.CommonApplicationMessages_zh_CN.properties frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/ui/common/CommonApplicationMessages_zh_CN.properties
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.UIConstants_zh_CN.properties frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/UIConstants_zh_CN.properties
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.UIMessages_zh_CN.properties frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/UIMessages_zh_CN.properties
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.SpiceRedKeys_zh_CN.properties frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/SpiceRedKeys_zh_CN.properties
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.userportal.ApplicationConstants_zh_CN.properties frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/ApplicationConstants_zh_CN.properties
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.userportal.ApplicationMessages_zh_CN.properties frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/userportal/ApplicationMessages_zh_CN.properties
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.webadmin.ApplicationConstants_zh_CN.properties frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/ApplicationConstants_zh_CN.properties
mv frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.webadmin.ApplicationMessages_zh_CN.properties frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/webadmin/ApplicationMessages_zh_CN.properties


----- Original Message -----
> From: "plysan" <plysab@gmail.com>
> To: "Users@ovirt.org List" <users@ovirt.org>
> Sent: Wednesday, April 23, 2014 12:44:37 PM
> Subject: [ovirt-users] problem in pulling zanata property files
>
> Hi list,
>
> I'm in branch ovirt-engine-3.3, so I used the zanata-cli to pull property
> files from ovirt's zanata repo:
> https://translate.zanata.org/zanata/iteration/view/ovirt/ovirt-3.3
> My steps:
> 1. download po files
> 2. config ~/.config/zanata.ini
> 3. config zanata.xml like this:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <config xmlns=" http://zanata.org/namespace/config/ ">
> <url> https://translate.zanata.org/zanata/ </url>
> <project>ovirt</project>
> <project-version>ovirt-3.3</project-version>
> <!--
> <project-type>utf8properties|properties|gettext|podir|xliff|xml|file</project-type>
> -->
>
> <locales>
> <locale map-from="zh_CN">zh-Hans-CN</locale>
> </locales>
>
> </config>
>
> 4. execute "pull -s {po files directory} -t {ovirt engine direstory}
> --project-type properties"
>
> But after I use zanata-cli pull command, I get property files named with
> package name, like the following:
>
> $ git status
> # On branch ovirt-engine-3.3
> # Changes not staged for commit:
> # (use "git add <file>..." to update what will be committed)
> # (use "git checkout -- <file>..." to discard changes in working directory)
> #
> # modified:
> frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums_zh_CN.properties
> # modified: packaging/branding/ovirt.brand/messages_zh_CN.properties
> #
> # Untracked files:
> # (use "git add <file>..." to include in what will be committed)
> #
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.common.CommonApplicationConstants_zh_CN.properties
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.common.CommonApplicationMessages_zh_CN.properties
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.SpiceRedKeys_zh_CN.properties
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.UIConstants_zh_CN.properties
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.uicompat.UIMessages_zh_CN.properties
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.userportal.ApplicationConstants_zh_CN.properties
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.userportal.ApplicationMessages_zh_CN.properties
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.webadmin.ApplicationConstants_zh_CN.properties
> #
> frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/org.ovirt.engine.ui.webadmin.ApplicationMessages_zh_CN.properties
> no changes added to commit (use "git add" and/or "git commit -a")
>
> I only see messages_zh_CN.properties and LocalizedEnums_zh_CN.properties are
> properly named, but not the rest property files.
> I noticed many translation po files under zanata project are all named with
> package name.
> So is this right ?
>
> thanks for your attention.
>
> _______________________________________________
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>