Translations
User language
Inishell so far is shipped with support for English and German. Go to Inishell's setting's ("View" -> "Settings" menu) and select your language in the dropdown. Then, click "Save". Note that this is only for the static GUI elements and the applications' translations must be provided by the respective software vendors (see below).
(Inishells Benutzeroberfläche wird derzeit auf Englisch und auf Deutsch angeboten. Um auf die Deutsche Version zu wechseln öffnen Sie die Inishell-Einstellungen (über das "View" --> "Settings" Menü) und ändern Sie die entsprechende Einstellung im Dropdown-Menü. Dies bezieht sich vorerst nur auf Inishells statische Oberfläche und die Übersetzung von Applikationen muss von den jeweiligen Softwareentwicklern zur Verfügung gestellt werden, siehe unten.)
Application languages
nothing yet
Translations for Inishell developers
The main (i. e. static) GUI can relatively easily be translated by adding new language files. They will be embedded in the executable when building so that the program can ship without separate files.
Step 1: create the language file
Suppose you want to add a French translation and have the Qt build tools installed. Add an abbreviation for the language to the qmake file inishell.pro: LANGUAGES = de fr
Once you have this template, you can forget about the qmake file again (it's deprecated but helps for this step still).
Create a template file by running:
lupdate -verbose inishell.pro
--> "inishell_fr.ts" will be created in "resources/langs".
Step 2: translate the texts
With a plain text editor open the .ts file and look for the following lines:
Insert your translations like this:
Or, much more comfortably, open the .ts file in Qt Linguist and follow the intuitive steps therein.
Step 3: make a binary language file
This is handled by CMake so it's enough to build the project once.
If you choose to go through the shipped (but deprecated) qmake file the final language file needs to be added to the resources in "inishell.qrc" with the following line:
Note the .qm extension which will be created in the build process via lrelease
.
Notes
- Translations that aren't there will default back to English with no harm done.
- The developer can leave comments for the translator by prefacing comments with "//:"
- Ampersands are for keyboard shortcuts
- Run
lupdate
again when new translation strings are introduced in the code with "tr(...)" tags - Run
lupdate inishell.pro -noobsolete
to remove outdated translations (file path changed, reworded text, ...) - If you get errors for a .qm file that should be created in the build process it was probably deleted in between, rebuild the project.