Skip to content

Translations ("i18n", "l10n")

olf edited this page Aug 20, 2023 · 14 revisions

Introduction

Do mind the definitions in the glossary on the "Terms and wording" wiki page. These comprehensive definitions (in English) might also be helpful to properly determine the corresponding terms in other languages.

Please use the discussion thread "Problematic source strings for translation" for feedback and criticism with regard to source strings (in English) and the aforementioned glossary.

Translating Patches

Creating multilingual Patches

Add appropriate import statement to your Patch:

import org.SfietKonstantin.patchmanager 2.0

Add property pmTranslationLoaded to the root object of your Patch:

property bool pmTranslationLoaded: PatchManagerTranslator ? PatchManagerTranslator.installTranslator("name-of-your-patch") : false

Change most visible text to [ToDo: Understand & describe, what this is about, e.g. "Emit different text, when a translation was successfully loaded"?]:

pmTranslationLoaded ? qsTr("Normal text if all is okay") : "Please update patchmanager!"

Original sources

Translating Patchmanager

Do read and optionally follow the links of the resolution of issue #27.

Qt utilities

Qt Linguist

https://doc.qt.io/qt-5/linguist-manager.html

lupdate

https://linux.die.net/man/1/lupdate

lrelease

https://linux.die.net/man/1/lrelease

Transifex

https://app.transifex.com/

https://app.transifex.com/coderus/patchmanager3/

https://app.transifex.com/coderus/patchmanager3/languages/

https://app.transifex.com/coderus/patchmanager3/content/