From 7578472e39bbf4f23985a30858e1b7d324b39c9a Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 25 Jan 2021 21:55:28 +0100 Subject: build: allow users to disable gettext support (--disable-nls) --- util/test-menu-spec.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util') 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 #include +#ifdef ENABLE_NLS #include +#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); -- cgit v1.2.1