diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2015-06-29 14:46:12 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2015-06-30 10:38:23 -0500 |
commit | c205fbe91a1e725be4648688da4e35b8b352d1e6 (patch) | |
tree | 6a03078ce218250961e1d4c90ac8c36c336097ed | |
parent | e3c3269b6bfb4f177b5b4ba3cd94d3348e5f64da (diff) | |
download | epiphany-c205fbe91a1e725be4648688da4e35b8b352d1e6.tar.gz |
Make gettext mandatory and stop using glib-gettext
It's fighting with intltool and intltool is winning, so no point in
keeping it around and making things more complicated. In the future, it
would be good to replace intltool with upstream gettext (not
glib-gettext), but we still need intltool to translate the appdata file.
In the meantime, we'll no longer have two competing applications that
both want to create po/Makefile.in.in.
The AM_GLIB_GNU_GETTEXT macro was defining ENABLE_NLS if gettext is
available, to make i18n optional. But most GNOME programs require
gettext nowadays, and it's installed pretty much everywhere, so there is
no reason for it to be optional anymore. Note, the only reason we were
using glib-gettext before, as far as I see, was to define ENABLE_NLS.
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | lib/Makefile.am | 1 | ||||
-rw-r--r-- | lib/ephy-langs.c | 2 | ||||
-rw-r--r-- | po/Makevars | 41 | ||||
-rw-r--r-- | src/Makefile.am | 10 | ||||
-rw-r--r-- | src/ephy-main.c | 2 | ||||
-rw-r--r-- | src/ephy-search-provider-main.c | 2 |
7 files changed, 6 insertions, 58 deletions
diff --git a/configure.ac b/configure.ac index 3436b4953..2e3a72db0 100644 --- a/configure.ac +++ b/configure.ac @@ -181,12 +181,8 @@ else AC_MSG_ERROR([iso-codes is required]) fi -GETTEXT_PACKAGE=epiphany -AC_SUBST([GETTEXT_PACKAGE]) -AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package]) -AM_GLIB_GNU_GETTEXT - IT_PROG_INTLTOOL([0.50.0]) +AC_SUBST([GETTEXT_PACKAGE], [epiphany]) # ******************************* # User help diff --git a/lib/Makefile.am b/lib/Makefile.am index 3fed885da..5082d1fae 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -123,6 +123,7 @@ ephy_profile_migrator_CPPFLAGS = \ -I$(top_builddir)/lib \ -I$(srcdir)/history \ -DSHARE_DIR=\"$(pkgdatadir)\" \ + -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ $(AM_CPPFLAGS) BUILT_SOURCES = \ diff --git a/lib/ephy-langs.c b/lib/ephy-langs.c index 229a16667..208e3cb57 100644 --- a/lib/ephy-langs.c +++ b/lib/ephy-langs.c @@ -155,7 +155,6 @@ ephy_langs_get_languages (void) static void ephy_langs_bind_iso_domains (void) { -#ifdef ENABLE_NLS static gboolean bound = FALSE; if (bound == FALSE) @@ -168,7 +167,6 @@ ephy_langs_bind_iso_domains (void) bound = TRUE; } -#endif } static void diff --git a/po/Makevars b/po/Makevars deleted file mode 100644 index 957971ec3..000000000 --- a/po/Makevars +++ /dev/null @@ -1,41 +0,0 @@ -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(GETTEXT_PACKAGE) - -# 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=Q_ - -# 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 = GNOME Translation Project - -# 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=epiphany - -# 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 = diff --git a/src/Makefile.am b/src/Makefile.am index 0240ccdd9..f851d0e1b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -151,8 +151,8 @@ epiphany_CPPFLAGS = \ -I$(top_builddir)/lib/widgets \ -I$(top_srcdir)/src/bookmarks \ -DDATADIR=\""$(datadir)"\" \ + -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ - $(INCINTL) \ $(AM_CPPFLAGS) epiphany_CFLAGS = \ @@ -170,8 +170,7 @@ epiphany_LDADD = \ $(top_builddir)/lib/libephymisc.la \ $(top_builddir)/lib/egg/libegg.la \ $(DEPENDENCIES_LIBS) \ - $(CODE_COVERAGE_LDFLAGS) \ - $(LIBINTL) + $(CODE_COVERAGE_LDFLAGS) libexec_PROGRAMS = epiphany-search-provider @@ -187,8 +186,8 @@ epiphany_search_provider_CPPFLAGS = \ -I$(top_srcdir)/lib/history \ -I$(top_srcdir)/src/bookmarks \ -DDATADIR=\""$(datadir)"\" \ + -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ - $(INCINTL) \ $(AM_CPPFLAGS) epiphany_search_provider_CFLAGS = $(epiphany_CFLAGS) @@ -202,8 +201,7 @@ epiphany_search_provider_LDADD = \ $(top_builddir)/lib/libephymisc.la \ $(top_builddir)/lib/egg/libegg.la \ $(DEPENDENCIES_LIBS) \ - $(CODE_COVERAGE_LDFLAGS) \ - $(LIBINTL) + $(CODE_COVERAGE_LDFLAGS) TYPES_SOURCE = \ ephy-type-builtins.c \ diff --git a/src/ephy-main.c b/src/ephy-main.c index c487e7c61..cce808688 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -238,12 +238,10 @@ main (int argc, int status; EphyFileHelpersFlags flags; -#ifdef ENABLE_NLS /* Initialize the i18n stuff */ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); -#endif /* check libxml2 API version epiphany was compiled with against the * version we're running with. diff --git a/src/ephy-search-provider-main.c b/src/ephy-search-provider-main.c index 7ac746b17..6b3ba64d0 100644 --- a/src/ephy-search-provider-main.c +++ b/src/ephy-search-provider-main.c @@ -32,12 +32,10 @@ gint main (gint argc, gchar** argv) int status; GError *error = NULL; -#ifdef ENABLE_NLS /* Initialize the i18n stuff */ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); -#endif if (!ephy_file_helpers_init (NULL, 0, &error)) { g_printerr ("%s\n", error->message); |