Initial guide for application translation
Compare changes
Files
2
Apps/Guides/Translating_Apps/index.rst
0 → 100644
+ 117
− 0
If you want to generate a POT file without updating the existing translation files, you can run the ``simple_weather-pot`` rule that is generated by `Meson`_ when an application's build is configured. This can be done using the `Ninja`_ build tool on the command line from the repository root. For example, this is how the :ref:`examples_Simple_Weather` example's initial POT file was generated:
In order to provide a translation of the application, a Portable Object Template (POT) file needs to be generated from all the files that contain user-visible text, including both source code and metadata files. The list of translatable files is the kept in the ``POTFILES`` file in the application's ``po`` directory:
These files are searched for translatable text strings, which are extracted from the arguments of the ``_()`` function, when the ``simple_weather-update-po`` rule is run. This can be performed as part of the process of generating and updating Portable Object (PO) files for each of the languages that the application is translated into. You can run this rule on the command line from the repository root: