Remove #ifdef ENABLE_NLS
authorXavier Claessens <xavier.claessens@collabora.com>
Thu, 31 Mar 2022 15:41:34 +0000 (11:41 -0400)
committerXavier Claessens <xavier.claessens@collabora.com>
Thu, 31 Mar 2022 15:41:34 +0000 (11:41 -0400)
libintl API is guaranteed to always be available, glib will fallback to
proxy-libintl in case gettext is not found.

gdk/gdkintl.h
gtk/gtkintl.h
gtk/gtkmain.c
tools/encodesymbolic.c
tools/gtk-launch.c
tools/updateiconcache.c

index 9dd6bff991773f9fe526f7be75c798f3b287ec29..0202c9544350717e5df5777f2fcae5ec6f41287c 100644 (file)
@@ -19,7 +19,7 @@
  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  * file for a list of people on the GTK+ Team.  See the ChangeLog
  * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
  */
 
 #ifndef __GDKINTL_H__
 
 #include <glib/gi18n-lib.h>
 
-#ifdef ENABLE_NLS
-#define P_(String) dgettext(GETTEXT_PACKAGE "-properties",String)
-#else
-#define P_(String) (String)
-#endif
+#define P_(String) dgettext (GETTEXT_PACKAGE "-properties", String)
 
 #endif
index caeb68eb6019a6f9920986a972e5a83b306b8de6..4bf66606b86945faa382f7da0a9a1ab1480658de 100644 (file)
@@ -3,11 +3,7 @@
 
 #include <glib/gi18n-lib.h>
 
-#ifdef ENABLE_NLS
-#define P_(String) g_dgettext(GETTEXT_PACKAGE "-properties",String)
-#else 
-#define P_(String) (String)
-#endif
+#define P_(String) g_dgettext (GETTEXT_PACKAGE "-properties", String)
 
 /* not really I18N-related, but also a string marker macro */
 #define I_(string) g_intern_static_string (string)
index ab6ddba96e99d4470d014b6015751dfb328a3eaf..7cc39c35f859a86696c6380bc2ea082580a2562e 100644 (file)
@@ -505,13 +505,11 @@ gettext_initialization (void)
 {
   setlocale_initialization ();
 
-#ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, _gtk_get_localedir ());
   bindtextdomain (GETTEXT_PACKAGE "-properties", _gtk_get_localedir ());
-#    ifdef HAVE_BIND_TEXTDOMAIN_CODESET
+#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   bind_textdomain_codeset (GETTEXT_PACKAGE "-properties", "UTF-8");
-#    endif
 #endif
 }
 
index 6f4a44f5737e406c0c9516de9678375645befa11..90887f336557e6c79b42ae1a4825ad1f41beeb92 100644 (file)
@@ -59,11 +59,9 @@ main (int argc, char **argv)
 
   setlocale (LC_ALL, "");
 
-#ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR);
 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-#endif
 #endif
 
   g_set_prgname ("gtk-encode-symbolic-svg");
index 9305095ea201dbcfb8e623ef4bd78ba608dfff6e..3ed73dde0f2b1bb7e2f2f66b99f8d0f1089dba39 100644 (file)
@@ -60,12 +60,10 @@ main (int argc, char *argv[])
 
   setlocale (LC_ALL, "");
 
-#ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR);
   textdomain (GETTEXT_PACKAGE);
 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-#endif
 #endif
 
   context =
index 1618a6e40af4532740b366b295fcbf80a1747cc2..a23c96ca1952b3383deb06f27a78f55daed64699 100644 (file)
@@ -1703,11 +1703,9 @@ main (int argc, char **argv)
 
   setlocale (LC_ALL, "");
 
-#ifdef ENABLE_NLS
   bindtextdomain (GETTEXT_PACKAGE, GTK_LOCALEDIR);
 #ifdef HAVE_BIND_TEXTDOMAIN_CODESET
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-#endif
 #endif
 
   context = g_option_context_new ("ICONPATH");