Skip to content

Translations

Francesco Ceruti edited this page May 30, 2019 · 14 revisions

Linux Show Player provide internationalization (i18n) support

Details about translations and translators can be found on the project homepage

If you want to add your language here you will find some guideline and a simple how-to.

Guidelines

  • Currently new translations can only be included via a new release, depending on the development state I may decide to create a release for new (completed) translations
  • On crowdin multiple versions can be translated, only the more relevant branches will be included
  • If you have some doubt/question ask on the gitter chat or this issue
  • I will not wait forever for translations, if possible I'll try to contact the translators
  • Only languages with enough translated strings will be included.

How To Translate (Crowdin)

  1. Login/Register to crowdin, it's possible to use various authentication methods (Github, Google, ...)
  2. Go on the Linux Show Player homepage 🏠
  3. Choose your language. If your language is missing, make a request for it 👍
  4. Start translating, right now there're no access limitations (might change)
  5. Crowding will manage the rest for you

How to test the translations

Crowdin will push new changes in "custom" branches in the GitHub repository, don't use those.

You need to merge the translations in the corresponding branch, for example merge l10n_develop into develop, this can be done via git merge, or manually, by downloading the translations files.

To be able to see the translations you need to transform the source .ts files into .qm files, you can do that via ./i18n_update.py -q <locale-code(s)>

You can take a look at their documentation 📖

How To Translate (Manually)

If you cannot (or don't want) to use the method above follow this instructions.

1. Requirements

All the tools should be provided by your distro:

  • pylupdate5
    • ArchLinux: provided by the pyqt5 package
    • Debian/Ubuntu: pyqt5-dev-tools
  • Qt5 Linguistic
    • ArchLinux: qt5-tools
    • Debian/Ubuntu: qttools-dev-tools

Now you need a copy of the Linux Show Player source code, create a fork on github, so that you can send a pull-request.

2. Generate the translation source-files (.ts files)

To create a new file for LiSP you need to run the following command when in the source code root-folder:

./i18n_update.py <locale-code(s)>

where <locale-code(s)> should be replaced by the target language locale, for example it for Italian, fr for French, etc...

Here a list of where you will find the .ts files:

  • lisp/i18n/ main program translation and plugins
  • lisp/plugins/<plugin>/i18n/ possible location for custom plugins translations

2b. Update the translation source-files

To be sure that existing files are up-to-date with the source code, run again ./i18n_update.py <locale-code(s)>, to remove old and obsolete entries use the -n option.

3. Edit the translation file

The generated .ts file can be opened using Qt Linguistic. The official guide can be found here

4. Generate/Update the translation release-files (.qm files)

To be able to see the translations you need to transform the source .ts files into .qm files, you can do that via ./i18n_update.py -q <locale-code(s)>

5. Including the files in LiSP

Create a pull-request on GitHub.

Suggestions and references

If you have suggestions let me know, any possible improvement is appreciated.

  • You can run ./i18n_update --help to see all the options
  • The official guide on Qt translations can be found here.