Bejegyzések

Bejegyzések megjelenítése ebből a hónapból: augusztus, 2018

Enable localization for KStars on Android

As a first KDE application, KStars got localization working on Android. KStars has the traditional gettext translations in the KDE system and these translations had to be downloaded, converted and packaged inside the apk. The basic steps were to enable localization on Android: 1. Set CMake variable KDE_L10N_AUTO_TRANSLATIONS to ON. This step will automatically download the translations during the build with a custom build target "fetch-translations". 2. Convert the translations from .po extension into .mo format. This step was done with a custom build target in CMake: IF (ANDROID)     ADD_CUSTOM_TARGET(convert_translations_to_android ${CMAKE_SOURCE_DIR}/tools/convert_translations.sh ${CMAKE_BINARY_DIR}/android/export/share/kstars                         WORKING_DIRECTORY ${CMAKE_BINARY_DIR})     ADD_DEPENDENCIES(convert_translations_to_android fetch-translations) ENDIF () The convert_tran...