cs: generated html files
[enc.git] / Makefile.gen
CommitLineData
5b824516
TS
1# This source code is released in public domain.
2
3# Author Tomas Stary (2016) <tomichec@gmail.com>
4# Thanks for helpfull discussion to Thérèse Godefroy
5
6# this Makefile.gen is used to generate the translated html files from the
b121008a
TS
7# PO templates
8
5b824516
TS
9# see Makefile for generation of translation files (po, pot) and
10# extraction of translated strings from existing translation
11
b121008a
TS
12# usage: make -f Makefile.gen
13
14# flags for the po4a-getextize
5b824516
TS
15PO4A_FLAGS=-M utf-8 -f xhtml --keep 30 -o porefs=none \
16 -o 'untranslated=<script>' \
17 -o 'attributes=<meta>content'
b121008a
TS
18# list of source files for the translation
19SRC=confirmation.html\
20 index.html\
21 infographic.html\
22 mac.html\
23 next_steps.html\
24 windows.html\
25 workshops.html
26
27# list of languages that use the PO files (add yours if you migrate to PO)
28LANG=cs
29
30# default target
31all: $(foreach l,$(LANG),$(foreach f,$(SRC),$l/$f))
32
5b824516
TS
33
34# IMPORTANT: make sure your esd-lang.po is encoded in unix format (end
35# of line \n, not DOS \n\r), otherwise the po4a-translate complains
36# about strange lines.
37
38
b121008a
TS
39# recipes for the individual pages in each language
40# Czech
41cs/%.html: esd-cs.po $(foreach f,$(SRC),en/$f)
42 -po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@
43
44# French
45fr/%.html: esd-fr.po $(foreach f,$(SRC),en/$f)
46 -po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@
47
48# (copy the recipe for your language if you migrate to PO)
49