[gnome-tweak-tool] build: Drop intltool



commit 6dbc75790a2cbd665c60f21b4686862770ba0e99
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue May 30 05:16:03 2017 +0200

    build: Drop intltool
    
    While intltool is unmaintined nowadays, upstream gettext gained direct
    support for anything we were using it for, so make the switch.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783227

 configure.ac                         |    4 +-
 data/Makefile.am                     |    6 ++-
 data/gnome-tweak-tool.appdata.xml.in |   12 +++---
 data/gnome-tweak-tool.desktop.in     |    6 +-
 po/Makevars                          |   68 ++++++++++++++++++++++++++++++++++
 po/POTFILES.in                       |    2 +-
 6 files changed, 85 insertions(+), 13 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 39cadcd..db00816 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,11 +15,13 @@ PKG_CHECK_MODULES([GSETTINGS_DESKTOP_SCHEMAS], [gsettings-desktop-schemas >= $DE
 PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= $GTK_REQUIRED_VERSION])
 PKG_CHECK_MODULES([PYGOBJECT3], [pygobject-3.0 >= $PYGOBJECT_REQUIRED_VERSION])
 
-IT_PROG_INTLTOOL([0.40.0])
 GETTEXT_PACKAGE=gnome-tweak-tool
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
 
+AM_GNU_GETTEXT_VERSION([0.19.6])
+AM_GNU_GETTEXT([external])
+
 AS_AC_EXPAND(DATADIR, "${datadir}")
 AS_AC_EXPAND(PKGDATADIR, "${datadir}/${PACKAGE}")
 AS_AC_EXPAND(GSETTINGSSCHEMADIR, "${gsettingsschemadir}")
diff --git a/data/Makefile.am b/data/Makefile.am
index 8896dfa..2f8e9f7 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -8,12 +8,14 @@ gui_DATA = \
 desktop_in_files = gnome-tweak-tool.desktop.in
 desktopdir = $(datadir)/applications
 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-@INTLTOOL_DESKTOP_RULE@
+%.desktop: %.desktop.in Makefile
+       $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
 
-@INTLTOOL_XML_RULE@
 appdatadir = $(datadir)/appdata
 appdata_in_files = gnome-tweak-tool.appdata.xml.in
 appdata_DATA = $(appdata_in_files:.xml.in=.xml)
+%.xml: %.xml.in Makefile
+       $(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
 
 EXTRA_DIST = \
        $(appdata_in_files) \
diff --git a/data/gnome-tweak-tool.appdata.xml.in b/data/gnome-tweak-tool.appdata.xml.in
index d9f7df6..9a4634d 100644
--- a/data/gnome-tweak-tool.appdata.xml.in
+++ b/data/gnome-tweak-tool.appdata.xml.in
@@ -3,16 +3,16 @@
   <id>gnome-tweak-tool.desktop</id>
   <metadata_license>CC0-1.0</metadata_license>
   <project_license>GPL-3.0</project_license>
-  <_name>GNOME Tweak Tool</_name>
-  <_summary>Tweak advanced GNOME 3 settings</_summary>
+  <name>GNOME Tweak Tool</name>
+  <summary>Tweak advanced GNOME 3 settings</summary>
   <description>
-    <_p>
+    <p>
      GNOME Tweak Tool allows adjusting advanced GNOME options.
-    </_p>
-    <_p>
+    </p>
+    <p>
     It can install and manage themes and extensions, change power settings,
     manage startup applications, and enable desktop icons among other settings.
-  </_p>
+  </p>
   </description>
   <project_group>GNOME</project_group>
   <screenshots>
diff --git a/data/gnome-tweak-tool.desktop.in b/data/gnome-tweak-tool.desktop.in
index 897cd6b..61a3f56 100644
--- a/data/gnome-tweak-tool.desktop.in
+++ b/data/gnome-tweak-tool.desktop.in
@@ -1,11 +1,11 @@
 [Desktop Entry]
-_Name=Tweak Tool
-_Comment=Tweak advanced GNOME 3 settings
+Name=Tweak Tool
+Comment=Tweak advanced GNOME 3 settings
 Icon=gnome-tweak-tool
 Exec=gnome-tweak-tool
 Terminal=false
 Type=Application
 StartupNotify=true
 Categories=GNOME;GTK;Utility;
-_Keywords=Settings;Advanced;Preferences;Extensions;Fonts;Theme;XKB;Keyboard;Typing;
+Keywords=Settings;Advanced;Preferences;Extensions;Fonts;Theme;XKB;Keyboard;Typing;
 OnlyShowIn=GNOME;Unity;Pantheon;
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..f967ad8
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,68 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ \
+        --keyword=C_:1c,2 --keyword=NC_:1c,2 \
+        --keyword=g_dngettext:2,3 --add-comments \
+        --flag=g_dngettext:2:pass-c-format \
+        --flag=g_strdup_printf:1:c-format \
+        --flag=g_string_printf:2:c-format \
+        --flag=g_string_append_printf:2:c-format \
+        --flag=g_error_new:3:c-format \
+        --flag=g_set_error:4:c-format \
+        --flag=g_markup_printf_escaped:1:c-format \
+        --flag=g_log:3:c-format \
+        --flag=g_print:1:c-format \
+        --flag=g_printerr:1:c-format \
+        --flag=g_printf:1:c-format \
+        --flag=g_fprintf:2:c-format \
+        --flag=g_sprintf:2:c-format \
+        --flag=g_snprintf:3:c-format
+
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
+# package.  (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.)  Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright.  The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Translation copyright holder
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+#   in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+#   understood.
+# - Strings which make invalid assumptions about notation of date, time or
+#   money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = 
http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-tweak-tool&keywords=I18N+L10N&component=general
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used.  It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
+
+# Ignore the timestamp of the .pot file, as git clones do not have
+# deterministic timestamps, and .po files are updated by translators
+# (only) in GNOME projects.
+PO_DEPENDS_ON_POT = no
+
+# This tells whether or not to forcibly update $(DOMAIN).pot and
+# regenerate PO files on "make dist".  Possible values are "yes" and
+# "no".  Set this to no if the POT file and PO files are maintained
+# externally.
+DIST_DEPENDS_ON_UPDATE_PO = no
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5318c21..55a8014 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,7 @@
 # List of source files which contain translatable strings.
 data/gnome-tweak-tool.appdata.xml.in
 data/gnome-tweak-tool.desktop.in
-[type: gettext/glade]data/shell.ui
+data/shell.ui
 gtweak/app.py
 gtweak/tweakmodel.py
 gtweak/tweakview.py


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