summaryrefslogtreecommitdiffstats
path: root/po/Makefile
diff options
context:
space:
mode:
authorDexter Morgan <dmorgan@mageia.org>2011-06-02 20:53:20 +0000
committerDexter Morgan <dmorgan@mageia.org>2011-06-02 20:53:20 +0000
commit702fc2aeaeac4279675036a59558e65780646b51 (patch)
tree13cca83b33be751584ede5d014eb2af4af7bb731 /po/Makefile
downloadcontrol-center-702fc2aeaeac4279675036a59558e65780646b51.tar
control-center-702fc2aeaeac4279675036a59558e65780646b51.tar.gz
control-center-702fc2aeaeac4279675036a59558e65780646b51.tar.bz2
control-center-702fc2aeaeac4279675036a59558e65780646b51.tar.xz
control-center-702fc2aeaeac4279675036a59558e65780646b51.zip
Branch for updates
Diffstat (limited to 'po/Makefile')
-rw-r--r--po/Makefile54
1 files changed, 54 insertions, 0 deletions
diff --git a/po/Makefile b/po/Makefile
new file mode 100644
index 00000000..0cdfa4c4
--- /dev/null
+++ b/po/Makefile
@@ -0,0 +1,54 @@
+# Installation directories
+top_srcdir=..
+localedir = $(DESTDIR)/usr/share/locale
+
+PGOAL = drakconf
+
+# perl files to search translatable strings in
+PL_FILES = ../contributors.pl ../control-center ../drakconsole ../drakxconf \
+ ../menus_launcher.pl ../print_launcher.pl ../lib/MDV/Control_Center.pm
+# C-like files to search translatable strings in
+#CFILES =
+
+POFILES = $(shell ls *.po)
+MOFILES = $(POFILES:%.po=%.mo)
+LANGS = $(POFILES:%.po=%)
+
+PREFIX = $(RPM_BUILD_ROOT)/usr
+DATADIR = $(PREFIX)/share
+LOCALEDIR=$(DATADIR)/locale
+
+GOALS = $(PGOAL).pot $(MOFILES)
+
+all: $(GOALS)
+
+install: all
+ for l in $(LANGS); do \
+ install -d $(localedir)/$$l/LC_MESSAGES; \
+ install -m 644 $$l.mo $(localedir)/$$l/LC_MESSAGES/$(PGOAL).mo; \
+ done
+
+clean:
+ rm -f *~ *.[oas] *.mo $(MOFILES) TAGS $(PL_CFILES)
+
+%.mo: %.po
+ msgfmt -o $@ $<
+
+POTFILES.in:
+ (cd .. ; /bin/ls data/*.desktop.in data/*.directory.in *.desktop.in) > POTFILES.in
+
+$(PGOAL).pot: $(PL_FILES) POTFILES.in
+ intltool-update --gettext-package desktopstuff --pot
+ perl_checker -q --generate-pot $(PGOAL)_tmp.pot $(PL_FILES)
+ msgcat --use-first $(PGOAL)_tmp.pot desktopstuff.pot > $@
+ rm -f desktopstuff.pot $(PGOAL)_tmp.pot
+
+update_n_merge: $(PGOAL).pot merge
+
+merge:
+ @for n in $(POFILES); do \
+ echo "Merging $$n"; \
+ msgmerge -C "$$n" "$$n" $(PGOAL).pot > "$$n"t; \
+ mv -f "$$n"t "$$n"; \
+ done
+