[epiphany/wip/autocrap: 4/37] Make gettext mandatory and stop using glib-gettext



commit c205fbe91a1e725be4648688da4e35b8b352d1e6
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon Jun 29 14:46:12 2015 -0500

    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.

 configure.ac                    |    6 +----
 lib/Makefile.am                 |    1 +
 lib/ephy-langs.c                |    2 -
 po/Makevars                     |   41 ---------------------------------------
 src/Makefile.am                 |   10 +++-----
 src/ephy-main.c                 |    2 -
 src/ephy-search-provider-main.c |    2 -
 7 files changed, 6 insertions(+), 58 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3436b49..2e3a72d 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 3fed885..5082d1f 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 229a166..208e3cb 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/src/Makefile.am b/src/Makefile.am
index 0240ccd..f851d0e 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 c487e7c..cce8086 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 7ac746b..6b3ba64 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);


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