From 8a653210e2ecf00c11bd8cdf44af2d8c4814fadf Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 25 Jan 2021 19:46:32 +0100 Subject: build: allow users to disable gettext support (--disable-nls) --- plugins/Makefile.am | 4 ++++ plugins/reload/eom-reload-plugin.c | 2 ++ 2 files changed, 6 insertions(+) (limited to 'plugins') diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 8e11b07..48cb92f 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -50,7 +50,11 @@ plugins_in_in_files = $(plugins_in_files:.desktop.in=.desktop.in.in) plugins_DATA = $(plugins_in_files:.plugin.desktop.in=.plugin) %.plugin: %.plugin.desktop.in +if USE_NLS $(AM_V_GEN) $(MSGFMT) --desktop --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@ +else + $(AM_V_GEN) cp $< $@ +endif DISTCLEANFILES = $(plugins_in_files) CLEANFILES = $(plugins_DATA) diff --git a/plugins/reload/eom-reload-plugin.c b/plugins/reload/eom-reload-plugin.c index 1f22eb2..e69b341 100644 --- a/plugins/reload/eom-reload-plugin.c +++ b/plugins/reload/eom-reload-plugin.c @@ -119,7 +119,9 @@ eom_reload_plugin_activate (EomWindowActivatable *activatable) G_GNUC_BEGIN_IGNORE_DEPRECATIONS; plugin->ui_action_group = gtk_action_group_new ("EomReloadPluginActions"); +#ifdef ENABLE_NLS gtk_action_group_set_translation_domain (plugin->ui_action_group, GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ gtk_action_group_add_actions (plugin->ui_action_group, action_entries, G_N_ELEMENTS (action_entries), plugin->window); -- cgit v1.2.1