diff --git a/zanata-notes.txt b/zanata-notes.txt new file mode 100644 index 0000000..2358c7a --- /dev/null +++ b/zanata-notes.txt @@ -0,0 +1,79 @@ +Zanata is a web-based system for managing localisation projects. +For kexec-tools firstboot module, I created a zanata project with name of +"kexec-tools": https://translate.zanata.org/zanata/project/view/kexec-tools + +There's several clients available for zanata translation management, such as +python client and Maven client. It's suggested to use maven client for latest +zanata issues + +Firstly you need install mvn rpms, just do below for fedora 16 and beyond: +yum install maven + +create zanata.ini in your home dir: +>~/.config/zanata.ini +There should be something need to change like below: +translate_zanata_org.url=https://translate.zanata.org/zanata/ +translate_zanata_org.username= +translate_zanata_org.key= + +Change username to your zanata username +Change the key to the "API key" of zanata which can be generate from +zanata web page. + Open user profile page of zanata.org, click "Generate API Key" to create it. + +zanata is a plugin of maven, to activate it, you need do below configurations: +1. cd kexec-tools/po, (assume kexec-tools is the git repo) +2. add a pom.xml like below: (note: version 2.0.0 is better than 1.7.5 +for performance improvement) + +... + + + + org.zanata + zanata-maven-plugin + 1.7.5 + + + +... + +3. add zanata.xml for your project with content like below: + + + https://translate.zanata.org/zanata/ + kexec-tools + F18 + gettext + + + ar +... + + +You can get mostly-complete zanata.xml from the project version page on zanata +Things need to be modified is: +a) project-type, please use gettext +b) for locales which are diffrent between local name and zanata server name, + for example for kexec-tools we have bn_IN but zanata server accept bn-IN, + so we need to add below line: + bn-IN + +The first running of "mvn zanata:help" will download and activate the new +version of zanata plugin for you. + +I use below command to upload both pot file and translated po files: +mvn zanata:push -Dzanata.pushType=both +If you only need to upload po files, you can use: +mvn zanata:push -Dzanata.pushType=trans + +You can use mvn zanata:help to lookup the detail help content of param names + +The other thing to be careful is specifying the correct source and +translation directories. +They are relative path. You can also put the pom.xml and zanata.xml under toplevel directory and run: +mvn zanata:push -Dzanata.pushType=both -Dzanata.srcDir=po -Dzanata.transDir=po + +-- +[1] https://github.com/zanata/zanata/wiki/Zanata-Maven-Integration +[2] https://github.com/zanata/zanata/wiki/client-configuration