kexec-tools/zanata-notes.txt
Petr Šabata f5bf4978d8 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/kexec-tools#041ba89902961b5490a7143d9596dc00d732cba0
2020-10-15 14:45:57 +02:00

80 lines
2.9 KiB
Plaintext

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)
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.zanata</groupId>
<artifactId>zanata-maven-plugin</artifactId>
<version>1.7.5</version>
</plugin>
</plugins>
</build>
...
</project>
3. add zanata.xml for your project with content like below:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<config xmlns="http://zanata.org/namespace/config/">
<url>https://translate.zanata.org/zanata/</url>
<project>kexec-tools</project>
<project-version>F18</project-version>
<project-type>gettext</project-type>
<locales>
<locale>ar</locale>
...
</config>
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:
<locale map-from="bn_IN">bn-IN</locale>
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