feat(i18n): French and German localization (phase 5)
- Add full message catalogs and content for French (fr) and German (de) - Implement ASCII canonical slugs for French and German routes - Add language-specific search endpoints (/api/busca/fr, /api/busca/de) - Configure strict 404 responses for /fr/livro and /de/livro - Localize SEO, OpenGraph (fr_FR, de_DE), Twitter and JSON-LD schemas - Add localized code example comments across 14 examples for fr and de - Enable 'fr' and 'de' in ENABLED_LOCALES with root negotiation and redirect - Extend test suite in check-i18n, smoke-imagem and verifica-vazamentos Co-Authored-By: Antigravity <noreply@google.com>
This commit is contained in:
1 parent
7b673aeb4b
commit
7fce46b9e1
104 files changed
+33369
-686
No files matched your search
@@ -55,6 +55,18 @@ if [[ " $ENABLED_LOCALES " =~ " es " ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ " $ENABLED_LOCALES " =~ " fr " ]]; then
|
||||
for p in /series /catalogue /comparaison /composants /diagnostic /frameworks /glossaire /selecteur /a-propos; do
|
||||
status 200 "/fr$p"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ " $ENABLED_LOCALES " =~ " de " ]]; then
|
||||
for p in /serien /katalog /vergleich /komponenten /diagnose /frameworks /glossar /auswahl /ueber-uns; do
|
||||
status 200 "/de$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
|
||||
@@ -96,9 +108,15 @@ else
|
||||
fi
|
||||
if [[ ! " $ENABLED_LOCALES " =~ " fr " ]]; then
|
||||
destino 307 / /en 'Accept-Language: fr-CA,fr;q=0.9'
|
||||
else
|
||||
destino 307 / /fr 'Accept-Language: fr-FR,fr;q=0.9'
|
||||
destino 307 / /fr 'Cookie: NEXT_LOCALE=fr'
|
||||
fi
|
||||
if [[ ! " $ENABLED_LOCALES " =~ " de " ]]; then
|
||||
destino 307 / /en 'Accept-Language: de-AT,de;q=0.8'
|
||||
else
|
||||
destino 307 / /de 'Accept-Language: de-DE,de;q=0.9'
|
||||
destino 307 / /de 'Cookie: NEXT_LOCALE=de'
|
||||
fi
|
||||
if [[ ! " $ENABLED_LOCALES " =~ " zh-CN " ]]; then
|
||||
destino 307 / /en 'Accept-Language: zh-CN,zh;q=0.9'
|
||||
@@ -142,4 +160,20 @@ if [[ " $ENABLED_LOCALES " =~ " es " ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ " $ENABLED_LOCALES " =~ " fr " ]]; then
|
||||
html_fr=$(curl -s -A 'Mozilla/5.0 Chrome/130' "$base/fr/a-propos")
|
||||
head_fr=${html_fr%%</head>*}
|
||||
for marca in '<title>' 'rel="canonical"'; do
|
||||
case "$head_fr" in *"$marca"*) ;; *) echo "FALHOU /fr/a-propos: $marca fora do <head>"; falhas=$((falhas + 1));; esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ " $ENABLED_LOCALES " =~ " de " ]]; then
|
||||
html_de=$(curl -s -A 'Mozilla/5.0 Chrome/130' "$base/de/ueber-uns")
|
||||
head_de=${html_de%%</head>*}
|
||||
for marca in '<title>' 'rel="canonical"'; do
|
||||
case "$head_de" in *"$marca"*) ;; *) echo "FALHOU /de/ueber-uns: $marca fora do <head>"; falhas=$((falhas + 1));; esac
|
||||
done
|
||||
fi
|
||||
|
||||
exit $((falhas > 0))
|
||||
Reference in new issue
Block a user