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:
- kano-apps - Launcher for different utilities (code repository)
- kano-dashboard
- kano-feedback - Tool to report feedback and bugs (code repository)
- kano-greeter - Python greeter for Kano OS (code repository)
- kano-init - Initialize a fresh installation of the Kanux OS on a Kano kit (code repository)
- kano-overworld
- kano-peripherals - Support code for peripherals (code repository)
- kano-profile - Tool to communicate with Kano-World (code repository)
- kano-settings - Graphic tool to setup Kanux (code repository)
- kano-toolset - Shared toolset for OS appsd (code repository)
- kano-updater - Update Kano Linux (code repository)
- kano-vnc - VNC wrapper for Kano OS (code repository)
- kano-widgets - Kano LXPanel widgets (code repository)
- make-art - App to learn programming using a basic CoffeeScript drawing API (code repository)
- make-snake - Snake game running on the terminal (code repository)
- terminal-quest - Introduction to terminal commands in the style of a text adventure game (code repository)
The scripts depend on zanata-python-client to communicate with the Zanata server and polib to work with translation files. It also needs paramiko to connect to the Kano computer via SSH and pyyaml to read yaml files. To install these packages on Fedora, run:
sudo dnf install python3-zanata-client python3-polib python3-paramiko python3-pyyaml
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
Copy the sudoers.conf
file to Kano:
scp sudoers.conf kano:
Once logged it to Kano via SSH:
sudo chown root.root sudoers.conf
sudo mv sudoers.conf /etc/sudoers.d/kano-i18n-sync_conf
On Kano:
sudo apt-get update
sudo apt-get install *-i18n-orig zip
You may also want to install localized versions of some applications:
sudo apt-get install chromium-browser-l10n libreoffice-l10n-fr
On Kano:
sudo dpkg-reconfigure locales
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
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 --lang fr