Warning, /education/marble/data/lang/README is written in an unsupported language. File is not indexed.

0001 Handling translation catalogs for app bundles
0002 =============================================
0004 Usage
0005 -----
0006 A package build is done as usual, just with 2 extra steps.
0008 # Provide marble sources, e.g. working copy of repo or tarball untarred
0009 [...]
0011 # EXTRA STEP: Add translation sources to the sources (here for stable):
0012 cd <toplevel_sources>
0013 data/lang/download-pos.sh stable
0015 # Configure build, run cmake as usual:
0016 cd <toplevel_build>
0017 cmake [...]
0019 # Build as usual
0020 make
0022 # EXTRA STEP: Build translations for bundle package optionally
0023 make bundle_translations
0025 # Install as usual
0026 # If bundle_translations was called before, this will also install the qm files
0027 make install
0029 # Package as usual
0030 [...]
0033 During development, if removing or adding a translation source file after
0034 cmake has been run already, the buildsystem needs to be first updated
0035 to pick up the removed/added files:
0037 make rebuild_cache
0039 Next, or if one of the existing translation source files has been updated,
0040 the translations need to be explicitly build again:
0042 make bundle_translations
0045 Challenge
0046 ---------
0047 Translation catalogs are not part of the Marble source repository, instead
0048 are in a different repository.
0049 So on packaging time the catalogs need to be added to the working copy, so
0050 they can be processed as needed and become part of the package product.
0052 The usual KDE source packaging scripts are fetching all po files belonging to
0053 the repo and are storing them in the toplevel dir in a subfolder po/$lang/*.po.
0054 Additionally either the buildsystem has some if-po/-exists-process-and-install-po-files
0055 or the packaging script will inject such logic into the buildsystem.
0057 When creating binary packages, this is often done directly from a checkout of the
0058 sources and not from the released source tarball. So the step of fetching all po
0059 files has to be done here as well as making sure the processing and installation is done.
0061 Not all products are build for all platforms. So e.g. for Android only Marble Maps
0062 will be created (separate packaging done for Behaim app, ignored for now). Right now
0063 the apps only or also released as bundles (Maps, Behaim, MarbleQt) or the lib only need
0064 the one single marble_qt catalog. The other (ki18n) catalogs are only used on platforms
0065 where binary packaging is done by the distributions and also unbundled.
0068 So supporting translations with binary packaging needs to work independently:
0069 * separate script to download po files, in separate folder:
0070   download-pos.sh
0071 * separate target name for creating the qm files:
0072   bundle_translations