all: $(foreach l,$(LANG),$(foreach f,$(SRC),$l/$f))
-## Function to make this work with Gnu and BSD sed
+## Function to select gsed if sed is not GNU sed but BSD sed
define sedi
- sed --version >/dev/null 2>&1 && sed -i || sed -i ""
+ sed --version >/dev/null 2>&1 && sed -i || gsed -i
endef
de/%.html: esd-de.po $(foreach f,$(SRC),en/$f)
-po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@
$(sedi) '{s|img/en/|img/de/|g;}' $@
+ $(sedi) '/\/css\/main.css/a\
+ <link rel="stylesheet" href="//static.fsf.org/nosvn/enc-dev0/css/main.de.css" />' $@
# fa - Persian
fa/%.html: esd-fa.po $(foreach f,$(SRC),en/$f)
sed -i 's|img/en/|img/zh-hans/|g' $@
sed -i '/\/css\/main.css/a\
<link rel="stylesheet" href="//static.fsf.org/nosvn/enc-dev0/css/main.zh-hans.css" />' $@
+
+# tr - Turkish
+tr/%.html: esd-tr.po $(foreach f,$(SRC),en/$f)
+ -po4a-translate $(PO4A_FLAGS) --keep 0 -m en/$*.html -p $< -l $@
+ sed -i 's|img/en/|img/tr/|g' $@
+ sed -i 's|img/tr/screenshots/workshop-section1|img/en/screenshots/workshop-section1|' $@
+ sed -i '/alt="Bağış"/ i\
+ style="width:160px"' $@
+