[sudo-workers] [PATCH] respect user LINGUAS when installing translations

Mike Frysinger vapier at gentoo.org
Tue Nov 15 00:54:51 EST 2011


# HG changeset patch
# User Mike Frysinger <vapier at gentoo.org>
# Date 1321336432 18000
# Node ID f99b940123faff4841696c373a73f15caa1499b8
# Parent  ecd3533cb7119007f93b8c38fe8b780f68abddc2
respect user LINGUAS when installing translations

diff -r ecd3533cb711 -r f99b940123fa Makefile.in
--- a/Makefile.in	Fri Oct 07 13:52:45 2011 -0400
+++ b/Makefile.in	Tue Nov 15 00:53:52 2011 -0500
@@ -226,6 +226,7 @@
 
 install-nls:
 	@if test "$(NLS)" = "enabled"; then \
+	    install_mos="$(LINGUAS)"; \
 	    cd $(top_srcdir); \
 	    for pot in $(POTFILES); do \
 		podir=`dirname $$pot`; \
@@ -233,6 +234,9 @@
 		echo $(ECHO_N) "Installing $$domain message catalogs:$(ECHO_C)"; \
 		for mo in $$podir/*.mo; do \
 		    lang=`basename $$mo .mo`; \
+		    if [ -n "$$install_mos" ]; then \
+			case " $$install_mos " in *" $$lang "*) :;; *) continue;; esac; \
+		    fi; \
 		    echo $(ECHO_N) " $$lang$(ECHO_C)"; \
 		    $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
 		    $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0644 $$mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$$domain.mo; \



More information about the sudo-workers mailing list