Remove ENABLE_NLS guards, making 'nls' only affect po/ directory

Sat, 08 Dec 2018 22:02:38 -0600

author
Mike Ruprecht <cmaiku@gmail.com>
date
Sat, 08 Dec 2018 22:02:38 -0600
changeset 39374
d6261d7d0c91
parent 39373
47667f5c6696
child 39375
4fa7e9a15bd9

Remove ENABLE_NLS guards, making 'nls' only affect po/ directory

This patch makes the 'nls' build option only enable/disable building
the po/ directory, and consequently .desktop files, by removing the
ENABLE_NLS guards and config definition from the codebase.

doc/reference/libpurple/plugin_i18n.xml file | annotate | diff | comparison | revisions
libpurple/core.c file | annotate | diff | comparison | revisions
meson.build file | annotate | diff | comparison | revisions
pidgin/gtkblist.c file | annotate | diff | comparison | revisions
pidgin/gtkconv.c file | annotate | diff | comparison | revisions
pidgin/gtkmedia.c file | annotate | diff | comparison | revisions
pidgin/gtkwebviewtoolbar.c file | annotate | diff | comparison | revisions
--- a/doc/reference/libpurple/plugin_i18n.xml	Sat Dec 08 22:01:50 2018 -0600
+++ b/doc/reference/libpurple/plugin_i18n.xml	Sat Dec 08 22:02:38 2018 -0600
@@ -135,10 +135,8 @@
     <listitem><para>
 Now add the following within your 'plugin_load' function:
 <programlisting>
-#ifdef ENABLE_NLS
 	bindtextdomain(GETTEXT_PACKAGE, PURPLE_LOCALEDIR);
 	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-#endif /* ENABLE_NLS */
 
 	info.name        = _("&lt;YOUR PLUGIN NAME&gt;");
 	info.summary     = _("&lt;YOUR PLUGIN SUMMARY&gt;");
--- a/libpurple/core.c	Sat Dec 08 22:01:50 2018 -0600
+++ b/libpurple/core.c	Sat Dec 08 22:02:38 2018 -0600
@@ -95,9 +95,8 @@
 	g_return_val_if_fail(ui != NULL, FALSE);
 	g_return_val_if_fail(purple_get_core() == NULL, FALSE);
 
-#ifdef ENABLE_NLS
 	bindtextdomain(PACKAGE, PURPLE_LOCALEDIR);
-#endif
+
 #ifdef _WIN32
 	wpurple_init();
 #endif
--- a/meson.build	Sat Dec 08 22:01:50 2018 -0600
+++ b/meson.build	Sat Dec 08 22:02:38 2018 -0600
@@ -264,8 +264,6 @@
 INSTALL_I18N = get_option('nls')
 
 if INSTALL_I18N
-	conf.set('ENABLE_NLS', true)
-
 	i18n = import('i18n')
 
 	subdir('po')
--- a/pidgin/gtkblist.c	Sat Dec 08 22:01:50 2018 -0600
+++ b/pidgin/gtkblist.c	Sat Dec 08 22:02:38 2018 -0600
@@ -5782,9 +5782,7 @@
 
 	/******************************* Menu bar *************************************/
 	action_group = gtk_action_group_new("BListActions");
-#ifdef ENABLE_NLS
 	gtk_action_group_set_translation_domain(action_group, PACKAGE);
-#endif
 	gtk_action_group_add_actions(action_group,
 	                             blist_menu_entries,
 	                             G_N_ELEMENTS(blist_menu_entries),
@@ -8188,9 +8186,8 @@
 	}
 
 	plugins_action_group = gtk_action_group_new("PluginActions");
-#ifdef ENABLE_NLS
 	gtk_action_group_set_translation_domain(plugins_action_group, PACKAGE);
-#endif
+
 	plugins_ui = g_string_new(NULL);
 
 	/* Add a submenu for each plugin with custom actions */
@@ -8263,9 +8260,8 @@
 	}
 
 	sort_action_group = gtk_action_group_new("SortMethods");
-#ifdef ENABLE_NLS
 	gtk_action_group_set_translation_domain(sort_action_group, PACKAGE);
-#endif
+
 	ui_string = g_string_new("<ui><menubar name='BList'>"
 	                         "<menu action='BuddiesMenu'><menu action='SortMenu'>");
 
--- a/pidgin/gtkconv.c	Sat Dec 08 22:01:50 2018 -0600
+++ b/pidgin/gtkconv.c	Sat Dec 08 22:02:38 2018 -0600
@@ -3598,9 +3598,7 @@
 	GtkWidget *menuitem;
 
 	action_group = gtk_action_group_new("ConversationActions");
-#ifdef ENABLE_NLS
 	gtk_action_group_set_translation_domain(action_group, PACKAGE);
-#endif
 	gtk_action_group_add_actions(action_group,
 	                             menu_entries,
 	                             G_N_ELEMENTS(menu_entries),
--- a/pidgin/gtkmedia.c	Sat Dec 08 22:01:50 2018 -0600
+++ b/pidgin/gtkmedia.c	Sat Dec 08 22:02:38 2018 -0600
@@ -288,10 +288,7 @@
 	GtkWidget *menu;
 
 	window->priv->ui = gtk_builder_new();
-
-#ifdef ENABLE_NLS
 	gtk_builder_set_translation_domain(window->priv->ui, PACKAGE);
-#endif
 
 	error = NULL;
 	if (!gtk_builder_add_from_string(window->priv->ui, media_menu, -1,
--- a/pidgin/gtkwebviewtoolbar.c	Sat Dec 08 22:01:50 2018 -0600
+++ b/pidgin/gtkwebviewtoolbar.c	Sat Dec 08 22:02:38 2018 -0600
@@ -1404,9 +1404,7 @@
 	};
 
 	action_group = gtk_action_group_new("PidginWebViewToolbar");
-#ifdef ENABLE_NLS
 	gtk_action_group_set_translation_domain(action_group, PACKAGE);
-#endif
 
 	for (i = 0; i < G_N_ELEMENTS(actions); i++) {
 		GtkAction *action;

mercurial