# this Makefile is used to generate the translated html files from the
# PO templates

# usage: make -f Makefile.gen

# flags for the po4a-getextize
PO4A_FLAGS=-M utf-8 -f xhtml
# list of source files for the translation
SRC=confirmation.html\
	index.html\
	infographic.html\
	mac.html\
	next_steps.html\
	windows.html\
	workshops.html

# list of languages that use the PO files (add yours if you migrate to PO)
LANG=cs

# default target
all: $(foreach l,$(LANG),$(foreach f,$(SRC),$l/$f))

# recipes for the individual pages in each language
# Czech
cs/%.html: esd-cs.po $(foreach f,$(SRC),en/$f)
	-po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@

# French
fr/%.html: esd-fr.po $(foreach f,$(SRC),en/$f)
	-po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@

#  (copy the recipe for your language if you migrate to PO)

