[gnome-backgrounds] build: Drop intltool



commit b22be04b6fe386ca97aea54ee2d9060e69437653
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat May 27 06:12:50 2017 +0200

    build: Drop intltool
    
    intltool is unmaintained nowadays, while upstream gettext now allows
    to extract strings from XML files and merge back translations according
    to custom rules.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783223

 autogen.sh                              |    6 ---
 backgrounds/Makefile.am                 |    5 ++-
 backgrounds/adwaita.xml.in.in           |    2 +-
 backgrounds/gnome-backgrounds.xml.in.in |   34 ++++++++--------
 configure.ac                            |    6 +--
 its/wallpaper.its                       |   12 +++++
 its/wallpaper.loc                       |   10 +++++
 po/Makevars                             |   68 +++++++++++++++++++++++++++++++
 8 files changed, 114 insertions(+), 29 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index cade580..41f7121 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -13,12 +13,6 @@ PKG_NAME="gnome-backgrounds"
     exit 1
 }
 
-echo "Running glib-gettextize"
-glib-gettextize --copy --force
-
-echo "Running intltoolize"
-intltoolize --copy --force --automake
-
 which gnome-autogen.sh || {
     echo "You need to install gnome-common package"
     exit 1
diff --git a/backgrounds/Makefile.am b/backgrounds/Makefile.am
index 1a9b2a4..b7cdb64 100644
--- a/backgrounds/Makefile.am
+++ b/backgrounds/Makefile.am
@@ -24,7 +24,10 @@ background_DATA =\
 metadata_in_files = gnome-backgrounds.xml.in adwaita.xml.in
 metadatadir = $(datadir)/gnome-background-properties
 metadata_DATA = $(metadata_in_files:.xml.in=.xml)
-@INTLTOOL_XML_RULE@
+
+%.xml: %.xml.in Makefile
+       $(AM_V_GEN) GETTEXTDATADIRS=$(top_srcdir) \
+                    $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
 
 noinst_DATA = gnome-backgrounds.xml.in adwaita.xml.in
 CLEANFILES = gnome-backgrounds.xml gnome-backgrounds.xml.in adwaita.xml adwaita.xml.in adwaita-timed.xml
diff --git a/backgrounds/adwaita.xml.in.in b/backgrounds/adwaita.xml.in.in
index 875561a..78f670f 100644
--- a/backgrounds/adwaita.xml.in.in
+++ b/backgrounds/adwaita.xml.in.in
@@ -2,7 +2,7 @@
 <!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
 <wallpapers>
   <wallpaper deleted="false">
-    <_name>Default Background</_name>
+    <name>Default Background</name>
     <filename>@datadir@/backgrounds/gnome/adwaita-timed.xml</filename>
     <options>zoom</options>
     <shade_type>solid</shade_type>
diff --git a/backgrounds/gnome-backgrounds.xml.in.in b/backgrounds/gnome-backgrounds.xml.in.in
index 11dfa46..7f6d6a1 100644
--- a/backgrounds/gnome-backgrounds.xml.in.in
+++ b/backgrounds/gnome-backgrounds.xml.in.in
@@ -4,7 +4,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Waterfalls.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Waterfalls</_name>
+               <name>Waterfalls</name>
                <filename>@BACKGROUNDDIR@/Waterfalls.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -13,7 +13,7 @@
                <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Bokeh_Tails.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Bokeh Tails</_name>
+               <name>Bokeh Tails</name>
                <filename>@BACKGROUNDDIR@/Bokeh_Tails.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -22,7 +22,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Chmiri.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Dandelion</_name>
+               <name>Dandelion</name>
                <filename>@BACKGROUNDDIR@/Chmiri.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -31,7 +31,7 @@
                <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Dark_Ivy.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Dark Ivy</_name>
+               <name>Dark Ivy</name>
                <filename>@BACKGROUNDDIR@/Dark_Ivy.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -40,7 +40,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Fabric.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Pink Fabric</_name>
+               <name>Pink Fabric</name>
                <filename>@BACKGROUNDDIR@/Fabric.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -49,7 +49,7 @@
                <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Flowerbed.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Flower Bed</_name>
+               <name>Flower Bed</name>
                <filename>@BACKGROUNDDIR@/Flowerbed.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -58,7 +58,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Icescape.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Icescape</_name>
+               <name>Icescape</name>
                <filename>@BACKGROUNDDIR@/Icescape.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -67,7 +67,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/adwaita-morning.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Adwaita</_name>
+               <name>Adwaita</name>
                <filename>@BACKGROUNDDIR@/adwaita-timed.xml</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -76,7 +76,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/adwaita-night.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Lock Screen</_name>
+               <name>Lock Screen</name>
                <filename>@BACKGROUNDDIR@/adwaita-lock.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -85,7 +85,7 @@
                <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Mirror.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Mirror</_name>
+               <name>Mirror</name>
                <filename>@BACKGROUNDDIR@/Mirror.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -94,7 +94,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Road.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Road</_name>
+               <name>Road</name>
                <filename>@BACKGROUNDDIR@/Road.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -103,7 +103,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Sandstone.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Sandstone</_name>
+               <name>Sandstone</name>
                <filename>@BACKGROUNDDIR@/Sandstone.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -112,7 +112,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Signpost_of_the_Shadows.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Signpost of the Shadows</_name>
+               <name>Signpost of the Shadows</name>
                <filename>@BACKGROUNDDIR@/Signpost_of_the_Shadows.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -121,7 +121,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Stones.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Stones</_name>
+               <name>Stones</name>
                <filename>@BACKGROUNDDIR@/Stones.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -130,7 +130,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Terraform-green.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Terraform Green</_name>
+               <name>Terraform Green</name>
                <filename>@BACKGROUNDDIR@/Terraform-green.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -139,7 +139,7 @@
        <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Waves.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Waves</_name>
+               <name>Waves</name>
                <filename>@BACKGROUNDDIR@/Waves.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
@@ -148,7 +148,7 @@
                <wallpaper deleted="false">
                <!-- TRANSLATORS: This is the name of this background picture: 
http://git.gnome.org/browse/gnome-backgrounds/plain/backgrounds/Godafoss_Iceland.jpg - 
                You might want to translate it into the equivalent words of your language  -->
-               <_name>Godafoss Iceland</_name>
+               <name>Godafoss Iceland</name>
                <filename>@BACKGROUNDDIR@/Godafoss_Iceland.jpg</filename>
                <options>zoom</options>
     <pcolor>#ffffff</pcolor>
diff --git a/configure.ac b/configure.ac
index 9241f16..560ab87 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,14 +10,12 @@ AM_MAINTAINER_MODE([enable])
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-# Internationalization:
-IT_PROG_INTLTOOL([0.40.0])
-
 GETTEXT_PACKAGE=gnome-backgrounds
 AC_SUBST(GETTEXT_PACKAGE)
 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [The domain name to use with gettext.])
 
-AM_GLIB_GNU_GETTEXT()
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT([external])
 
 
 AC_CONFIG_FILES([
diff --git a/its/wallpaper.its b/its/wallpaper.its
new file mode 100644
index 0000000..b08a8b2
--- /dev/null
+++ b/its/wallpaper.its
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!--
+See the gettext documentation for the file format:
+http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html
+-->
+<its:rules xmlns:its="http://www.w3.org/2005/11/its";
+           xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0";
+           version="2.0">
+  <its:translateRule selector="/wallpapers" translate="no"/>
+
+  <its:translateRule selector="//name" translate="yes"/>
+</its:rules>
diff --git a/its/wallpaper.loc b/its/wallpaper.loc
new file mode 100644
index 0000000..506073b
--- /dev/null
+++ b/its/wallpaper.loc
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!--
+See the gettext documentation for the file format:
+http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html
+-->
+<locatingRules>
+  <locatingRule name="wallpaper" pattern="*.xml">
+    <documentRule localName="wallpapers" target="wallpaper.its"/>
+  </locatingRule>
+</locatingRules>
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..cf4c870
--- /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-backgrounds&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


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