feat(i18n): Simplified Chinese (zh-CN), search answers per locale, fr/de/es data fixes
CI / Lint e auditorias (push) Successful in 1m10s
CI / Trivy (dependências e segredos) (push) Successful in 12s
CI / Imagem Docker (linux/arm64) (push) Successful in 2m39s
Release / Plano (reaproveitar a imagem?) (push) Successful in 6s
Release / ci (push) Skipped
Release / Publica a imagem (linux/arm64) (push) Successful in 18s
Release / Cria a release no Gitea (push) Successful in 5s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Sonnet 5.5 committed 2026-11-01 23:28:39 -03:00
1 parent ae61416468
commit 5a9fe676fc
61 files changed
+2517 -920

No files matched your search

+22
View File
@@ -67,6 +67,12 @@ if [[ " $ENABLED_LOCALES " =~ " de " ]]; then
done
fi
if [[ " $ENABLED_LOCALES " =~ " zh-CN " ]]; then
for p in /series /catalog /compare /components /diagnostics /frameworks /glossary /selector /about; do
status 200 "/zh-CN$p"
done
fi
# 2. Idiomas INATIVOS: redirecionam com 307 para o idioma fallback (en se ativo, senão pt)
for l in $ALL_LOCALES; do
if [[ ! " $ENABLED_LOCALES " =~ " $l " ]]; then
@@ -120,6 +126,11 @@ else
fi
if [[ ! " $ENABLED_LOCALES " =~ " zh-CN " ]]; then
destino 307 / /en 'Accept-Language: zh-CN,zh;q=0.9'
else
destino 307 / /zh-CN 'Accept-Language: zh-CN,zh;q=0.9'
destino 307 / /zh-CN 'Accept-Language: zh-Hans-CN'
destino 307 / /zh-CN 'Accept-Language: zh-TW,zh;q=0.9'
destino 307 / /zh-CN 'Cookie: NEXT_LOCALE=zh-CN'
fi
fi
@@ -176,4 +187,15 @@ if [[ " $ENABLED_LOCALES " =~ " de " ]]; then
done
fi
if [[ " $ENABLED_LOCALES " =~ " zh-CN " ]]; then
html_zh=$(curl -s -A 'Mozilla/5.0 Chrome/130' "$base/zh-CN/about")
head_zh=${html_zh%%</head>*}
for marca in '<title>' 'rel="canonical"'; do
case "$head_zh" in *"$marca"*) ;; *) echo "FALHOU /zh-CN/about: $marca fora do <head>"; falhas=$((falhas + 1));; esac
done
fi
# 8. Respostas da busca no idioma da página (o motor roda no navegador)
LOCALES="$ENABLED_LOCALES" node scripts/verifica-busca.mjs "$base" || falhas=$((falhas + 1))
exit $((falhas > 0))