From d105267f775b4371a670f016c9fbce7e81b2632a Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 18 Feb 2021 10:59:50 +0100 Subject: build: allow users to disable gettext support (--disable-nls) --- tools/mate-session-inhibit.c | 4 ++++ tools/mate-session-save.c | 2 ++ 2 files changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/mate-session-inhibit.c b/tools/mate-session-inhibit.c index 6473735..77f12e3 100644 --- a/tools/mate-session-inhibit.c +++ b/tools/mate-session-inhibit.c @@ -24,7 +24,9 @@ #include #include #include +#ifdef ENABLE_NLS #include +#endif /* ENABLE_NLS */ #include #include @@ -149,10 +151,12 @@ int main (int argc, char *argv[]) g_set_prgname (prgname); g_free (prgname); +#ifdef ENABLE_NLS setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ for (i = 1; i < argc; i++) { diff --git a/tools/mate-session-save.c b/tools/mate-session-save.c index 31e302c..3b76373 100644 --- a/tools/mate-session-save.c +++ b/tools/mate-session-save.c @@ -206,9 +206,11 @@ int main(int argc, char* argv[]) int conflicting_options; /* Initialize the i18n stuff */ +#ifdef ENABLE_NLS bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ error = NULL; -- cgit v1.2.1