[gtksourceview/wip/dont-use-intltool: 1/9] i18n: get rid of intltool
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/dont-use-intltool: 1/9] i18n: get rid of intltool
- Date: Fri, 2 Oct 2015 17:30:02 +0000 (UTC)
commit a151825292c985b685a29e3a74920e5180962936
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Aug 12 12:58:05 2015 +0200
i18n: get rid of intltool
This is the first step. Creating the glade catalog doesn't work anymore,
and strings from XML files are not correctly extracted. This will be
fixed in later commits by using itstool.
intltool is unmaintained, it requires hacks to run 'make distcheck' with
the latest Automake version. gettext has now almost all the features
that we need, except for XML files where itstool can be used.
Makefile.am | 9 -----
autogen.sh | 1 -
configure.ac | 7 ++--
data/glade/Makefile.am | 2 -
po/Makevars | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
po/POTFILES.skip | 1 -
6 files changed, 82 insertions(+), 16 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c7b9742..13024ce 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,20 +3,12 @@ SUBDIRS = gtksourceview po data docs tests
pkgconfig_DATA = gtksourceview-3.0.pc
EXTRA_DIST = \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in \
gtksourceview.doap \
gtksourceview-3.0.pc.in \
gtksourceview-zip.in \
HACKING \
MAINTAINERS
-DISTCLEANFILES = \
- intltool-extract \
- intltool-merge \
- intltool-update
-
MAINTAINERCLEANFILES = \
ABOUT-NLS \
aclocal.m4 \
@@ -54,7 +46,6 @@ MAINTAINERCLEANFILES = \
m4/intldir.m4 \
m4/intl.m4 \
m4/intlmacosx.m4 \
- m4/intltool.m4 \
m4/intmax.m4 \
m4/introspection.m4 \
m4/inttypes_h.m4 \
diff --git a/autogen.sh b/autogen.sh
index 87ed317..8a7d049 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -23,7 +23,6 @@ fi
aclocal --install || exit 1
gtkdocize --copy || exit 1
-intltoolize --force --copy --automake || exit 1
autoreconf --verbose --force --install -Wno-portability || exit 1
cd $olddir
diff --git a/configure.ac b/configure.ac
index 50461dc..80f798b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -132,9 +132,10 @@ AS_IF([ test "$glade_catalog" = "yes" ],
AC_MSG_RESULT([$GLADE_CATALOG_DIR])
AC_SUBST(GLADE_CATALOG_DIR)])
-# i18N stuff
-AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
-IT_PROG_INTLTOOL([0.40])
+# i18n
+AM_GNU_GETTEXT([external])
+AM_GNU_GETTEXT_VERSION([0.19.4])
+
AS_IF([test "$USE_NLS" = "yes"],
[AC_DEFINE([ENABLE_NLS], [1], [Defined if native language support should be enabled.])])
diff --git a/data/glade/Makefile.am b/data/glade/Makefile.am
index c8f4b8a..27e73a0 100644
--- a/data/glade/Makefile.am
+++ b/data/glade/Makefile.am
@@ -17,6 +17,4 @@ validate: $(catalog_DATA)
CLEANFILES = $(catalog_DATA)
- INTLTOOL_XML_NOMERGE_RULE@
-
-include $(top_srcdir)/git.mk
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..e0ac653
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,78 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = gtksourceview-3.0
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=GD_:2
+
+# 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 = The GtkSourceView 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 = no
+
+# 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 = $(PACKAGE_BUGREPORT)
+
+# 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 = yes
+
+# 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 = --quiet
+
+# 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 = 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 = yes
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 39fa32a..6d0663f 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -1,6 +1,5 @@
data/styles/testdark.xml
docs/reference/lang-tutorial.xml
-sub/docs/reference/lang-tutorial.xml
tests/test-completion.ui
tests/test-search.ui
tests/test-widget.ui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]