diff options
author | rbuj <[email protected]> | 2021-02-07 21:49:22 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-02-08 21:23:34 +0100 |
commit | a8d98cb5572363804ffabd771055959826b32f99 (patch) | |
tree | a571b63a981e000fddb80ceac1013cee91bfec66 /sendto | |
parent | 546660e4c8668f6f94c5d672499d253f70e4fa78 (diff) | |
download | caja-extensions-a8d98cb5572363804ffabd771055959826b32f99.tar.bz2 caja-extensions-a8d98cb5572363804ffabd771055959826b32f99.tar.xz |
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'sendto')
-rw-r--r-- | sendto/Makefile.am | 4 | ||||
-rw-r--r-- | sendto/caja-sendto-command.c | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/sendto/Makefile.am b/sendto/Makefile.am index c964773..a1e9bb0 100644 --- a/sendto/Makefile.am +++ b/sendto/Makefile.am @@ -83,7 +83,11 @@ extensiondir = $(datadir)/caja/extensions extension_in_files = libcaja-sendto.caja-extension.desktop.in extension_DATA = $(extension_in_files:.caja-extension.desktop.in=.caja-extension) $(extension_DATA): $(extension_in_files) +if USE_NLS $(AM_V_GEN) $(MSGFMT) --desktop --keyword= --keyword=Copyright --keyword=Name --keyword=Description --template $< -d $(top_srcdir)/po -o $@ +else + $(AM_V_GEN) cp $< $@ +endif EXTRA_DIST = \ $(man_MANS) \ diff --git a/sendto/caja-sendto-command.c b/sendto/caja-sendto-command.c index 1574e7e..e7d3698 100644 --- a/sendto/caja-sendto-command.c +++ b/sendto/caja-sendto-command.c @@ -445,9 +445,13 @@ set_model_for_options_combobox (NS_ui *ui) GTK_ICON_LOOKUP_USE_BUILTIN, NULL); gtk_list_store_append (model, &iter); gtk_list_store_set (model, &iter, - COLUMN_ICON, pixbuf, - COLUMN_DESCRIPTION, dgettext(p->info->gettext_package, p->info->description), - -1); + COLUMN_ICON, pixbuf, +#ifdef ENABLE_NLS + COLUMN_DESCRIPTION, g_dgettext (p->info->gettext_package, p->info->description), +#else + COLUMN_DESCRIPTION, p->info->description, +#endif /* ENABLE_NLS */ + -1); if (last_used != NULL && !strcmp(last_used, p->info->id)) { option = i; last_used_support_dirs = (p->info->capabilities & CAJA_CAPS_SEND_DIRECTORIES); @@ -799,9 +803,11 @@ int main (int argc, char **argv) GOptionContext *context; GError *error = NULL; +#ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ context = g_option_context_new (""); g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE); |