diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-11 19:00:49 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-11 19:00:49 +0000 |
commit | 5e985a4fab6cc4f3587f1236ebf07054f147b0ff (patch) | |
tree | 1894a2139d6c15d38eed164a4d9c0a423a2300d0 /po/Makefile | |
parent | e58a7d3a40495d504161c8d2066251e3e42b9659 (diff) | |
download | drakguard-5e985a4fab6cc4f3587f1236ebf07054f147b0ff.tar drakguard-5e985a4fab6cc4f3587f1236ebf07054f147b0ff.tar.gz drakguard-5e985a4fab6cc4f3587f1236ebf07054f147b0ff.tar.bz2 drakguard-5e985a4fab6cc4f3587f1236ebf07054f147b0ff.tar.xz drakguard-5e985a4fab6cc4f3587f1236ebf07054f147b0ff.zip |
add initial i18n bits
Diffstat (limited to 'po/Makefile')
-rw-r--r-- | po/Makefile | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/po/Makefile b/po/Makefile new file mode 100644 index 0000000..6784dd3 --- /dev/null +++ b/po/Makefile @@ -0,0 +1,41 @@ +# Installation directories +localedir = $(DESTDIR)/usr/share/locale + +PGOAL = drakguard + +# perl files to search translatable strings in +PL_FILES:= ../bin/* + +POFILES = $(wildcard *.po) +MOFILES = $(POFILES:%.po=%.mo) +POTFILE= $(PGOAL).pot +LANGS = $(POFILES:%.po=%) + +PREFIX = $(RPM_BUILD_ROOT)/usr +DATADIR = $(PREFIX)/share +LOCALEDIR=$(DATADIR)/locale + +all: $(MOFILES) + +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 $(POTFILE) $(MOFILES) TAGS + +%.mo: %.po + msgfmt -o $@ $< + +$(POTFILE): $(PL_FILES) + perl_checker -q --generate-pot $@ $(PL_FILES) + +merge: $(POTFILE) + @for n in $(POFILES); do \ + echo "Merging $$n"; \ + msgmerge -C "$$n" "$$n" $(PGOAL).pot > "$$n"t; \ + mv -f "$$n"t "$$n"; \ + done + |