JoseExposito / touche

The desktop application to configure Touchégg
GNU General Public License v3.0
543 stars 26 forks source link

Translation support #95

Open rene-coty opened 10 months ago

rene-coty commented 10 months ago

I would like to contribute to the localization of your app, but there isn't any POTFILES or .pot file in your app to indicate which strings need to be translated, where to begin with, or any hint in the README file. As an example, the French translation (fr.po) seems to be very outdated but there is no .pot file to fetch the new strings that have been added/modified since this file was created…

JoseExposito commented 10 months ago

My bad, I didn't document the process, the only clue to the steps to follow is a comment in this file: https://github.com/JoseExposito/touche/blob/master/po/LINGUAS

Basically, you'd need to install Node.js and run:

$ npm run translate

> com.github.joseexposito.touche@2.0.11 translate
> node bundle/scripts/translate.js

This tool will help you to generate or update [locale].po files.
Locale is a 2 or 3 digit code as defined in the "ISO 639-1 Code" column here:
https://www.loc.gov/standards/iso639-2/php/code_list.php

You can also select the locale by running this script like:
$ npm run translate -- [locale]

Enter the name of the locale to create of update: fr

Generating translations for locale "fr"
Updating po/fr.po
File po/fr.po updated successfully
File po/LINGUAS updated
Translations generated successfully 🎉

This will add the missing strings to fr.po. Only 3 strings are missing translations: "Applications", "Back" (as in mouse back button) and "Forward" (as in mouse forward button).

After translation, you can open a pull request and I'll accept the changes. However, if you prefer to avoid the extra steps, here is the fr.po.txt with the missing strings. If you prefer to upload to this issue report I'll add it for you.

Thanks for your interest!