forked from rhkdump/kdump-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zanata-notes.txt
79 lines (67 loc) · 2.87 KB
/
zanata-notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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)
<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