/dev/qulogic/ckeditor: 4964f3afcf30: Obey LINGUAS file/environme...

Elliott Sales de Andrade qulogic at pidgin.im
Fri Aug 9 03:13:29 EDT 2013


Changeset: 4964f3afcf3075c60d75c4c003dfe41d5aab05e7
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2013-08-06 02:44 -0400
Branch:	 default
URL: https://hg.pidgin.im/dev/qulogic/ckeditor/rev/4964f3afcf30

Description:

Obey LINGUAS file/environment variable when installing CKEditor translations.

diffstat:

 pidgin/ckeditor/Makefile.am |  77 ++++++--------------------------------------
 1 files changed, 11 insertions(+), 66 deletions(-)

diffs (88 lines):

diff --git a/pidgin/ckeditor/Makefile.am b/pidgin/ckeditor/Makefile.am
--- a/pidgin/ckeditor/Makefile.am
+++ b/pidgin/ckeditor/Makefile.am
@@ -29,73 +29,18 @@ nobase_ckeditor_DATA += \
 	skins/pidgin/images/hidpi/lock.png \
 	skins/pidgin/images/hidpi/refresh.png
 
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(top_srcdir)/po/LINGUAS; then grep -v "^\#" $(top_srcdir)/po/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(top_srcdir)/po/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+JSFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "lang/$$lang.js " | tr '[:upper:]@_' '[:lower:]--'; done)
+
 ckeditorlangdir = $(ckeditordir)/lang
-ckeditorlang_DATA = \
-	lang/af.js \
-	lang/ar.js \
-	lang/bg.js \
-	lang/bn.js \
-	lang/bs.js \
-	lang/ca.js \
-	lang/cs.js \
-	lang/cy.js \
-	lang/da.js \
-	lang/de.js \
-	lang/el.js \
-	lang/en-au.js \
-	lang/en-ca.js \
-	lang/en-gb.js \
-	lang/en.js \
-	lang/eo.js \
-	lang/es.js \
-	lang/et.js \
-	lang/eu.js \
-	lang/fa.js \
-	lang/fi.js \
-	lang/fo.js \
-	lang/fr-ca.js \
-	lang/fr.js \
-	lang/gl.js \
-	lang/gu.js \
-	lang/he.js \
-	lang/hi.js \
-	lang/hr.js \
-	lang/hu.js \
-	lang/id.js \
-	lang/is.js \
-	lang/it.js \
-	lang/ja.js \
-	lang/ka.js \
-	lang/km.js \
-	lang/ko.js \
-	lang/ku.js \
-	lang/lt.js \
-	lang/lv.js \
-	lang/mk.js \
-	lang/mn.js \
-	lang/ms.js \
-	lang/nb.js \
-	lang/nl.js \
-	lang/no.js \
-	lang/pl.js \
-	lang/pt-br.js \
-	lang/pt.js \
-	lang/ro.js \
-	lang/ru.js \
-	lang/si.js \
-	lang/sk.js \
-	lang/sl.js \
-	lang/sq.js \
-	lang/sr.js \
-	lang/sr-latn.js \
-	lang/sv.js \
-	lang/th.js \
-	lang/tr.js \
-	lang/ug.js \
-	lang/uk.js \
-	lang/vi.js \
-	lang/zh-cn.js \
-	lang/zh.js
+ckeditorlang_DATA = $(shell ls $(JSFILES) 2>/dev/null)
 
 EXTRA_DIST = \
 	$(ckeditormain_DATA) \



More information about the Commits mailing list