summaryrefslogtreecommitdiff
path: root/util/test-menu-spec.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-01-25 21:55:28 +0100
committerraveit65 <[email protected]>2021-02-07 14:10:56 +0100
commit7578472e39bbf4f23985a30858e1b7d324b39c9a (patch)
tree049de08e10e7ca08520a1a32594555dd0bfe1340 /util/test-menu-spec.c
parente1431577975f16550213502f5e6767db240c5124 (diff)
downloadmate-menus-7578472e39bbf4f23985a30858e1b7d324b39c9a.tar.bz2
mate-menus-7578472e39bbf4f23985a30858e1b7d324b39c9a.tar.xz
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'util/test-menu-spec.c')
-rw-r--r--util/test-menu-spec.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/test-menu-spec.c b/util/test-menu-spec.c
index 2b742fc..9de1ab6 100644
--- a/util/test-menu-spec.c
+++ b/util/test-menu-spec.c
@@ -19,7 +19,9 @@
#include <config.h>
#include <glib/gi18n.h>
+#ifdef ENABLE_NLS
#include <locale.h>
+#endif
#include "matemenu-tree.h"
@@ -202,7 +204,13 @@ main (int argc, char **argv)
MateMenuTreeFlags flags;
GError *error = NULL;
+#ifdef ENABLE_NLS
setlocale(LC_ALL, "");
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
+
options_context = g_option_context_new(_("- test MATE's implementation of the Desktop Menu Specification"));
g_option_context_add_main_entries(options_context, options, GETTEXT_PACKAGE);
g_option_context_parse(options_context, &argc, &argv, NULL);