[gtk/gtk-4-6] Remove #ifdef ENABLE_NLS
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-6] Remove #ifdef ENABLE_NLS
- Date: Thu, 21 Apr 2022 23:29:07 +0000 (UTC)
commit 91c60dcac02925657bf6cc29732e5e9d63ef0f65
Author: Xavier Claessens <xavier claessens collabora com>
Date: Thu Mar 31 11:41:34 2022 -0400
Remove #ifdef ENABLE_NLS
libintl API is guaranteed to always be available, glib will fallback to
proxy-libintl in case gettext is not found.
gdk/gdkintl.h | 8 ++------
gtk/gtkintl.h | 6 +-----
gtk/gtkmain.c | 4 +---
tools/encodesymbolic.c | 2 --
tools/gtk-launch.c | 2 --
tools/updateiconcache.c | 2 --
6 files changed, 4 insertions(+), 20 deletions(-)
---
diff --git a/gdk/gdkintl.h b/gdk/gdkintl.h
index 9dd6bff991..0202c95443 100644
--- a/gdk/gdkintl.h
+++ b/gdk/gdkintl.h
@@ -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__
@@ -27,10 +27,6 @@
#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
diff --git a/gtk/gtkintl.h b/gtk/gtkintl.h
index caeb68eb60..4bf66606b8 100644
--- a/gtk/gtkintl.h
+++ b/gtk/gtkintl.h
@@ -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)
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index aa32930242..b268ddbf69 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -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
}
diff --git a/tools/encodesymbolic.c b/tools/encodesymbolic.c
index 6f4a44f573..90887f3365 100644
--- a/tools/encodesymbolic.c
+++ b/tools/encodesymbolic.c
@@ -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");
diff --git a/tools/gtk-launch.c b/tools/gtk-launch.c
index 9305095ea2..3ed73dde0f 100644
--- a/tools/gtk-launch.c
+++ b/tools/gtk-launch.c
@@ -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 =
diff --git a/tools/updateiconcache.c b/tools/updateiconcache.c
index 1618a6e40a..a23c96ca19 100644
--- a/tools/updateiconcache.c
+++ b/tools/updateiconcache.c
@@ -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");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]