From e50a1907e04a320bf9e054182b8dbeb4c52eb076 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sat, 13 Feb 2021 12:32:06 +0100 Subject: build: allow users to disable gettext support (--disable-nls) --- typing-break/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'typing-break/main.c') diff --git a/typing-break/main.c b/typing-break/main.c index 145d1c5d..c018f820 100644 --- a/typing-break/main.c +++ b/typing-break/main.c @@ -68,12 +68,16 @@ main (int argc, char *argv[]) GError *error = NULL; gboolean retval; +#ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ option_context = g_option_context_new (NULL); +#ifdef ENABLE_NLS g_option_context_set_translation_domain (option_context, GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ g_option_context_add_main_entries (option_context, options, GETTEXT_PACKAGE); g_option_context_add_group (option_context, gtk_get_option_group (TRUE)); -- cgit v1.2.1