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
@@ -31,6 +31,20 @@ const CAMINHOS_ES = [
|
||||
{ href: "/glossario", icon: BookOpen, titulo: "Glosario", texto: "Términos de hardware explicados con claridad." },
|
||||
];
|
||||
|
||||
const CAMINHOS_FR = [
|
||||
{ href: "/series", icon: Compass, titulo: "Séries ESP32", texto: "Les 12 familles, avec brochage et spécifications." },
|
||||
{ href: "/seletor", icon: SlidersHorizontal, titulo: "Sélecteur de puce", texto: "Répondez à huit questions et obtenez les modèles recommandés." },
|
||||
{ href: "/comparacao", icon: Scale, titulo: "Comparateur", texto: "Jusqu'à quatre séries côte à côte." },
|
||||
{ href: "/glossario", icon: BookOpen, titulo: "Glossaire", texto: "Les termes matériels expliqués clairement." },
|
||||
];
|
||||
|
||||
const CAMINHOS_DE = [
|
||||
{ href: "/series", icon: Compass, titulo: "ESP32-Serien", texto: "Die 12 Familien mit Pinbelegung und Spezifikationen." },
|
||||
{ href: "/seletor", icon: SlidersHorizontal, titulo: "Chip-Auswahl", texto: "Beantworten Sie acht Fragen und erhalten Sie passende Empfehlungen." },
|
||||
{ href: "/comparacao", icon: Scale, titulo: "Vergleich", texto: "Bis zu vier Serien im direkten Vergleich." },
|
||||
{ href: "/glossario", icon: BookOpen, titulo: "Glossar", texto: "Hardware-Begriffe verständlich erklärt." },
|
||||
];
|
||||
|
||||
export default async function NotFound() {
|
||||
let locale = "pt";
|
||||
try {
|
||||
@@ -40,7 +54,9 @@ export default async function NotFound() {
|
||||
}
|
||||
const isEn = locale === "en";
|
||||
const isEs = locale === "es";
|
||||
const caminhos = isEn ? CAMINHOS_EN : isEs ? CAMINHOS_ES : CAMINHOS_PT;
|
||||
const isFr = locale === "fr";
|
||||
const isDe = locale === "de";
|
||||
const caminhos = isEn ? CAMINHOS_EN : isEs ? CAMINHOS_ES : isFr ? CAMINHOS_FR : isDe ? CAMINHOS_DE : CAMINHOS_PT;
|
||||
|
||||
return (
|
||||
<div className="site-canvas min-h-screen">
|
||||
@@ -48,18 +64,22 @@ export default async function NotFound() {
|
||||
|
||||
<main id="conteudo" className="shell section">
|
||||
<div className="mx-auto max-w-2xl text-center">
|
||||
<p className="eyebrow justify-center">{isEn ? "Error 404" : "Error 404"}</p>
|
||||
<h1 className="page-title mt-4">{isEn ? "This page does not exist." : isEs ? "Esta página no existe." : "Essa página não existe."}</h1>
|
||||
<p className="eyebrow justify-center">{isEn ? "Error 404" : isFr ? "Erreur 404" : isDe ? "Fehler 404" : "Error 404"}</p>
|
||||
<h1 className="page-title mt-4">{isEn ? "This page does not exist." : isEs ? "Esta página no existe." : isFr ? "Cette page n'existe pas." : isDe ? "Diese Seite existiert nicht." : "Essa página não existe."}</h1>
|
||||
<p className="lede mx-auto mt-5 max-w-xl">
|
||||
{isEn
|
||||
? "The address may have changed or was mistyped. Choose one of these paths to continue."
|
||||
: isEs
|
||||
? "La dirección puede haber cambiado o estar mal escrita. Elija uno de estos caminos para continuar."
|
||||
: isFr
|
||||
? "L'adresse a peut-être changé ou a été mal saisie. Choisissez l'un de ces chemins pour continuer."
|
||||
: isDe
|
||||
? "Die Adresse wurde möglicherweise geändert oder falsch eingegeben. Wählen Sie einen dieser Wege, um fortzufahren."
|
||||
: "O endereço pode ter mudado ou estar digitado errado. Escolha um destes caminhos para continuar."}
|
||||
</p>
|
||||
<div className="mt-8 flex justify-center">
|
||||
<Link href={isEn ? "/en" : isEs ? "/es" : "/"} className="btn btn-primary">
|
||||
{isEn ? "Back to home" : isEs ? "Volver al inicio" : "Voltar ao início"}
|
||||
<Link href={isEn ? "/en" : isEs ? "/es" : isFr ? "/fr" : isDe ? "/de" : "/"} className="btn btn-primary">
|
||||
{isEn ? "Back to home" : isEs ? "Volver al inicio" : isFr ? "Retour à l'accueil" : isDe ? "Zur Startseite" : "Voltar ao início"}
|
||||
<ArrowRight className="h-4 w-4" aria-hidden="true" />
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user