diff options
author | EuAndreh <eu@euandre.org> | 2023-04-10 14:12:12 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-04-10 14:12:37 -0300 |
commit | fc794694b1d83d6856b36ea08df69c2a0861d030 (patch) | |
tree | 752cb386042281cfcc72836623af733c3253bff2 /v2/src/bin/i18n | |
parent | v2: Support translated alternates in <nav> (diff) | |
download | euandre.org-fc794694b1d83d6856b36ea08df69c2a0861d030.tar.gz euandre.org-fc794694b1d83d6856b36ea08df69c2a0861d030.tar.xz |
v2: <link /> to translated version in <head />
Diffstat (limited to 'v2/src/bin/i18n')
-rwxr-xr-x | v2/src/bin/i18n | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/v2/src/bin/i18n b/v2/src/bin/i18n index 76e07e7..30404eb 100755 --- a/v2/src/bin/i18n +++ b/v2/src/bin/i18n @@ -75,11 +75,21 @@ awk ' END { for (k1 in idx) { + split(idx[k1][0], b, /:/) + base = b[2] ".i18n" for (k2 in idx[k1]) { - split(idx[k1][k2], a, /:/) - file = a[2] ".i18n" - for (k3 in idx[k1]) { - print idx[k1][k3] > file + split(idx[k1][k2], f, /:/) + file = f[2] ".i18n" + if (k2 == 0) { + for (k3 in idx[k1]) { + "url-for " f[2] | getline url + print idx[k1][k3] ":" url > file + } + } else { + ret = system("cp " base " " file) + if (ret) { + exit ret + } } } } |