Welcome to the translations readme! If you wish to contribute and add translations for your language, follow the steps below. If the following steps are confusing or if have any questions throughout the process, feel free to reach out to me for support by adding an issue on the github repository. I really appreciate your efforts in making Plasma Drawer more accessible to all!
To add a new translation:
-
Find your language's 2-letter ISO 639-1 code (for example: English is '
en
').Note: If the translations you are adding are specific to a specific country or territory, append the 2-letter ISO 3166-1 country code to the language code with an underscore (for example, American English would be '
en_US
').You can use the
locale
command to see the current language code your system is using, andlocale -a
to see all currently available locales on your system. -
Copy
template.pot
to a new file and name itll.po
, wherell
is the locale code you found earlier (for example, 'en_US.po
'). -
Edit the file in a text editor and fill out the following fields at the top of the file
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. ... "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" "Language: LL\n" ...
-
Then begin translating. For each line
msgid "English Phrase"
, fill in themsgstr
quotes below with the translated phrase.For example, if you were translating from English to Spanish, one phrase would look like this:
msgid "Applications:" msgstr "Aplicaciones:"
-
Once all phrases are translated, save the file and attach it to a new github issue. I will review it and add the translation in the next widget update.
Alternatively, if you're a bit more tech-savvy, you can run merge.sh, build.sh, and plasmoidlocaletest.sh in that order to build the translation and test it. Then submit a pull request in the development branch.
The following scripts were retrieved from Zren's Widget Library Repository
sh ./merge.sh
will parse thei18n()
calls in the*.qml
files and write it to thetemplate.pot
file. Then it will merge any changes into the*.po
language files.sh ./build.sh
will convert the*.po
files to it's binary*.mo
version and move it tocontents/locale/...
which will bundle the translations in the*.plasmoid
without needing the user to manually install them.sh ./plasmoidlocaletest.sh
will run./build
thenplasmoidviewer
(part ofplasma-sdk
).
Locale | Lines | % Done |
---|---|---|
Template | 82 | |
de | 82/82 | 100% |
ro | 70/82 | 85% |
ru | 71/82 | 86% |
uk | 71/82 | 86% |