[gitg/wip/piotrdrag/translate-appdata: 4/4] appdata: Hook up for translation



commit aecda13ff04a34274878508e7a5c50e42c031337
Author: Piotr Drąg <piotrdrag gmail com>
Date:   Fri Oct 26 17:24:49 2018 +0200

    appdata: Hook up for translation
    
    Fixes https://gitlab.gnome.org/GNOME/gitg/issues/93

 data/{gitg.appdata.xml => gitg.appdata.xml.in} |  0
 data/meson.build                               | 11 +++++++++--
 po/POTFILES.in                                 |  1 +
 3 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/data/gitg.appdata.xml b/data/gitg.appdata.xml.in
similarity index 100%
rename from data/gitg.appdata.xml
rename to data/gitg.appdata.xml.in
diff --git a/data/meson.build b/data/meson.build
index c62ff382..8dbd66b2 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -25,8 +25,15 @@ configure_file(
   install_dir: join_paths(gitg_datadir, 'glib-2.0', 'schemas'),
 )
 
-install_data(
-  'gitg.appdata.xml',
+appdata = 'gitg.appdata.xml'
+
+i18n.merge_file(
+  appdata,
+  type: 'xml',
+  input: appdata + '.in',
+  output: appdata,
+  po_dir: po_dir,
+  install: true,
   install_dir: join_paths(gitg_datadir, 'metainfo'),
 )
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0710e32b..7a1c1204 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,6 +1,7 @@
 # List of source files containing translatable strings.
 # This list has been automatically generated by update-potfiles.
 contrib/xml/xml-reader.c
+data/gitg.appdata.xml.in
 data/gitg.desktop.in
 data/org.gnome.gitg.gschema.xml.in
 gitg/commit/gitg-commit-dialog.vala


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]