melawy-plasma-plasmoid-win7.../org.kde.plasma.win7showdesktop/translate
Valeria Fadeeva fc34808a9d Update 2024-05-04 13:43:30 +05:00
..
ReadMe.md Update 2024-05-04 13:43:30 +05:00
ar.po Update 2024-05-04 13:43:30 +05:00
es.po Update 2024-05-04 13:43:30 +05:00
fr.po Update 2024-05-04 13:43:30 +05:00
nl.po Update 2024-05-04 13:43:30 +05:00
pt_BR.po Update 2024-05-04 13:43:30 +05:00
template.pot Update 2024-05-04 13:43:30 +05:00

ReadMe.md

Translate

Status

Locale Lines % Done
Template 36
ar 5/36 13%
es 23/36 63%
fr 5/36 13%
nl 23/36 63%
pt_BR 19/36 52%

New Translations

  • Fill out template.pot with your translations then open a new issue, name the file spanish.txt, attach the txt file to the issue (drag and drop).

Or if you know how to make a pull request

Scripts

Zren's kpac script can easily run the gettext commands for you, parsing the metadata.json and filling out any placeholders for you. kpac can be downloaded here and should be placed at ~/Code/plasmoid-widgetname/kpac to edit translations at ~/Code/plasmoid-widgetname/package/translate/.

  • python3 ./kpac i18n will parse the i18n() calls in the *.qml files and write it to the template.pot file. Then it will merge any changes into the *.po language files. Then it converts the *.po files to it's binary *.mo version and move it to contents/locale/... which will bundle the translations in the *.plasmoid without needing the user to manually install them.
  • python3 ./kpac localetest will convert the .po to the *.mo files then run plasmoidviewer (part of plasma-sdk).

How it works

Since KDE Frameworks v5.37, translations can be bundled with the zipped *.plasmoid file downloaded from the store.

  • xgettext extracts the messages from the source code into a template.pot.
  • Translators copy the template.pot to fr.po to translate the French language.
  • When the source code is updated, we use msgmerge to update the fr.po based on the updated template.pot.
  • When testing or releasing the widget, we convert the .po files to their binary .mo form with msgfmt.

The binary .mo translation files are placed in package/contents/locale/ so you may want to add *.mo to your .gitignore.

package/contents/locale/fr/LC_MESSAGES/plasma_applet_org.kde.plasma.win7showdesktop.mo

Version 8 of Zren's i18n scripts.