[d-feet: 1/2] build: Migrate from Intltool to Gettext



commit 6cc2cada7b13a6e2f04a9129643aa619ae1126f2
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Fri Dec 21 10:18:18 2018 +0100

    build: Migrate from Intltool to Gettext
    
    Recent versions of Gettext are able to translate several formats
    that are used in GNOME applications. This patch migrates from
    Intltool to Gettext by using meson's i18n features.

 data/meson.build                    |  9 +++++----
 data/org.gnome.dfeet.appdata.xml.in |  8 ++++----
 data/org.gnome.dfeet.desktop.in.in  | 10 ++++++----
 meson.build                         |  5 -----
 po/POTFILES.in                      | 10 +++++-----
 5 files changed, 20 insertions(+), 22 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 2d104fb..026bd80 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -12,22 +12,23 @@ desktop_in = configure_file(
   configuration: desktop_conf,
 )
 
-custom_target(
+i18n.merge_file(
   desktop,
+  type: 'desktop',
   input: desktop_in,
   output: '@BASENAME@',
-  command: intltool_desktop_cmd,
+  po_dir: po_dir,
   install: true,
   install_dir: df_datadir / 'applications',
 )
 
 appdata = df_namespace + '.appdata.xml'
 
-custom_target(
+i18n.merge_file(
   appdata,
   input: appdata + '.in',
   output: '@BASENAME@',
-  command: intltool_xml_cmd,
+  po_dir: po_dir,
   install: true,
   install_dir: df_datadir / 'metainfo',
 )
diff --git a/data/org.gnome.dfeet.appdata.xml.in b/data/org.gnome.dfeet.appdata.xml.in
index c4065c1..d86c07a 100644
--- a/data/org.gnome.dfeet.appdata.xml.in
+++ b/data/org.gnome.dfeet.appdata.xml.in
@@ -4,14 +4,14 @@
   <id>org.gnome.dfeet.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-2.0+</project_license>
-  <_name>D-Feet</_name>
-  <_summary>Debug D-Bus applications</_summary>
+  <name>D-Feet</name>
+  <summary>Debug D-Bus applications</summary>
   <description>
-    <_p>
+    <p>
       A simple application for debugging the message bus system D-Bus.
       D-Feet can be used to inspect D-Bus interfaces of running programs and
       invoke methods on those interfaces.
-    </_p>
+    </p>
   </description>
   <screenshots>
     <screenshot height="787" type="default" width="1400">
diff --git a/data/org.gnome.dfeet.desktop.in.in b/data/org.gnome.dfeet.desktop.in.in
index 134cf10..3c2fd99 100644
--- a/data/org.gnome.dfeet.desktop.in.in
+++ b/data/org.gnome.dfeet.desktop.in.in
@@ -1,9 +1,11 @@
 [Desktop Entry]
-_Name=D-Feet
-_GenericName=D-Bus Debugger
-_Comment=Debug D-Bus applications
-_Keywords=debug;d-bus;dbus;dfeet;
+Name=D-Feet
+GenericName=D-Bus Debugger
+Comment=Debug D-Bus applications
+# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list 
MUST also end with a semicolon!
+Keywords=debug;d-bus;dbus;dfeet;
 Exec=@PACKAGE@
+# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
 Icon=org.gnome.dfeet
 Terminal=false
 Type=Application
diff --git a/meson.build b/meson.build
index 7604164..65d7eda 100644
--- a/meson.build
+++ b/meson.build
@@ -31,11 +31,6 @@ data_dir = source_root / 'data'
 po_dir = source_root / 'po'
 src_dir = source_root / 'src'
 
-intltool_merge = find_program('intltool-merge')
-intltool_cache = po_dir / '.intltool-merge-cache'
-intltool_desktop_cmd = [intltool_merge, '-d', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
-intltool_xml_cmd = [intltool_merge, '-x', '-u', '-c', intltool_cache, po_dir, '@INPUT@', '@OUTPUT@']
-
 top_inc = include_directories('.')
 
 df_conf = configuration_data()
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cbe23f5..a8c0898 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,9 +3,9 @@
 data/org.gnome.dfeet.appdata.xml.in
 data/org.gnome.dfeet.desktop.in.in
 data/org.gnome.dfeet.gschema.xml
-[type: gettext/glade]data/ui/addconnectiondialog.ui
-[type: gettext/glade]data/ui/bus.ui
-[type: gettext/glade]data/ui/executedialog.ui
-[type: gettext/glade]data/ui/introspection.ui
-[type: gettext/glade]data/ui/mainwindow.ui
+data/ui/addconnectiondialog.ui
+data/ui/bus.ui
+data/ui/executedialog.ui
+data/ui/introspection.ui
+data/ui/mainwindow.ui
 src/dfeet/application.py


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