From a45da626c262ddcb1f131979b404b926c0d3c534 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 28 Dec 2017 11:45:12 -0500 Subject: [PATCH] Add quickstart instructions for intltool --- docs/sources/quickstart/translation.xml | 26 +++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/sources/quickstart/translation.xml b/docs/sources/quickstart/translation.xml index 4bb67c61..e163c7f6 100644 --- a/docs/sources/quickstart/translation.xml +++ b/docs/sources/quickstart/translation.xml @@ -31,13 +31,35 @@ Each translatable element in the .xml.in file needs to be prefixed with an underscore (_) to be marked as translatable. - Apart from that, the same specifications apply to this file as for any other AppStream metadata. + This should include the name, summary, and caption tags, as well as each paragraph in the + description. Apart from that, the same specifications apply to this file as for any other AppStream metadata. - TODO: Fill in some generic examples how Intltool can be used. + To translate the appstream data, first add the .xml.in file to po/POTFILES.in, along with any other + translatable files. Then create the translation template file <package name>.pot. + ]]> + + + For each supported language, copy the template file to po/<language>-[<COUNTRY>].po, where + po/<language> and the optional po/<COUNTRY> are standard two-letter codes. + Edit the file to add translated strings. + + + + As the translatable content is updated, recreate the template file, and update the .po files. + + + ]]> + + + Create the translated .xml with the following command. + + + .xml.in .xml]]> +
Integrating with Autotools (the AppStream way)