ZPC is a convenient way to communicate with Zanata server to push text for translation and pull translated text back for inclusion in software or documentation builds. This release brings fresh experiences to translators and contributors. GitHub Release Link
What’s New
- Use latest list of languages defined in the server for a project when using the client.
- Should be able to specify minimum percentage of messages translated on pull.
- Keep source and target dir paths in
zanata.xml
- Code improvements for better maintainability.
Translators
I am sure, your search for translations platform, which can cater all your requirements, would come to an end, when you look at Zanata, and if your project is already here - we have some new exciting features waiting for you to check them out. Let’s get started…
Preparation
Keep your language resources ready (POT file/s or folder/s). Have zanata.ini
in-place, details here. Write your project configuration zanata.xml
and keep it at root directory of your project, this helps ZPC to have some prior information of the project while talking to Zanata Server. Structure would be…
1 2 3 4 5 6 7 8 |
|
This may help you here. Done! Let’s move on…
Get ZPC Running
- Download and Install
1 2 3 4 |
|
- Now, we should have ZPC installed. Help will guide us: how we can communicate.
list
,project {create, info}
,version {create, info}
,push
,pull
andglossary push
are the commands we have. You may find this interesting.
1 2 |
|
Done! Let’s move on…
Push - Translate - Pull
- Create project and version, can be done on server as well.
1 2 |
|
- Push language resources to server: please check for user
zanata.ini
and projectzanata.xml
details. Note: Locale aliases need to be created and maintained at server and hence keeping locale_mapping inzanata.xml
is deprecated. Mention project type {podir
orgettext
} in command line or inzanata.xml
, and indicate the same in project settings at server.
1 2 |
|
- This should push all templates, translations (if flagged) onto server. Cool! translation activities for the enabled languages can now, be started. Get translations back to compile lang-packs.
1 2 |
|
- Aha, by now we should have translations done.
Contributors
Hi! Zanata Python Client is purely written in Python. Pull Requests are always welcome. Travis checks for flake8 and tests. Just two steps {code-review
, QA
} to get it merged.
Python-Zanata-Client Code Structure v1.4.0
- Configuration (Remote, Local: zanata.ini, zanata.xml, command-line)
context.py
,parseconfig.py
- Commands - Interface and their implementation
zanata.py
,command.py
,zanatacmd.py
,cmdbase.py
,pushcmd.py
,pullcmd.py
- REST APIs - Commands Logic to REST Resource mapping
zanatalib/rest
,resource.py
,service.py
,{doc,...}service.py
- Others: utilities, converters, parsers, logger, error
projectutils.py
,csvconverter.py
,parseconfig.py
,logger.py
,error.py
This helps us where to look into the code - required for adding feature and/or bug fix.
Happy Coding !!