From b343e7dd32af083bdb0e7e2bb0989ca267a8f5ff Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Wed, 8 May 2019 18:20:53 +0800 Subject: Migrate from intltool to gettext --- Makefile.am | 11 +----- abstract/Makefile.am | 5 ++- abstract/mate-abstract.xml.in.in | 12 +++--- configure.ac | 4 +- desktop/Makefile.am | 4 +- desktop/mate-desktop.xml.in.in | 20 +++++----- its/wallpaper.its | 12 ++++++ its/wallpaper.loc | 10 +++++ nature/Makefile.am | 4 +- nature/mate-nature.xml.in.in | 24 ++++++------ po/Makevars | 79 ++++++++++++++++++++++++++++++++++++++++ 11 files changed, 142 insertions(+), 43 deletions(-) create mode 100644 its/wallpaper.its create mode 100644 its/wallpaper.loc create mode 100644 po/Makevars 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 @@ - <_name>Arc + Arc @datadir@/backgrounds/mate/abstract/Arc-Colors-Transparent-Wallpaper.png zoom vertical-gradient @@ -12,7 +12,7 @@ zoom - <_name>Flow + Flow @datadir@/backgrounds/mate/abstract/Flow.png zoom horizontal-gradient @@ -22,7 +22,7 @@ Daniel Galleguillos, Hylke Bons - <_name>Gulp + Gulp @datadir@/backgrounds/mate/abstract/Gulp.png horizontal-gradient #627F5A @@ -31,7 +31,7 @@ Daniel Galleguillos, Hylke Bons - <_name>Silk + Silk @datadir@/backgrounds/mate/abstract/Silk.png horizontal-gradient #27587E @@ -40,7 +40,7 @@ Patryk Zawadzki - <_name>Spring + Spring @datadir@/backgrounds/mate/abstract/Spring.png vertical-gradient #27587E @@ -49,7 +49,7 @@ Patryk Zawadzki - <_name>Waves + Waves @datadir@/backgrounds/mate/abstract/Waves.png horizontal-gradient #27587E 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 @@ - <_name>No Desktop Background + No Desktop Background (none) zoom vertical-gradient @@ -10,19 +10,19 @@ #627F5A - <_name>Float into MATE + Float into MATE @datadir@/backgrounds/mate/desktop/Float-into-MATE.png zoom Rowen Stipe - <_name>Green Traditional + Green Traditional @datadir@/backgrounds/mate/desktop/GreenTraditional.jpg zoom l0r4n0n - <_name>Stripes + Stripes @datadir@/backgrounds/mate/desktop/Stripes.png zoom vertical-gradient @@ -31,7 +31,7 @@ Jakub Steiner - <_name>MATE Stripes Dark + MATE Stripes Dark @datadir@/backgrounds/mate/desktop/MATE-Stripes-Dark.png zoom vertical-gradient @@ -40,7 +40,7 @@ Adam Erdman - <_name>MATE Stripes Light + MATE Stripes Light @datadir@/backgrounds/mate/desktop/MATE-Stripes-Light.png zoom vertical-gradient @@ -49,25 +49,25 @@ Adam Erdman - <_name>Ubuntu MATE Cold + Ubuntu MATE Cold @datadir@/backgrounds/mate/desktop/Ubuntu-Mate-Cold-no-logo.png zoom Goce Mitevski - <_name>Ubuntu MATE Dark + Ubuntu MATE Dark @datadir@/backgrounds/mate/desktop/Ubuntu-Mate-Dark-no-logo.png zoom Goce Mitevski - <_name>Ubuntu MATE Radioactive + Ubuntu MATE Radioactive @datadir@/backgrounds/mate/desktop/Ubuntu-Mate-Radioactive-no-logo.png zoom Goce Mitevski - <_name>Ubuntu MATE Warm + Ubuntu MATE Warm @datadir@/backgrounds/mate/desktop/Ubuntu-Mate-Warm-no-logo.png zoom Goce Mitevski 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 @@ + + + + + + + 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 @@ + + + + + + + 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 @@ - <_name>Fresh Flower + Fresh Flower @datadir@/backgrounds/mate/nature/FreshFlower.jpg zoom Jens Ansorg @@ -12,67 +12,67 @@ - <_name>Green Meadow + Green Meadow @datadir@/backgrounds/mate/nature/GreenMeadow.jpg zoom Timothy Schellhase, Lapo Calamandrei - <_name>Aqua + Aqua @datadir@/backgrounds/mate/nature/Aqua.jpg zoom Charles Barbin - <_name>Dune + Dune @datadir@/backgrounds/mate/nature/Dune.jpg zoom Marco Cogoni, Hylke Bons - <_name>Storm + Storm @datadir@/backgrounds/mate/nature/Storm.jpg zoom Sergey Nazarov - <_name>Two Wings + Two Wings @datadir@/backgrounds/mate/nature/TwoWings.jpg zoom Charles Barbin, Hylke Bons - <_name>Lady Bird + Lady Bird @datadir@/backgrounds/mate/nature/LadyBird.jpg zoom Charles Barbin - <_name>Blinds + Blinds @datadir@/backgrounds/mate/nature/Blinds.jpg zoom Lennart Poettering, Andrea Cimitan - <_name>Rain Drops + Rain Drops @datadir@/backgrounds/mate/nature/RainDrops.jpg zoom blackcombwhistler07 - <_name>Yellow Flower + Yellow Flower @datadir@/backgrounds/mate/nature/YellowFlower.jpg zoom Charles Barbin - <_name>Garden + Garden @datadir@/backgrounds/mate/nature/Garden.jpg zoom Charles Barbin - <_name>Wood + Wood @datadir@/backgrounds/mate/nature/Wood.jpg zoom Jean-François Fortin Tam 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) -- cgit v1.2.1