diff options
author | rbuj <[email protected]> | 2021-02-18 10:59:50 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-02-24 16:05:39 +0100 |
commit | d105267f775b4371a670f016c9fbce7e81b2632a (patch) | |
tree | d3085f4d43d7fdcb41d80636404ac15720388ce3 /tools | |
parent | 036594c5542272f719994a62a4663fce998e26f2 (diff) | |
download | mate-session-manager-d105267f775b4371a670f016c9fbce7e81b2632a.tar.bz2 mate-session-manager-d105267f775b4371a670f016c9fbce7e81b2632a.tar.xz |
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/mate-session-inhibit.c | 4 | ||||
-rw-r--r-- | tools/mate-session-save.c | 2 |
2 files changed, 6 insertions, 0 deletions
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 <unistd.h> #include <stdlib.h> #include <string.h> +#ifdef ENABLE_NLS #include <locale.h> +#endif /* ENABLE_NLS */ #include <glib.h> #include <glib/gi18n.h> @@ -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; |