From: Thérèse Godefroy
Date: Sun, 15 Aug 2021 12:30:09 +0000 (+0200)
Subject: Makefile.gen: fix links to lang-specific css; match gl recipe with es.
X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cf27916fd1a60ddb0d32d2b0d6aa3574e439213d;p=enc.git
Makefile.gen: fix links to lang-specific css; match gl recipe with es.
---
diff --git a/Makefile.gen b/Makefile.gen
index 82f77516..d7483758 100644
--- a/Makefile.gen
+++ b/Makefile.gen
@@ -60,8 +60,6 @@ endef
# See Persian recipe as an example.
# cs - Czech
-# sed -i 's|English - v4.0|ÄeÅ¡tina - v4.0\
-# English - v4.0|' $@
cs/%.html: esd-cs.po $(foreach f,$(SRC),en/$f)
-po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@
sed -i 's|img/en/|img/cs/|g' $@
@@ -70,7 +68,7 @@ cs/%.html: esd-cs.po $(foreach f,$(SRC),en/$f)
es/%.html: esd-es.po $(foreach f,$(SRC),en/$f)
-po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@
sed -i '/\/css\/main.css/a\
- ' $@
+ ' $@
sed -i 's,static/img/en/\([^/]\+.png\),static/img/es/\1,g' $@
sed -i 's,static/img/en\(/screenshots/section.\+.png\),static/img/es\1,g' $@
sed -i 's,static/img/en\(/screenshots/step1a.\+.png\),static/img/es\1,g' $@
@@ -79,22 +77,24 @@ es/%.html: esd-es.po $(foreach f,$(SRC),en/$f)
gl/%.html: esd-gl.po $(foreach f,$(SRC),en/$f)
-po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@
sed -i '/\/css\/main.css/a\
- ' $@
- sed -i 's,static/img/en,static/img/gl,g' $@
+ ' $@
+ sed -i 's,static/img/en/\([^/]\+.png\),static/img/es/\1,g' $@
+ sed -i 's,static/img/en\(/screenshots/section.\+.png\),static/img/es\1,g' $@
+ sed -i 's,static/img/en\(/screenshots/step1a.\+.png\),static/img/es\1,g' $@
# de - German
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\
- ' $@
+ ' $@
# fa - Persian
fa/%.html: esd-fa.po $(foreach f,$(SRC),en/$f)
-po4a-translate $(PO4A_FLAGS) -m en/$*.html -p $< -l $@
sed -i 's|' $@
+ ' $@
# ja - Japanese
ja/%.html: esd-ja.po $(foreach f,$(SRC),en/$f)
@@ -115,7 +115,7 @@ zh-hans/%.html: esd-zh-hans.po $(foreach f,$(SRC),en/$f)
-po4a-translate $(PO4A_FLAGS) --keep 0 -m en/$*.html -p $< -l $@
sed -i 's|img/en/|img/zh-hans/|g' $@
sed -i '/\/css\/main.css/a\
- ' $@
+ ' $@
# tr - Turkish
tr/%.html: esd-tr.po $(foreach f,$(SRC),en/$f)
@@ -127,6 +127,4 @@ tr/%.html: esd-tr.po $(foreach f,$(SRC),en/$f)
# fr - French
fr/%.html: esd-fr.po $(foreach f,$(SRC),en/$f)
-po4a-translate $(PO4A_FLAGS) --keep 0 -m en/$*.html -p $< -l $@
- sed -i '/\/css\/main.css/a\
- ' $@
sed -i 's|img/en/|img/fr/|g' $@