From 529114f2c769c359f2c0353631a183670d3dbebe Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 25 Jun 2023 18:17:49 +0200 Subject: Sort names properly in other languages --- build | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'build') diff --git a/build b/build index a9d0044..66cf511 100755 --- a/build +++ b/build @@ -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 "" @@ -234,6 +240,7 @@ compile_for_lang() { print ""sig"" 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 "" - c++ + if (c % 4 != 3 || j != length(col)) + c++ } if ((c - 1) % 4 != 3) print "" @@ -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 ""sig"" 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 "" - c++ + if (c % 4 != 3 || j != length(col)) + c++ } if ((c - 1) % 4 != 3) print "" -- cgit v1.2.3