summaryrefslogtreecommitdiff
path: root/gsearchtool
diff options
context:
space:
mode:
Diffstat (limited to 'gsearchtool')
-rw-r--r--gsearchtool/data/Makefile.am10
-rw-r--r--gsearchtool/help/Makefile.am4
-rw-r--r--gsearchtool/src/gsearchtool.c7
3 files changed, 21 insertions, 0 deletions
diff --git a/gsearchtool/data/Makefile.am b/gsearchtool/data/Makefile.am
index a3afbba0..4651ba1b 100644
--- a/gsearchtool/data/Makefile.am
+++ b/gsearchtool/data/Makefile.am
@@ -24,16 +24,26 @@ gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
appdatadir = $(datadir)/metainfo
appdata_in_files = mate-search-tool.appdata.xml.in
appdata_DATA = $(appdata_in_files:.xml.in=.xml)
+
$(appdata_DATA): $(appdata_in_files)
+if USE_NLS
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+else
+ $(AM_V_GEN) cp $< $@
+endif
man_MANS = mate-search-tool.1
Utilitiesdir = $(datadir)/applications
Utilities_in_files = mate-search-tool.desktop.in
Utilities_DATA = $(Utilities_in_files:.desktop.in=.desktop)
+
$(Utilities_DATA): $(Utilities_in_files)
+if USE_NLS
$(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@
+else
+ $(AM_V_GEN) cp $< $@
+endif
EXTRA_DIST = \
$(icon_DATA) \
diff --git a/gsearchtool/help/Makefile.am b/gsearchtool/help/Makefile.am
index 52a93666..2f16e2bb 100644
--- a/gsearchtool/help/Makefile.am
+++ b/gsearchtool/help/Makefile.am
@@ -20,10 +20,14 @@ HELP_FILES = index.docbook legal.xml
HELP_MEDIA = figures/mate-search-tool_window.png
+if USE_NLS
# Add linguas to be ignored, e.g. IGNORE_HELP_LINGUAS = ca de es fr
IGNORE_HELP_LINGUAS =
HELP_LINGUAS = $(if $(IGNORE_HELP_LINGUAS), \
$(filter-out $(IGNORE_HELP_LINGUAS),$(subst /,,$(dir $(wildcard */*.po)))), \
$(subst /,,$(dir $(wildcard */*.po))) )
+else
+HELP_LINGUAS =
+endif
-include $(top_srcdir)/git.mk
diff --git a/gsearchtool/src/gsearchtool.c b/gsearchtool/src/gsearchtool.c
index fec6e1ab..e51980c1 100644
--- a/gsearchtool/src/gsearchtool.c
+++ b/gsearchtool/src/gsearchtool.c
@@ -40,7 +40,10 @@
#include <glib/gi18n.h>
#include <gdk/gdk.h>
#include <gio/gio.h>
+
+#ifdef ENABLE_NLS
#include <locale.h>
+#endif /* ENABLE_NLS */
#include "gsearchtool.h"
#include "gsearchtool-callbacks.h"
@@ -3047,13 +3050,17 @@ main (int argc,
GError * error = NULL;
EggSMClient * client;
+#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
context = g_option_context_new (N_("- the MATE Search Tool"));
+#ifdef ENABLE_NLS
g_option_context_set_translation_domain(context, GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
gsearch_setup_goption_descriptions ();
g_option_context_add_main_entries (context, GSearchGOptionEntries, GETTEXT_PACKAGE);
g_option_context_add_group (context, gtk_get_option_group (TRUE));