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 | |
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)
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | capplets/about-me/Makefile.am | 4 | ||||
-rw-r--r-- | capplets/accessibility/at-properties/Makefile.am | 4 | ||||
-rw-r--r-- | capplets/appearance/data/Makefile.am | 9 | ||||
-rw-r--r-- | capplets/appearance/mate-wp-xml.c | 8 | ||||
-rw-r--r-- | capplets/common/capplet-util.c | 6 | ||||
-rw-r--r-- | capplets/default-applications/Makefile.am | 4 | ||||
-rw-r--r-- | capplets/display/Makefile.am | 8 | ||||
-rw-r--r-- | capplets/display/mate-display-properties-install-systemwide.c | 4 | ||||
-rw-r--r-- | capplets/keybindings/Makefile.am | 9 | ||||
-rw-r--r-- | capplets/keyboard/Makefile.am | 4 | ||||
-rw-r--r-- | capplets/mouse/Makefile.am | 4 | ||||
-rw-r--r-- | capplets/network/Makefile.am | 4 | ||||
-rw-r--r-- | capplets/time-admin/data/Makefile.am | 7 | ||||
-rw-r--r-- | capplets/windows/Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | font-viewer/Makefile.am | 14 | ||||
-rw-r--r-- | font-viewer/font-thumbnailer.c | 9 | ||||
-rw-r--r-- | font-viewer/font-view.c | 2 | ||||
-rw-r--r-- | help/Makefile.am | 4 | ||||
-rw-r--r-- | shell/Makefile.am | 8 | ||||
-rw-r--r-- | shell/control-center.c | 2 | ||||
-rw-r--r-- | typing-break/drwright.c | 2 | ||||
-rw-r--r-- | typing-break/main.c | 4 |
24 files changed, 125 insertions, 23 deletions
diff --git a/Makefile.am b/Makefile.am index 49595bbf..6f093074 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,8 @@ -SUBDIRS = po libwindow-settings capplets font-viewer help man +if USE_NLS +PO_SUBDIR = po +endif + +SUBDIRS = $(PO_SUBDIR) libwindow-settings capplets font-viewer help man DIST_SUBDIRS = po libwindow-settings capplets font-viewer help libslab shell typing-break man if HAVE_LIBMATESLAB diff --git a/capplets/about-me/Makefile.am b/capplets/about-me/Makefile.am index 0af42ff5..47391e5a 100644 --- a/capplets/about-me/Makefile.am +++ b/capplets/about-me/Makefile.am @@ -31,7 +31,11 @@ mate_about_me_LDFLAGS = -export-dynamic desktopdir = $(datadir)/applications 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 include $(top_srcdir)/gla11y.mk diff --git a/capplets/accessibility/at-properties/Makefile.am b/capplets/accessibility/at-properties/Makefile.am index e8103621..3be5d9b0 100644 --- a/capplets/accessibility/at-properties/Makefile.am +++ b/capplets/accessibility/at-properties/Makefile.am @@ -18,7 +18,11 @@ Desktop_in_files = mate-at-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 pixmapdir = $(pkgdatadir)/pixmaps pixmap_DATA = \ 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); } diff --git a/capplets/common/capplet-util.c b/capplets/common/capplet-util.c index c78ab2d7..a5615a06 100644 --- a/capplets/common/capplet-util.c +++ b/capplets/common/capplet-util.c @@ -22,7 +22,7 @@ */ #ifdef HAVE_CONFIG_H -# include <config.h> +#include <config.h> #endif #include <ctype.h> @@ -242,10 +242,12 @@ capplet_init (GOptionContext *context, bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); -#endif +#endif /* ENABLE_NLS */ if (context) { +#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, &err)) { diff --git a/capplets/default-applications/Makefile.am b/capplets/default-applications/Makefile.am index 8aac00ff..4644cd44 100644 --- a/capplets/default-applications/Makefile.am +++ b/capplets/default-applications/Makefile.am @@ -23,7 +23,11 @@ desktopdir = $(datadir)/applications Desktop_in_files = mate-default-applications-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 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = mate-default-applications.pc 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 (); diff --git a/capplets/keybindings/Makefile.am b/capplets/keybindings/Makefile.am index f3e500c5..1c27004b 100644 --- a/capplets/keybindings/Makefile.am +++ b/capplets/keybindings/Makefile.am @@ -23,14 +23,23 @@ Desktop_in_files = mate-keybinding.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 xmldir = $(pkgdatadir)/keybindings xml_in_files = 00-multimedia-key.xml.in 01-desktop-key.xml.in xml_DATA = $(xml_in_files:.xml.in=.xml) %.xml: %.xml.in +if USE_NLS $(AM_V_GEN) GETTEXTDATADIR=$(top_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o $@ +else + $(AM_V_GEN) cp -f $< $@ +endif + pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = mate-keybindings.pc diff --git a/capplets/keyboard/Makefile.am b/capplets/keyboard/Makefile.am index 8c54ef8d..edd775c5 100644 --- a/capplets/keyboard/Makefile.am +++ b/capplets/keyboard/Makefile.am @@ -34,7 +34,11 @@ Desktop_in_files = mate-keyboard.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 mate-keyboard-properties-resources.h mate-keyboard-properties-resources.c: org.mate.mcc.keyboard.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/org.mate.mcc.keyboard.gresource.xml) $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name keyboard $< diff --git a/capplets/mouse/Makefile.am b/capplets/mouse/Makefile.am index dfeb69e1..0fee735e 100644 --- a/capplets/mouse/Makefile.am +++ b/capplets/mouse/Makefile.am @@ -21,7 +21,11 @@ Desktop_in_files = mate-settings-mouse.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 mate-mouse-properties-resources.h mate-mouse-properties-resources.c: org.mate.mcc.mouse.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/org.mate.mcc.mouse.gresource.xml) $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name mouse $< diff --git a/capplets/network/Makefile.am b/capplets/network/Makefile.am index e36a3dda..364d77e4 100644 --- a/capplets/network/Makefile.am +++ b/capplets/network/Makefile.am @@ -18,7 +18,11 @@ desktop_in_files = mate-network-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 mate-network-properties-resources.h mate-network-properties-resources.c: org.mate.mcc.network.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies --sourcedir $(srcdir) $(srcdir)/org.mate.mcc.network.gresource.xml) $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name network $< diff --git a/capplets/time-admin/data/Makefile.am b/capplets/time-admin/data/Makefile.am index f8d5c524..dbe2572e 100644 --- a/capplets/time-admin/data/Makefile.am +++ b/capplets/time-admin/data/Makefile.am @@ -28,10 +28,13 @@ desktop_in_files = mate-time-admin.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 CLEANFILES = $(desktop_DATA) -EXTRA_DIST = \ - $(desktop_in_files) +EXTRA_DIST = $(desktop_in_files) -include $(top_srcdir)/git.mk diff --git a/capplets/windows/Makefile.am b/capplets/windows/Makefile.am index 11777e7b..3104b4b8 100644 --- a/capplets/windows/Makefile.am +++ b/capplets/windows/Makefile.am @@ -20,7 +20,11 @@ mate-window-properties-resources.h mate-window-properties-resources.c: org.mate. $(AM_V_GEN) XMLLINT=$(XMLLINT) $(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir $(srcdir) --generate --c-name window_properties $< $(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/configure.ac b/configure.ac index a31daa4a..6b5d2803 100644 --- a/configure.ac +++ b/configure.ac @@ -23,8 +23,9 @@ AC_PATH_PROG([GLA11Y], [gla11y], [true]) YELP_HELP_INIT # Internationalization support -AM_GNU_GETTEXT_VERSION([0.19.8]) AM_GNU_GETTEXT([external]) +AM_GNU_GETTEXT_VERSION([0.19.8]) +AM_CONDITIONAL([USE_NLS], [test "x${USE_NLS}" = "xyes"]) GETTEXT_PACKAGE=mate-control-center AC_SUBST(GETTEXT_PACKAGE) @@ -316,12 +317,13 @@ Configure summary: ${PACKAGE_STRING} `echo $PACKAGE_STRING | sed "s/./=/g"` - Compiler: ${CC} - Compiler flags: ${CFLAGS} - Warning flags: ${WARN_CFLAGS} - Linker flags: ${LDFLAGS} + Compiler: ${CC} + Compiler flags: ${CFLAGS} + Warning flags: ${WARN_CFLAGS} + Linker flags: ${LDFLAGS} - Appindicator: ${enable_appindicator} - Libmate-slab: ${have_libmateslab} - Accountsservice: ${have_accountsservice} + Appindicator: ${enable_appindicator} + Libmate-slab: ${have_libmateslab} + Accountsservice: ${have_accountsservice} + Native Language support: ${USE_NLS} " diff --git a/font-viewer/Makefile.am b/font-viewer/Makefile.am index 9dbaee9c..d2ea43ca 100644 --- a/font-viewer/Makefile.am +++ b/font-viewer/Makefile.am @@ -35,7 +35,11 @@ desktopdir = $(datadir)/applications desktop_in_files = mate-font-viewer.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 install-data-local: install-desktop-database @@ -45,11 +49,13 @@ install-desktop-database: install-desktopDATA uninstall-local: rm -f $(DESTDIR)$(desktopdir)/mimeinfo.cache -CLEANFILES = $(desktop_DATA) \ - $(schemas_DATA) $(directory_DATA) +CLEANFILES = \ + $(desktop_DATA) \ + $(schemas_DATA) \ + $(directory_DATA) EXTRA_DIST = \ - $(thumbnailer_DATA) \ - $(desktop_in_files) + $(desktop_in_files) \ + $(thumbnailer_DATA) -include $(top_srcdir)/git.mk diff --git a/font-viewer/font-thumbnailer.c b/font-viewer/font-thumbnailer.c index 9e9d344c..6014f30d 100644 --- a/font-viewer/font-thumbnailer.c +++ b/font-viewer/font-thumbnailer.c @@ -21,11 +21,13 @@ */ #ifdef HAVE_CONFIG_H -# include <config.h> +#include <config.h> #endif #include <stdio.h> +#ifdef ENABLE_NLS #include <locale.h> +#endif /* ENABLE_NLS */ #include <ft2build.h> #include <math.h> #include FT_FREETYPE_H @@ -196,11 +198,12 @@ main (int argc, { NULL } }; +#ifdef ENABLE_NLS + setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); - - setlocale (LC_ALL, ""); +#endif /* ENABLE_NLS */ context = g_option_context_new (NULL); g_option_context_add_main_entries (context, options, GETTEXT_PACKAGE); diff --git a/font-viewer/font-view.c b/font-viewer/font-view.c index ad9c2078..8d40cdcd 100644 --- a/font-viewer/font-view.c +++ b/font-viewer/font-view.c @@ -944,9 +944,11 @@ main (int argc, GApplication *app; gint retval; +#ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ app = font_view_application_new (); retval = g_application_run (app, argc, argv); diff --git a/help/Makefile.am b/help/Makefile.am index 7e821d0a..e12ad56e 100644 --- a/help/Makefile.am +++ b/help/Makefile.am @@ -18,10 +18,14 @@ HELP_FILES = \ config-themes.xml \ legal.xml +if USE_NLS # Add linguas to be ignored, e.g. IGNORE_HELP_LINGUAS = ca de es fr IGNORE_HELP_LINGUAS = HELP_LINGUAS = $(if $(IGNORE_HELP_LINGUAS), \ $(filter-out $(IGNORE_HELP_LINGUAS),$(subst /,,$(dir $(wildcard */*.po)))), \ $(subst /,,$(dir $(wildcard */*.po))) ) +else +HELP_LINGUAS = +endif -include $(top_srcdir)/git.mk 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; diff --git a/typing-break/drwright.c b/typing-break/drwright.c index b4f1b368..b43cc631 100644 --- a/typing-break/drwright.c +++ b/typing-break/drwright.c @@ -869,7 +869,9 @@ drwright_new (void) dr->ui_manager = gtk_ui_manager_new (); action_group = gtk_action_group_new ("MenuActions"); +#ifdef ENABLE_NLS gtk_action_group_set_translation_domain (action_group, GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ gtk_action_group_add_actions (action_group, actions, G_N_ELEMENTS (actions), dr); gtk_ui_manager_insert_action_group (dr->ui_manager, action_group, 0); gtk_ui_manager_add_ui_from_string (dr->ui_manager, ui_description, -1, NULL); diff --git a/typing-break/main.c b/typing-break/main.c index 145d1c5d..c018f820 100644 --- a/typing-break/main.c +++ b/typing-break/main.c @@ -68,12 +68,16 @@ main (int argc, char *argv[]) GError *error = NULL; gboolean retval; +#ifdef ENABLE_NLS bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ option_context = g_option_context_new (NULL); +#ifdef ENABLE_NLS g_option_context_set_translation_domain (option_context, GETTEXT_PACKAGE); +#endif /* ENABLE_NLS */ g_option_context_add_main_entries (option_context, options, GETTEXT_PACKAGE); g_option_context_add_group (option_context, gtk_get_option_group (TRUE)); |