summaryrefslogtreecommitdiffhomepage
path: root/build
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-05-25 00:33:13 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-05-25 00:33:13 +0200
commitb3c367d9255bcc296b6740d1b437335d445b7253 (patch)
tree8a3baa3f11b6412bfa887f085216ffbc4c25e300 /build
parentcf1be05a20c7abd7405f5953679f39be9d1fa015 (diff)
Don’t mind me
Diffstat (limited to 'build')
-rwxr-xr-xbuild11
1 files changed, 8 insertions, 3 deletions
diff --git a/build b/build
index 02f7be5..669701b 100755
--- a/build
+++ b/build
@@ -64,9 +64,14 @@ compile_for_lang() {
sed -Ei '
/<nav>/,\|</nav>|s|<a href=/../euro/tn>([^<]*)</a>|<div class=selected>\1</div>|
' $nod/index.html
- gawk -v denom=$denom '
+ gawk -v denom=$denom -v lang=$1 '
@include "scripts/getcls.awk"
+ function fmt(n)
+ {
+ return lang ~ /(en|ga|mt|nl)/ ? "€" n : n " €"
+ }
+
$1 == "TN" {
i++
col[i][0] = $2
@@ -77,8 +82,8 @@ compile_for_lang() {
END {
for (i = 1; i <= length(col); i++) {
printf \
- "<tr><td class=missing>€%d</td><td class=%s>%s</td></tr>\n",\
- col[i][0], getcls(col[i][2]), col[i][1]
+ "<tr><td class=missing>%s</td><td class=%s>%s</td></tr>\n",
+ fmt(col[i][0]), getcls(col[i][2]), col[i][1]
}
}
' data/notes | xfsub '<!-- TABLE-BODY -->' - $nod/index.html