summaryrefslogtreecommitdiff
path: root/capplets/display
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-02-13 12:32:06 +0100
committerraveit65 <[email protected]>2021-02-16 14:07:47 +0100
commite50a1907e04a320bf9e054182b8dbeb4c52eb076 (patch)
treef0c11e26e732a7693149229c6d5fd7449149b35b /capplets/display
parent68306612ea6c7dc8635290950ce435a459dd4568 (diff)
downloadmate-control-center-e50a1907e04a320bf9e054182b8dbeb4c52eb076.tar.bz2
mate-control-center-e50a1907e04a320bf9e054182b8dbeb4c52eb076.tar.xz
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'capplets/display')
-rw-r--r--capplets/display/Makefile.am8
-rw-r--r--capplets/display/mate-display-properties-install-systemwide.c4
2 files changed, 12 insertions, 0 deletions
diff --git a/capplets/display/Makefile.am b/capplets/display/Makefile.am
index 7ca1180f..d25940b3 100644
--- a/capplets/display/Makefile.am
+++ b/capplets/display/Makefile.am
@@ -38,14 +38,22 @@ dist_polkit_policy_DATA = \
org.mate.randr.policy
%.policy: %.policy.in
+if USE_NLS
$(AM_V_GEN) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@
+else
+ $(AM_V_GEN) cp -f $< $@
+endif
desktopdir = $(datadir)/applications
Desktop_in_files = mate-display-properties.desktop.in
desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
$(desktop_DATA): $(Desktop_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
AM_CPPFLAGS = \
$(WARN_CFLAGS) \
diff --git a/capplets/display/mate-display-properties-install-systemwide.c b/capplets/display/mate-display-properties-install-systemwide.c
index 2d074eb8..993791c1 100644
--- a/capplets/display/mate-display-properties-install-systemwide.c
+++ b/capplets/display/mate-display-properties-install-systemwide.c
@@ -26,7 +26,9 @@
#include "config.h"
#include <errno.h>
+#ifdef ENABLE_NLS
#include <locale.h>
+#endif /* ENABLE_NLS */
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -138,10 +140,12 @@ main (int argc, char **argv)
int dest_fd;
char template[100];
+#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif /* ENABLE_NLS */
/* We only run as root */
uid = getuid ();