Translations Directory

The po directory holds files related to translations of the application into different languages. It also contains files that help the build system keep the translations up to date.




POT file containing the translatable strings for the application.

The build file for the po directory.


Contains a list of files to scan for translatable strings.


Contains a list of language codes corresponding to the PO files that should be processed for use in the application.


A sample PO translation file for British English.

The treasure.pot file is a Portable Object Template (POT) file that contains the user-visible strings for the application. Strings are obtained from the files listed in the POTFILES file, which includes source and UI files:


Translations of the strings are stored as message catalogs in Portable Object (PO) files for each language. These files are compiled to Machine Object (MO) files by the build system if the languages they represent are listed in the LINGUAS file. For example, the en_GB.po file will be processed because it is listed as en_GB in the LINGUAS file:


The treasure.pot file is generated when the meson-treasure-pot build rule is run:

ninja -C _build meson-treasure-pot

Run this rule whenever you update the application with new user-visible strings that will need to be translated. Then run the meson-treasure-update-po rule to update the PO files:

ninja -C _build meson-treasure-update-po

The strings in each PO file can then be checked and translated to the appropriate language. When the application is built these are automatically compiled to MO files. When the application is installed these are copied to the appropriate directories on the system.