summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2007-11-06 14:04:41 +0100
committerJonas Smedegaard <dr@jones.dk>2007-11-06 14:04:41 +0100
commit60a19d884ff7aee15f2cd641182283da9c00c396 (patch)
tree064f5d9a12fbbb5059bd422d2e0dd39c8274a91b /Makefile
parent4b43f104988f6fdff8ddee2b13ce2ba066443559 (diff)
Fix init'ing new locales from master if po-init-fromlocale is empty.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4fa08a9..1cee0d2 100644
--- a/Makefile
+++ b/Makefile
@@ -85,7 +85,7 @@ $(foreach source,$(SOURCES),$(foreach module,$($(source)_POMODULES),$(eval $(cal
-# 1:moduledir 2:locale 3:mastermodule 4:source
+# 1:moduledir 2:locale 3:mastermodule 4:source 5:originmodule
define INITPO_template
fileformat = $(if $(filter templates,$(3)),htmltemplate,text)
filetype = $(if $(filter templates,$(3)),tmpl,mdwn)
@@ -95,18 +95,18 @@ $(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)) ) \
+ ( cd "$(3)" && po4a-gettextize -M UTF-8 -L UTF-8 -f $$(fileformat) $$(patsubst %,-m %,$$($(3)_L10NFILES)) $$(patsubst %,-l $$(CURDIR)/$(5)/%,$($(3)_L10NFILES)) ) \
| grep -v '#, fuzzy' \
> $$@
# FIXME: needs to depend also on its masterfile
$$(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)/$$@
+ 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 $$(patsubst $(1)/%,$(CURDIR)/$(5)/%,$$@)
.PHONY: $(1)
endef
-$(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source))))))
+$(foreach source,$(SOURCES),$(foreach module,$(po-init-modules),$(foreach locale,$(po-init-locales),$(eval $(call INITPO_template,$(l10ndir),$(locale),$(module),$(source),$(if $(po-init-fromlocale),$(module)_l10n/$(po-init-fromlocale),$(module)))))))