Skip to content

Bi-directionnal synchronization for Kano translation files

License

Notifications You must be signed in to change notification settings

mandre/kano-i18n-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kano-i18n-sync

Scripts to allow bi-directional synchronization between Kano Linux and the Zanata translation service. Upload strings to the translation server and pull latest translated files from it into your Kano distribution.

We've created Zanata translation projects for the following apps:

Setup

The scripts depend on zanata-python-client to communicate with the Zanata server and polib. To install these packages on Fedora, run:

sudo dnf install python3-zanata-client python3-polib

Create yourself an account on Zanata if you haven't done so, generate your API key, and copy the content of zanata.ini that you need to place in a new file named $HOME/.config/zanata.ini

Now you need to prepare your Kano computer so that the scripts can connect to it. To turn on the SSH server on the Kano box, go to the Advanced setting and enable SSH. From the computer that is going to run the scripts, add a kano host to your $HOME/.ssh/config file, for instance:

Host kano
  Hostname 192.168.1.15
  User your_username

Finally, copy your keys to the Kano computer:

ssh-copy-id kano

Verify you're able to connect to your Kano computer with:

ssh kano

Usage

Upload updated translation templates upon new Kano release

The sync_pot.py script connects to the Kano computer to retrieve the latest translation templates then takes care of creating the project and new versions on Zanata, before uploading the template files to it.

It is intended for the admins for the translation projects on Zanata and should be run each time Kano release a new version of their distribution.

The script does not take options, simply invoke it with:

./sync_pot.py

Pull latest translations from Zanata and update Kano

The pull_translations.py script does more or less the opposite. It pulls the latest translated content from Zanata and copies it to the Kano computer in a format that Kano understands.

This is intended for Kano users and can be run any time to update translations to their latest version.

You need to pass it a locale name that is valid on the Zanata server, for instance:

./pull_translations.py fr

About

Bi-directionnal synchronization for Kano translation files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages