Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalwareutils.git;a=commitdiff;h=c351c04eaa72a0be4f9d34cb8f1f84dcd960ce86

commit c351c04eaa72a0be4f9d34cb8f1f84dcd960ce86
Author: Miklos Vajna <vmik...@frugalware.org>
Date:   Thu Feb 26 00:38:47 2009 +0100

Makefile.po.inc: handle utf8 po files

- just like in the setup, we translate them to the native charsets for
now

diff --git a/Makefile.po.inc b/Makefile.po.inc
index 1f6046e..9be6736 100644
--- a/Makefile.po.inc
+++ b/Makefile.po.inc
@@ -1,3 +1,5 @@
+LANG_CHARSETS = da_DK,ISO-8859-1 fr_FR,ISO-8859-1 hu_HU,ISO-8859-2
+
compile:
for i in $(wildcard *.po); do \
echo -n "$$i: "; \
@@ -43,6 +45,12 @@ prepare:
do \
if [ -e $(PO_DIR)/frugalwareutils/$$i/$(DOMAIN).po ]; then \
cp $(PO_DIR)/frugalwareutils/$$i/$(DOMAIN).po $$i.po; \
+                               charset=$$(echo $(LANG_CHARSETS)|sed 's/ 
/\n/g'|grep ^$$i|sed 's/.*,//'); \
+                               if [ -n "$$charset" ]; then \
+                                       iconv -f UTF-8 -t $$charset < $$i.po > 
$$i.new.po; \
+                                       sed "s/UTF-8/$$charset/" $$i.new.po > 
$$i.po; \
+                                       rm $$i.new.po; \
+                               fi; \
if ! msgfmt -c --statistics -o $$i.gmo $$i.po; then \
echo "ERROR: $(DOMAIN)/$$i.po would break your build!"; \
exit 1; \
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to