summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-02-08 11:13:05 +0100
committerraveit65 <[email protected]>2021-02-09 10:27:40 +0100
commit0ff5527f5b057d26e75ea7c44ec4ea809c140cdc (patch)
tree6771dc459f2c954cd82b5dbe8114a6603f742338 /src
parent7839311c2c203323609b89f589294778bb4e980f (diff)
downloadengrampa-0ff5527f5b057d26e75ea7c44ec4ea809c140cdc.tar.bz2
engrampa-0ff5527f5b057d26e75ea7c44ec4ea809c140cdc.tar.xz
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'src')
-rw-r--r--src/main.c4
-rw-r--r--src/server.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index a9e297d..292f4b1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -317,12 +317,16 @@ main (int argc, char **argv)
program_argv0 = argv[0];
+#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
context = g_option_context_new (N_("- Create and modify an archive"));
+#ifdef ENABLE_NLS
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE);
g_option_context_add_group (context, gtk_get_option_group (TRUE));
diff --git a/src/server.c b/src/server.c
index 1b906de..1ca6c4e 100644
--- a/src/server.c
+++ b/src/server.c
@@ -437,12 +437,16 @@ main (int argc, char *argv[])
GError *error = NULL;
guint owner_id;
+#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
context = g_option_context_new (N_("- Create and modify an archive"));
+#ifdef ENABLE_NLS
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
g_option_context_add_group (context, gtk_get_option_group (TRUE));
if (! g_option_context_parse (context, &argc, &argv, &error)) {