diff options
author | Jonas Smedegaard <dr@jones.dk> | 2007-11-06 13:01:04 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2007-11-06 13:01:04 +0100 |
commit | bb366f13cd98e6f005106e1ad7a73bbaaff573a8 (patch) | |
tree | c2921ca749dcb4cfb6d4132c4badbe771593e2c3 /Makefile | |
parent | e2341646973fc68b3be40bd6ae4e978feb46f2ea (diff) |
Separate normal PO routines from initializing new locales in Makefile.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -86,12 +86,14 @@ $(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(eval $(cal # 1:moduledir 2:locale 3:mastermodule 4:source -define PO_template +define INITPO_template fileformat = $(if $(filter templates,$(3)),htmltemplate,text) filetype = $(if $(filter templates,$(3)),tmpl,mdwn) ALL_POFILES += $(podir)/$(3).$(2).po -ifeq ($(translation_mode),init) +$(4)_POMODULES := $(filter-out $(3),$$($(4)_POMODULES)) +$(4)_POLOCALES := $(filter-out $(2),$$($(4)_POLOCALES)) + $(podir)/$(3).$(2).po: $(1) $(3) ( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(1)/%,$($(3)_L10NFILES)) ) \ | grep -v '#, fuzzy' \ @@ -101,18 +103,29 @@ $(podir)/$(3).$(2).po: $(1) $(3) $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 0 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ -else + +.PHONY: $(1) +endef +$(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source)))))) + + + +# 1:moduledir 2:locale 3:mastermodule 4:source +define PO_template +fileformat = $(if $(filter templates,$(3)),htmltemplate,text) +filetype = $(if $(filter templates,$(3)),tmpl,mdwn) +ALL_POFILES += $(podir)/$(3).$(2).po + $(podir)/$(3).$(2).po: $(3) cd "$(3)" && po4a-updatepo -M UTF-8 -f $(fileformat) $(patsubst %,-m %,$$($(3)_L10NFILES)) -p $(CURDIR)/$$@ $$(patsubst %,$(1)/%,$$($(3)_L10NFILES)): $(podir)/$(3).$(2).po mkdir -p $(1) cd "$(1)" && po4a-translate -M UTF-8 -L UTF-8 -k 100 -f $(fileformat) $$(patsubst $(1)/%,-m $(CURDIR)/$(3)/%,$$@) -p $(CURDIR)/$(podir)/$(3).$(locale).po -l $(CURDIR)/$$@ -endif .PHONY: $(1) endef -$(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_LOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) +$(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(foreach locale,$($(source)_POLOCALES),$(eval $(call PO_template,$(l10ndir),$(locale),$(module),$(source)))))) |