_()
around it. Go back to your project and make all your strings translatable by adding _()
.merge_file
method combines translating and installing files, similarly to how the executable
method combines building and installing your app. You might have noticed that this method has both an input
argument and an output
argument. We can use this instead of the rename
argument from the install_data
method.merge_file
method has an input
and output
. We're going to append the additional extension .in
to our .desktop and .metainfo.xml files so that this method can take the untranslated files and produce translated files with the correct names.git mv
command here instead of renaming in the file manager or with mv
so that git
can keep track of the file rename as part of our revision history..pot
file:de.po
and es.po
. These files are now ready for translators to localize your app!-pot
and -update-po
build targets from the previous two steps. If you want to support more languages, just list them in the LINGUAS file and generate the new po file with the -update-po
target. Don't forget to add any new po files to git!/// TRANSLATORS:
comments.