diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-05-25 00:33:13 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-05-25 00:33:13 +0200 |
commit | b3c367d9255bcc296b6740d1b437335d445b7253 (patch) | |
tree | 8a3baa3f11b6412bfa887f085216ffbc4c25e300 /build | |
parent | cf1be05a20c7abd7405f5953679f39be9d1fa015 (diff) |
Don’t mind me
Diffstat (limited to 'build')
-rwxr-xr-x | build | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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 |