[or-cvs] r14539: Suggestions to Sebastian Hahn resulted in a nice little patc (check/trunk/i18n)

ioerror at seul.org ioerror at seul.org
Sat May 3 07:33:16 UTC 2008


Author: ioerror
Date: 2008-05-03 03:33:16 -0400 (Sat, 03 May 2008)
New Revision: 14539

Modified:
   check/trunk/i18n/Makefile
Log:
Suggestions to Sebastian Hahn resulted in a nice little patch.


Modified: check/trunk/i18n/Makefile
===================================================================
--- check/trunk/i18n/Makefile	2008-05-03 07:08:33 UTC (rev 14538)
+++ check/trunk/i18n/Makefile	2008-05-03 07:33:16 UTC (rev 14539)
@@ -1,24 +1,29 @@
-all: build install
+FILES=$(wildcard TorCheck_*.po)
+LANG=$(FILES:TorCheck_%.po=%)
 
+
+all: check build install
+
+check:
+	for file in $(FILES); do		                                        \
+		msgfmt -c $$file;                                                       \
+	done;
+
 build:
-	msgfmt -o TorCheck_de.mo TorCheck_de.po
-	msgfmt -o TorCheck_en.mo TorCheck_en.po
-	msgfmt -o TorCheck_es.mo TorCheck_es.po
-	msgfmt -o TorCheck_fa_IR.mo TorCheck_fa_IR.po
-	msgfmt -o TorCheck_ja.mo TorCheck_ja.po
-	msgfmt -o TorCheck_pl.mo TorCheck_pl.po
-	msgfmt -o TorCheck_pt_BR.mo TorCheck_pt_BR.po
-	msgfmt -o TorCheck_zh_CN.mo TorCheck_zh_CN.po
+	for lang in $(LANG); do			                                        \
+		msgfmt -o TorCheck_$$lang.mo TorCheck_$$lang.po;                        \
+	done;
 
 install:
-	mv TorCheck_de.mo /usr/share/locale/de/TorCheck.mo
-	mv TorCheck_en.mo /usr/share/locale/en/TorCheck.mo
-	mv TorCheck_es.mo /usr/share/locale/es/TorCheck_es
-	mv TorCheck_fa_IR.mo /usr/share/locale/fa_IR/TorCheck.mo
-	mv TorCheck_ja.mo /usr/share/locale/ja/TorCheck.mo
-	mv TorCheck_pl.mo /usr/share/locale/pl/TorCheck.mo
-	mv TorCheck_pt_BR.mo /usr/share/locale/pt_BR/TorCheck.mo
-	mv TorCheck_zh_CN.mo /usr/share/locale/zh_CN/TorCheck.mo
+	for lang in $(LANG); do                                                         \
+		mkdir -p /usr/share/locale/$$lang/LC_MESSAGES;                          \
+		mv TorCheck_$$lang.mo /usr/share/locale/$$lang/LC_MESSAGES/TorCheck.mo; \
+	done;
 
+uninstall:
+	for lang in $(LANG); do                                                         \
+		rm /usr/share/locale/$$lang/LC_MESSAGES/TorCheck.mo;                    \
+	done;
+
 clean:
 	rm TorCheck_*.mo



More information about the tor-commits mailing list