Howto:Translate FlightGear: Difference between revisions

Jump to navigation Jump to search
added information about Qt Linguist for translation
No edit summary
(added information about Qt Linguist for translation)
Line 30: Line 30:
# Edit <code>man/xx/man1/CMakeLists.txt</code> and <code>man/xx/man5/CMakeLists.txt</code>: on the last row, set the installation directory (<code>DESTINATION</code>), respectively, to <code>${CMAKE_INSTALL_MANDIR}/xx/man1</code> and <code>${CMAKE_INSTALL_MANDIR}/xx/man5</code>.
# Edit <code>man/xx/man1/CMakeLists.txt</code> and <code>man/xx/man5/CMakeLists.txt</code>: on the last row, set the installation directory (<code>DESTINATION</code>), respectively, to <code>${CMAKE_INSTALL_MANDIR}/xx/man1</code> and <code>${CMAKE_INSTALL_MANDIR}/xx/man5</code>.
# Open the man pages in the subdirectory of your language and translate them.
# Open the man pages in the subdirectory of your language and translate them.
== Using QtLinguist to translate XLF Files ==
One can use QtLinguist (application from the QT package) to translate XLIFF files. Install QT package from the Qt home page (https://www.qt.io/download). Opening QtLinguist will show default translation environment. Open XLF file and start translating. The interface is divided into four main sections:
* Context - this is a grouping of the strings to translate. Defined by the developer. Icon beside the group show translation status. Everything should be in the end with the green check sign.
* Strings - strings in the selected group. Select string to translate it
* Sources and Forms - additional information about location of the translated string in the source code (not always visible and with correct information)
* Source text - the main place where translation occurs. Translate here selected strings.
One have to translate the original strings into the target language. Icon beside the original text in the 'Strings' section will show status. Green check mark when everything is correct. Yellow question mark, when the translation is in place but it it not marked as "verified". Untranslated strings are marked with the grey question mark. Sometimes QtLinguist displays exclamation mark - this shows that the translated text does not conform to the original text e.g. original text ends with the punctuation but the translated text not. Buttons (and keyboard shortcuts) on the main toolbar area helps with the strings matching. When the text is translated and you're comfortable with the style/meaning etc. you select green check mark button. It marks the translation as translated-verified. So this is the expected end state for this.
Reference:
* [https://doc.qt.io/qt-5/qtlinguist-index.html Qt Linguist manual]
* [https://doc.qt.io/qt-5/linguist-translators.html Qt Linguist for translators guide]


== Related content ==
== Related content ==
39

edits

Navigation menu