Merge branch 'nls' into 'main'

Remove #ifdef ENABLE_NLS

See merge request GNOME/gtk!4606
This commit is contained in:
Matthias Clasen 2022-03-31 17:07:37 +00:00
commit 6030da573d
6 changed files with 4 additions and 20 deletions

View 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__
@ -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

View 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)

View 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
}

View 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");

View 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 =

View 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");