aboutsummaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-08-12 05:57:01 +0000
committerFlorent Villard <warly@mandriva.com>2003-08-12 05:57:01 +0000
commiteb809c2ca74342a546307a653a8ae25176d018ce (patch)
tree4e68934c01c342fefeca16dc14af59c8256da860 /po/Makefile
parent2e0e40a79deb03f96a1ee48f6e0ff15b29d20403 (diff)
downloadbootsplash-eb809c2ca74342a546307a653a8ae25176d018ce.tar
bootsplash-eb809c2ca74342a546307a653a8ae25176d018ce.tar.gz
bootsplash-eb809c2ca74342a546307a653a8ae25176d018ce.tar.bz2
bootsplash-eb809c2ca74342a546307a653a8ae25176d018ce.tar.xz
bootsplash-eb809c2ca74342a546307a653a8ae25176d018ce.zip
add po files
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile75
1 files changed, 75 insertions, 0 deletions
diff --git a/po/Makefile b/po/Makefile
new file mode 100644
index 0000000..a62d582
--- /dev/null
+++ b/po/Makefile
@@ -0,0 +1,75 @@
+INSTALL= /usr/bin/install -c
+INSTALL_PROGRAM= ${INSTALL}
+INSTALL_DATA= ${INSTALL} -m 644
+INSTALLNLSDIR=/usr/share/locale
+
+MSGMERGE = msgmerge
+
+NLSPACKAGE = bootsplash
+
+CATALOGS = $(shell ls *.po)
+FMTCATALOGS = $(patsubst %.po,%.mo,$(CATALOGS))
+
+all: $(FMTCATALOGS)
+
+pot $(NLSPACKAGE).pot:
+ rm -rf tmp
+ mkdir tmp
+ cp ../scripts/splash.sh tmp
+ ./gprintify.py tmp/*
+ ./xgettext_sh.py tmp/* > $(NLSPACKAGE).po
+ if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
+ rm -f $(NLSPACKAGE).po; \
+ else \
+ mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
+ fi
+ rm -rf tmp
+
+update-po: Makefile
+ $(MAKE) $(NLSPACKAGE).pot
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ lang=`basename $$cat .po`; \
+ if $(MSGMERGE) $$lang.po $(NLSPACKAGE).pot > $$lang.pot ; then \
+ mv -f $$lang.pot $$lang.po ; \
+ echo "$(MSGMERGE) of $$lang succeeded" ; \
+ else \
+ echo "$(MSGMERGE) of $$lang failed" ; \
+ rm -f $$lang.pot ; \
+ fi \
+ done
+
+refresh-po: Makefile
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ lang=`echo $$cat | sed 's/.po//'`; \
+ if $(MSGMERGE) $$lang.po $(NLSPACKAGE).pot > $$lang.pot ; then \
+ mv -f $$lang.pot $$lang.po ; \
+ echo "$(MSGMERGE) of $$lang succeeded" ; \
+ else \
+ echo "$(MSGMERGE) of $$lang failed" ; \
+ rm -f $$lang.pot ; \
+ fi \
+ done
+
+clean:
+ rm -f *mo *.pyc
+
+distclean: clean
+ rm -f .depend Makefile
+
+depend:
+
+install: all
+ mkdir -p $(PREFIX)/$(INSTALLNLSDIR)
+ for n in $(CATALOGS); do \
+ l=`basename $$n .po`; \
+ mo=$$l.mo; \
+ $(INSTALL) -m 755 -d $(prefix)/$(INSTALLNLSDIR)/$$l; \
+ $(INSTALL) -m 755 -d $(prefix)/$(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
+ $(INSTALL) -m 644 $$mo \
+ $(prefix)/$(INSTALLNLSDIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \
+ done
+
+%.mo: %.po
+ sed 's/$[a-zA-Z0-9_{}]*/%s/g' < $< | msgfmt -o $@ -