diff options
author | rbuj <[email protected]> | 2021-02-13 12:32:06 +0100 |
---|---|---|
committer | raveit65 <[email protected]> | 2021-02-16 14:07:47 +0100 |
commit | e50a1907e04a320bf9e054182b8dbeb4c52eb076 (patch) | |
tree | f0c11e26e732a7693149229c6d5fd7449149b35b /capplets/appearance | |
parent | 68306612ea6c7dc8635290950ce435a459dd4568 (diff) | |
download | mate-control-center-e50a1907e04a320bf9e054182b8dbeb4c52eb076.tar.bz2 mate-control-center-e50a1907e04a320bf9e054182b8dbeb4c52eb076.tar.xz |
build: allow users to disable gettext support (--disable-nls)
Diffstat (limited to 'capplets/appearance')
-rw-r--r-- | capplets/appearance/data/Makefile.am | 9 | ||||
-rw-r--r-- | capplets/appearance/mate-wp-xml.c | 8 |
2 files changed, 15 insertions, 2 deletions
diff --git a/capplets/appearance/data/Makefile.am b/capplets/appearance/data/Makefile.am index bbb1919e..68884643 100644 --- a/capplets/appearance/data/Makefile.am +++ b/capplets/appearance/data/Makefile.am @@ -23,16 +23,23 @@ desktop_in_files = \ mate-theme-installer.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) %.desktop: %.desktop.in +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 xml_in_files = \ mate-theme-package.xml.in mimedir = $(datadir)/mime/packages mime_DATA = $(xml_in_files:.xml.in=.xml) - $(mime_DATA): $(xml_in_files) +if USE_NLS $(AM_V_GEN) GETTEXTDATADIR=$(top_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ +else + $(AM_V_GEN) cp -f $< $@ +endif install-data-hook: if ENABLE_UPDATE_MIMEDB diff --git a/capplets/appearance/mate-wp-xml.c b/capplets/appearance/mate-wp-xml.c index fb8ce905..48bc708e 100644 --- a/capplets/appearance/mate-wp-xml.c +++ b/capplets/appearance/mate-wp-xml.c @@ -124,10 +124,12 @@ static void mate_wp_xml_load_xml(AppearanceData* data, const char* filename) xmlNode* list; xmlNode* wpa; xmlChar* nodelang; +#ifdef ENABLE_NLS const char* const* syslangs; + gint i; +#endif /* ENABLE_NLS */ GdkRGBA color1; GdkRGBA color2; - gint i; wplist = xmlParseFile(filename); @@ -136,7 +138,9 @@ static void mate_wp_xml_load_xml(AppearanceData* data, const char* filename) return; } +#ifdef ENABLE_NLS syslangs = g_get_language_names(); +#endif /* ENABLE_NLS */ root = xmlDocGetRootElement(wplist); @@ -193,6 +197,7 @@ static void mate_wp_xml_load_xml(AppearanceData* data, const char* filename) { wp->name = g_strdup (g_strstrip ((char *)wpa->last->content)); } +#ifdef ENABLE_NLS else { for (i = 0; syslangs[i] != NULL; i++) @@ -205,6 +210,7 @@ static void mate_wp_xml_load_xml(AppearanceData* data, const char* filename) } } } +#endif /* ENABLE_NLS */ xmlFree (nodelang); } |