diff options
author | Thomas Voss <mail@thomasvoss.com> | 2023-06-25 18:17:49 +0200 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2023-06-25 18:17:49 +0200 |
commit | 529114f2c769c359f2c0353631a183670d3dbebe (patch) | |
tree | b5090b6025a35ca0cba339ac0a4c0d31c88a6d8c /build | |
parent | 5eff8b30b149d46c0de928a9c8594986773244cf (diff) |
Sort names properly in other languages
Diffstat (limited to 'build')
-rwxr-xr-x | build | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -203,6 +203,7 @@ compile_for_lang() { " $nod/index.html gawk -v denom=$denom -v lang=$1 ' + @include "scripts/bilingual_sort.awk" @include "scripts/getcls.awk" BEGIN { FS = "\t" } @@ -220,6 +221,11 @@ compile_for_lang() { } END { + if (lang == "en") + asort(col) + else + asort(col, col, "bilingual_sort") + for (i = 1; i <= 3; i++) { if (i == 3 && denom == 5) { print "</tr>" @@ -234,6 +240,7 @@ compile_for_lang() { print "<tr class=new-design><th colspan=12>"sig"</th></tr>" c = 0 + for (j = 1; j <= length(col); j++) { split(col[j][1], s, " ") if (s[i] == "/") @@ -248,7 +255,8 @@ compile_for_lang() { if (c % 4 == 3 && j < length(col)) print "</tr>" - c++ + if (c % 4 != 3 || j != length(col)) + c++ } if ((c - 1) % 4 != 3) print "</tr>" @@ -263,6 +271,7 @@ compile_for_lang() { [ $denom -eq 500 ] && continue gawk -v denom=$denom -v lang=$1 ' + @include "scripts/bilingual_sort.awk" @include "scripts/getcls.awk" BEGIN { FS = "\t" } @@ -280,6 +289,11 @@ compile_for_lang() { } END { + if (lang == "en") + asort(col) + else + asort(col, col, "bilingual_sort") + for (i = 1; i <= 2; i++) { if (i == 1) sig = "Mario Draghi" @@ -288,6 +302,7 @@ compile_for_lang() { print "<tr class=new-design><th colspan=12>"sig"</th></tr>" c = 0 + for (j = 1; j <= length(col); j++) { split(col[j][1], s, " ") if (s[i] == "/") @@ -302,7 +317,8 @@ compile_for_lang() { if (c % 4 == 3 && j < length(col)) print "</tr>" - c++ + if (c % 4 != 3 || j != length(col)) + c++ } if ((c - 1) % 4 != 3) print "</tr>" |