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) --- shell/Makefile.am | 8 ++++++++ shell/control-center.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/Makefile.am b/shell/Makefile.am index 77d1c1ac..d3e4d8bd 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -21,13 +21,21 @@ sysdir = $(datadir)/applications sys_in_files = matecc.desktop.in sys_DATA = $(sys_in_files:.desktop.in=.desktop) $(sys_DATA): $(sys_in_files) +if USE_NLS $(AM_V_GEN) $(MSGFMT) --desktop --keyword= --keyword=Name --keyword=Comment --keyword=Keywords --template $< -d $(top_srcdir)/po -o $@ +else + $(AM_V_GEN) sed '/^# Translators/d' < $< > $@ +endif directorydir = $(datadir)/desktop-directories directory_in_files = matecc.directory.desktop.in directory_DATA = $(directory_in_files:.directory.desktop.in=.directory) $(directory_DATA): $(directory_in_files) +if USE_NLS $(AM_V_GEN) $(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ +else + $(AM_V_GEN) sed '/^# Translators/d' < $< > $@ +endif menudir = $(sysconfdir)/xdg/menus menu_DATA = matecc.menu diff --git a/shell/control-center.c b/shell/control-center.c index 5cf0795e..a4b86880 100644 --- a/shell/control-center.c +++ b/shell/control-center.c @@ -169,7 +169,7 @@ int main(int argc, char* argv[]) bindtextdomain(GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); -#endif +#endif /* ENABLE_NLS */ error = NULL; -- cgit v1.2.1