summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Xiaotian <[email protected]>2019-05-08 18:20:53 +0800
committerraveit65 <[email protected]>2019-05-10 10:55:29 +0200
commitb343e7dd32af083bdb0e7e2bb0989ca267a8f5ff (patch)
tree642d4bf92f806d2d3f2da8bf40157342e52c06ac
parentaba0d15a199f18f1e700a5c36b95c5504efdce27 (diff)
downloadmate-backgrounds-b343e7dd32af083bdb0e7e2bb0989ca267a8f5ff.tar.bz2
mate-backgrounds-b343e7dd32af083bdb0e7e2bb0989ca267a8f5ff.tar.xz
Migrate from intltool to gettext
-rw-r--r--Makefile.am11
-rw-r--r--abstract/Makefile.am5
-rw-r--r--abstract/mate-abstract.xml.in.in12
-rw-r--r--configure.ac4
-rw-r--r--desktop/Makefile.am4
-rw-r--r--desktop/mate-desktop.xml.in.in20
-rw-r--r--its/wallpaper.its12
-rw-r--r--its/wallpaper.loc10
-rw-r--r--nature/Makefile.am4
-rw-r--r--nature/mate-nature.xml.in.in24
-rw-r--r--po/Makevars79
11 files changed, 142 insertions, 43 deletions
diff --git a/Makefile.am b/Makefile.am
index d59bb5d..57559e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = abstract desktop nature po
+SUBDIRS = po abstract desktop nature
dist-hook:
@if test -d "$(srcdir)/.git"; \
@@ -17,13 +17,9 @@ dist-hook:
fi
EXTRA_DIST = \
+ its \
autogen.sh
-DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update
-
MAINTAINERCLEANFILES = \
Makefile.in \
aclocal.m4 \
@@ -31,9 +27,6 @@ MAINTAINERCLEANFILES = \
configure \
depcomp \
install-sh \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
missing \
mkinstalldirs
diff --git a/abstract/Makefile.am b/abstract/Makefile.am
index 6bd6896..eb12269 100644
--- a/abstract/Makefile.am
+++ b/abstract/Makefile.am
@@ -8,11 +8,12 @@ background_DATA = \
Spring.png \
Waves.png
-
metadata_in_files = mate-abstract.xml.in
metadatadir = $(datadir)/mate-background-properties
metadata_DATA = $(metadata_in_files:.xml.in=.xml)
-@INTLTOOL_XML_RULE@
+
+$(metadata_DATA): $(metadata_in_files)
+ $(AM_V_GEN) GETTEXTDATADIR=$(top_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
noinst_DATA = mate-abstract.xml.in
CLEANFILES = mate-abstract.xml mate-abstract.xml.in
diff --git a/abstract/mate-abstract.xml.in.in b/abstract/mate-abstract.xml.in.in
index 719a257..50a88ba 100644
--- a/abstract/mate-abstract.xml.in.in
+++ b/abstract/mate-abstract.xml.in.in
@@ -3,7 +3,7 @@
<wallpapers>
<wallpaper deleted="false">
<!-- From http://code.google.com/p/gnome-colors/ -->
- <_name>Arc</_name>
+ <name>Arc</name>
<filename>@datadir@/backgrounds/mate/abstract/Arc-Colors-Transparent-Wallpaper.png</filename>
<options>zoom</options>
<shade_type>vertical-gradient</shade_type>
@@ -12,7 +12,7 @@
<options>zoom</options>
</wallpaper>
<wallpaper deleted="false">
- <_name>Flow</_name>
+ <name>Flow</name>
<filename>@datadir@/backgrounds/mate/abstract/Flow.png</filename>
<options>zoom</options>
<shade_type>horizontal-gradient</shade_type>
@@ -22,7 +22,7 @@
<artist>Daniel Galleguillos, Hylke Bons</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Gulp</_name>
+ <name>Gulp</name>
<filename>@datadir@/backgrounds/mate/abstract/Gulp.png</filename>
<shade_type>horizontal-gradient</shade_type>
<pcolor>#627F5A</pcolor>
@@ -31,7 +31,7 @@
<artist>Daniel Galleguillos, Hylke Bons</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Silk</_name>
+ <name>Silk</name>
<filename>@datadir@/backgrounds/mate/abstract/Silk.png</filename>
<shade_type>horizontal-gradient</shade_type>
<pcolor>#27587E</pcolor>
@@ -40,7 +40,7 @@
<artist>Patryk Zawadzki</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Spring</_name>
+ <name>Spring</name>
<filename>@datadir@/backgrounds/mate/abstract/Spring.png</filename>
<shade_type>vertical-gradient</shade_type>
<pcolor>#27587E</pcolor>
@@ -49,7 +49,7 @@
<artist>Patryk Zawadzki</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Waves</_name>
+ <name>Waves</name>
<filename>@datadir@/backgrounds/mate/abstract/Waves.png</filename>
<shade_type>horizontal-gradient</shade_type>
<pcolor>#27587E</pcolor>
diff --git a/configure.ac b/configure.ac
index 87092ef..bd0809f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,8 +10,8 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],
["$GETTEXT_PACKAGE"], [The domain name to use with gettext.])
-AM_GLIB_GNU_GETTEXT()
-IT_PROG_INTLTOOL([0.35.0])
+AM_GNU_GETTEXT_VERSION([0.19.8])
+AM_GNU_GETTEXT([external])
AM_MAINTAINER_MODE
diff --git a/desktop/Makefile.am b/desktop/Makefile.am
index 104f7f2..1f9da2f 100644
--- a/desktop/Makefile.am
+++ b/desktop/Makefile.am
@@ -14,7 +14,9 @@ background_DATA = \
metadata_in_files = mate-desktop.xml.in
metadatadir = $(datadir)/mate-background-properties
metadata_DATA = $(metadata_in_files:.xml.in=.xml)
-@INTLTOOL_XML_RULE@
+
+$(metadata_DATA): $(metadata_in_files)
+ $(AM_V_GEN) GETTEXTDATADIR=$(top_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
noinst_DATA = mate-desktop.xml.in
CLEANFILES = mate-desktop.xml mate-desktop.xml.in
diff --git a/desktop/mate-desktop.xml.in.in b/desktop/mate-desktop.xml.in.in
index c305f17..54a8afb 100644
--- a/desktop/mate-desktop.xml.in.in
+++ b/desktop/mate-desktop.xml.in.in
@@ -2,7 +2,7 @@
<!DOCTYPE wallpapers SYSTEM "mate-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
- <_name>No Desktop Background</_name>
+ <name>No Desktop Background</name>
<filename>(none)</filename>
<options>zoom</options>
<shade_type>vertical-gradient</shade_type>
@@ -10,19 +10,19 @@
<scolor>#627F5A</scolor>
</wallpaper>
<wallpaper deleted="false">
- <_name>Float into MATE</_name>
+ <name>Float into MATE</name>
<filename>@datadir@/backgrounds/mate/desktop/Float-into-MATE.png</filename>
<options>zoom</options>
<artist>Rowen Stipe</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Green Traditional</_name>
+ <name>Green Traditional</name>
<filename>@datadir@/backgrounds/mate/desktop/GreenTraditional.jpg</filename>
<options>zoom</options>
<artist>l0r4n0n</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Stripes</_name>
+ <name>Stripes</name>
<filename>@datadir@/backgrounds/mate/desktop/Stripes.png</filename>
<options>zoom</options>
<shade_type>vertical-gradient</shade_type>
@@ -31,7 +31,7 @@
<artist>Jakub Steiner</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>MATE Stripes Dark</_name>
+ <name>MATE Stripes Dark</name>
<filename>@datadir@/backgrounds/mate/desktop/MATE-Stripes-Dark.png</filename>
<options>zoom</options>
<shade_type>vertical-gradient</shade_type>
@@ -40,7 +40,7 @@
<artist>Adam Erdman</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>MATE Stripes Light</_name>
+ <name>MATE Stripes Light</name>
<filename>@datadir@/backgrounds/mate/desktop/MATE-Stripes-Light.png</filename>
<options>zoom</options>
<shade_type>vertical-gradient</shade_type>
@@ -49,25 +49,25 @@
<artist>Adam Erdman</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Ubuntu MATE Cold</_name>
+ <name>Ubuntu MATE Cold</name>
<filename>@datadir@/backgrounds/mate/desktop/Ubuntu-Mate-Cold-no-logo.png</filename>
<options>zoom</options>
<artist>Goce Mitevski</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Ubuntu MATE Dark</_name>
+ <name>Ubuntu MATE Dark</name>
<filename>@datadir@/backgrounds/mate/desktop/Ubuntu-Mate-Dark-no-logo.png</filename>
<options>zoom</options>
<artist>Goce Mitevski</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Ubuntu MATE Radioactive</_name>
+ <name>Ubuntu MATE Radioactive</name>
<filename>@datadir@/backgrounds/mate/desktop/Ubuntu-Mate-Radioactive-no-logo.png</filename>
<options>zoom</options>
<artist>Goce Mitevski</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Ubuntu MATE Warm</_name>
+ <name>Ubuntu MATE Warm</name>
<filename>@datadir@/backgrounds/mate/desktop/Ubuntu-Mate-Warm-no-logo.png</filename>
<options>zoom</options>
<artist>Goce Mitevski</artist>
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/nature/Makefile.am b/nature/Makefile.am
index fc5a6a6..3038240 100644
--- a/nature/Makefile.am
+++ b/nature/Makefile.am
@@ -17,7 +17,9 @@ background_DATA =\
metadata_in_files = mate-nature.xml.in
metadatadir = $(datadir)/mate-background-properties
metadata_DATA = $(metadata_in_files:.xml.in=.xml)
-@INTLTOOL_XML_RULE@
+
+$(metadata_DATA): $(metadata_in_files)
+ $(AM_V_GEN) GETTEXTDATADIR=$(top_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
noinst_DATA = mate-nature.xml.in
CLEANFILES = mate-nature.xml mate-nature.xml.in
diff --git a/nature/mate-nature.xml.in.in b/nature/mate-nature.xml.in.in
index 45f9f31..a6c4f90 100644
--- a/nature/mate-nature.xml.in.in
+++ b/nature/mate-nature.xml.in.in
@@ -4,7 +4,7 @@
<wallpaper deleted="false">
<!-- Translators: This is the name of a desktop background image that shows an orange/red flower.
You might want to translate it into the equivalent words of your language -->
- <_name>Fresh Flower</_name>
+ <name>Fresh Flower</name>
<filename>@datadir@/backgrounds/mate/nature/FreshFlower.jpg</filename>
<options>zoom</options>
<artist>Jens Ansorg</artist>
@@ -12,67 +12,67 @@
<wallpaper deleted="false">
<!-- Translators: This is the name of a desktop background image that shows a green meadow.
You might want to translate it into the equivalent words of your language -->
- <_name>Green Meadow</_name>
+ <name>Green Meadow</name>
<filename>@datadir@/backgrounds/mate/nature/GreenMeadow.jpg</filename>
<options>zoom</options>
<artist>Timothy Schellhase, Lapo Calamandrei</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Aqua</_name>
+ <name>Aqua</name>
<filename>@datadir@/backgrounds/mate/nature/Aqua.jpg</filename>
<options>zoom</options>
<artist>Charles Barbin</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Dune</_name>
+ <name>Dune</name>
<filename>@datadir@/backgrounds/mate/nature/Dune.jpg</filename>
<options>zoom</options>
<artist>Marco Cogoni, Hylke Bons</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Storm</_name>
+ <name>Storm</name>
<filename>@datadir@/backgrounds/mate/nature/Storm.jpg</filename>
<options>zoom</options>
<artist>Sergey Nazarov</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Two Wings</_name>
+ <name>Two Wings</name>
<filename>@datadir@/backgrounds/mate/nature/TwoWings.jpg</filename>
<options>zoom</options>
<artist>Charles Barbin, Hylke Bons</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Lady Bird</_name>
+ <name>Lady Bird</name>
<filename>@datadir@/backgrounds/mate/nature/LadyBird.jpg</filename>
<options>zoom</options>
<artist>Charles Barbin</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Blinds</_name>
+ <name>Blinds</name>
<filename>@datadir@/backgrounds/mate/nature/Blinds.jpg</filename>
<options>zoom</options>
<artist>Lennart Poettering, Andrea Cimitan</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Rain Drops</_name>
+ <name>Rain Drops</name>
<filename>@datadir@/backgrounds/mate/nature/RainDrops.jpg</filename>
<options>zoom</options>
<artist>blackcombwhistler07</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Yellow Flower</_name>
+ <name>Yellow Flower</name>
<filename>@datadir@/backgrounds/mate/nature/YellowFlower.jpg</filename>
<options>zoom</options>
<artist>Charles Barbin</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Garden</_name>
+ <name>Garden</name>
<filename>@datadir@/backgrounds/mate/nature/Garden.jpg</filename>
<options>zoom</options>
<artist>Charles Barbin</artist>
</wallpaper>
<wallpaper deleted="false">
- <_name>Wood</_name>
+ <name>Wood</name>
<filename>@datadir@/backgrounds/mate/nature/Wood.jpg</filename>
<options>zoom</options>
<artist>Jean-François Fortin Tam</artist>
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..71210e1
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,79 @@
+# 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
+
+# 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 = MATE Desktop Environment team
+
+# This tells whether or not to prepend "GNU " prefix to the package
+# name that gets inserted into the header of the $(DOMAIN).pot file.
+# Possible values are "yes", "no", or empty. If it is empty, try to
+# detect it automatically by scanning the files in $(top_srcdir) for
+# "GNU packagename" string.
+PACKAGE_GNU =
+
+# 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 =
+
+# 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 =
+
+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
+# context. Possible values are "yes" and "no". Set this to yes if the
+# package uses functions taking also a message context, like pgettext(), or
+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
+USE_MSGCTXT = no
+
+# These options get passed to msgmerge.
+# Useful options are in particular:
+# --previous to keep previous msgids of translated messages,
+# --quiet to reduce the verbosity.
+MSGMERGE_OPTIONS =
+
+# These options get passed to msginit.
+# If you want to disable line wrapping when writing PO files, add
+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
+# MSGINIT_OPTIONS.
+MSGINIT_OPTIONS =
+
+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
+# has changed. Possible values are "yes" and "no". Set this to no if
+# the POT file is checked in the repository and the version control
+# program ignores timestamps.
+PO_DEPENDS_ON_POT = yes
+
+# 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 = yes
+$(DOMAIN).pot-update: export GETTEXTDATADIR = $(top_srcdir)