en: replace Pump.io with Mastodon throughout the site.
[enc.git] / Makefile.gen
index 72891ceb9ab2be8635c8a2d76fd3239994d64cc7..be8dc4ba5a9bfad56d5e27a247c4d8a253969b15 100644 (file)
@@ -41,9 +41,9 @@ SRC=confirmation.html\
 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
 
 
@@ -80,6 +80,8 @@ es/%.html: esd-es.po $(foreach f,$(SRC),en/$f)
 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)
@@ -108,3 +110,12 @@ zh-hans/%.html: esd-zh-hans.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"' $@
+