PowerTuneDigital / PowerTuneDigitalOfficial

Official PowerTune Digital Repo
GNU General Public License v3.0
18 stars 7 forks source link

Handling translations using native QT tools #122

Closed pgrandin closed 6 months ago

pgrandin commented 6 months ago

Translations were implemented recently in PowerTune, but the current approach based off a javascript array has several limitations:

The approach in this PR addresses the issues above, by leveraging native QT translation tools. A c++ class is added to handle reloading the native translation component when switching to a new language. Using a standard format also allows us to leverage crowd-sourced community based translation platforms like weblate where people can easily contribute new translations or new languages.

A test image for the rpi3 is available here and here for the rpi4.

The script used to pre-seed the .ts files from the Translator.js script is also provided.

The changes in action:

output