fix(i18n): eliminate portuguese text leaks across english routes
CI / Lint e auditorias (push) Successful in 50s
CI / Trivy (dependências e segredos) (push) Successful in 10s
CI / Imagem Docker (linux/arm64) (push) Successful in 2m31s

- Localize skip-to-content accessibility link and breadcrumb navigation
- Convert section layouts to dynamic generateMetadata with English titles, descriptions, and structured data
- Eliminate mixed language expressions and translate remaining SoC connection pin warnings and descriptions
- Translate component registry items, categories, tags, and IDF Component Manager guide
- Add strict identical string verification to scripts/check-i18n.mjs with technical allowlist

Co-Authored-By: Antigravity <noreply@google.com>
This commit is contained in:
Lucas RayanandAntigravity committed 2026-11-01 17:17:33 -03:00
1 parent c1bd2c7e11
commit 47c55515bb
35 files changed
+2353 -1874

No files matched your search

+1 -1
View File
@@ -288,7 +288,7 @@ function ConnectionsDiagramInner({ connections, serie }) {
type="button"
onClick={(e) => abrir(connection, e)}
aria-haspopup="dialog"
aria-label={`Pino ${connection.nome}, número ${connection.numero}${connection.avisos ? ", com restrições de uso" : ""}`}
aria-label={isEn ? `Pin ${connection.nome}, number ${connection.numero}${connection.avisos ? ", with usage restrictions" : ""}` : `Pino ${connection.nome}, número ${connection.numero}${connection.avisos ? ", com restrições de uso" : ""}`}
className="flex w-full flex-col items-center rounded-xl border border-line bg-surface p-3 transition-colors hover:bg-surface-2"
>
<span
+3 -3
View File
@@ -63,8 +63,8 @@ export default function LanguageSelector() {
className="flex h-11 min-w-[44px] items-center gap-1.5 rounded-full border border-line bg-surface px-3 text-sm font-semibold text-ink transition-colors hover:bg-surface-2 focus-visible:outline-2 focus-visible:outline-accent"
aria-haspopup="listbox"
aria-expanded={open}
aria-label={`Idioma atual: ${currentLocale.label}. Clique para trocar de idioma.`}
title={`Idioma: ${currentLocale.label}`}
aria-label={currentLocaleCode === "en" ? `Current language: ${currentLocale.label}. Click to switch language.` : `Idioma atual: ${currentLocale.label}. Clique para trocar de idioma.`}
title={currentLocaleCode === "en" ? `Language: ${currentLocale.label}` : `Idioma: ${currentLocale.label}`}
>
<Globe className="h-4 w-4 text-muted" aria-hidden="true" />
<span className="font-semibold">{currentLocale.short}</span>
@@ -77,7 +77,7 @@ export default function LanguageSelector() {
{open && (
<div
role="listbox"
aria-label="Idiomas disponíveis"
aria-label={currentLocaleCode === "en" ? "Available languages" : "Idiomas disponíveis"}
className="absolute right-0 top-full mt-2 w-48 rounded-2xl border border-line bg-surface p-1.5 shadow-[0_24px_60px_-20px_rgba(15,23,42,0.35)] dark:shadow-[0_24px_60px_-20px_rgba(0,0,0,0.8)] z-50"
>
{LOCALES.map((loc) => {
+12 -3
View File
@@ -1,4 +1,5 @@
import Link from "next/link";
import { useLocale } from "next-intl";
/**
* Abertura padrão das páginas internas: trilha, rótulo, título, frase de apoio
@@ -7,12 +8,20 @@ import Link from "next/link";
*/
export default function PageHero({ trail = [], icon: Icon, label, title, lede, align = "left", children }) {
const center = align === "center";
let isEn = false;
try {
const locale = useLocale();
isEn = locale === "en";
} catch {
// fallback
}
return (
<section className="shell pt-8 sm:pt-12">
{trail.length > 0 && (
<nav aria-label="Trilha de navegação" className="flex flex-wrap items-center gap-2 text-sm text-muted">
<Link href="/" className="inline-flex min-h-11 min-w-11 items-center justify-center transition-colors hover:text-accent">
Início
<nav aria-label={isEn ? "Breadcrumb navigation" : "Trilha de navegação"} className="flex flex-wrap items-center gap-2 text-sm text-muted">
<Link href={isEn ? "/en" : "/"} className="inline-flex min-h-11 min-w-11 items-center justify-center transition-colors hover:text-accent">
{isEn ? "Home" : "Início"}
</Link>
{trail.map((item, i) => (
<span key={item.label} className="flex min-h-11 items-center gap-2">
+2 -2
View File
@@ -2,7 +2,7 @@
import { useEffect, useRef, useState } from "react";
export default function SeriesTabMenu({ tabs }) {
export default function SeriesTabMenu({ tabs, isEn = false }) {
const availableTabs = tabs.filter((tab) => tab.available);
const [activeTab, setActiveTab] = useState(availableTabs[0]?.id);
const refs = useRef({});
@@ -59,7 +59,7 @@ export default function SeriesTabMenu({ tabs }) {
return (
<div id="diagrama-abas" className="scroll-mt-28">
<div role="tablist" aria-label="Placa e diagrama" className="no-scrollbar flex gap-2 overflow-x-auto pb-1">
<div role="tablist" aria-label={isEn ? "Board and diagram" : "Placa e diagrama"} className="no-scrollbar flex gap-2 overflow-x-auto pb-1">
{availableTabs.map((tab, indice) => (
<button
key={tab.id}