fix(i18n): eliminate portuguese text leaks across english routes
- 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:
1 parent
c1bd2c7e11
commit
47c55515bb
35 files changed
+2353
-1874
No files matched your search
@@ -1,13 +1,22 @@
|
||||
import { paginaMeta, jsonLd } from "@/lib/seo";
|
||||
|
||||
export const metadata = paginaMeta({
|
||||
titulo: "Comparar séries ESP32",
|
||||
descricao: "Compare até quatro séries de ESP32 lado a lado: processador, Wi-Fi, Bluetooth, memória, GPIO, periféricos e segurança em hardware, com os dados dos datasheets oficiais.",
|
||||
caminho: "/comparacao",
|
||||
keywords: ["comparar ESP32", "ESP32 vs ESP32-S3", "tabela comparativa ESP32", "qual ESP32 é melhor"],
|
||||
});
|
||||
export async function generateMetadata({ params }) {
|
||||
const { locale } = await params;
|
||||
const isEn = locale === "en";
|
||||
return paginaMeta({
|
||||
titulo: isEn ? "Compare ESP32 Series: Side-by-Side Table" : "Comparar séries ESP32",
|
||||
descricao: isEn
|
||||
? "Compare up to four ESP32 series side by side: processor, Wi-Fi, Bluetooth, memory, GPIO, peripherals, and hardware security, with official datasheet data."
|
||||
: "Compare até quatro séries de ESP32 lado a lado: processador, Wi-Fi, Bluetooth, memória, GPIO, periféricos e segurança em hardware, com os dados dos datasheets oficiais.",
|
||||
caminho: "/comparacao",
|
||||
locale,
|
||||
keywords: isEn
|
||||
? ["compare ESP32", "ESP32 vs ESP32-S3", "ESP32 comparison table", "which ESP32 is best"]
|
||||
: ["comparar ESP32", "ESP32 vs ESP32-S3", "tabela comparativa ESP32", "qual ESP32 é melhor"],
|
||||
});
|
||||
}
|
||||
|
||||
const faqs = [
|
||||
const faqsPt = [
|
||||
{
|
||||
pergunta: "Como comparar microcontroladores ESP32 lado a lado?",
|
||||
resposta: "O comparador do ESPDocs permite selecionar até quatro séries simultaneamente para confrontar arquitetura, frequência de clock, memória SRAM/PSRAM, padrões de rádio (Wi-Fi 4/6, Bluetooth 5/6, 802.15.4), interfaces de periféricos e blocos de segurança em hardware.",
|
||||
@@ -22,7 +31,26 @@ const faqs = [
|
||||
},
|
||||
];
|
||||
|
||||
export default function Layout({ children }) {
|
||||
const faqsEn = [
|
||||
{
|
||||
pergunta: "How to compare ESP32 microcontrollers side by side?",
|
||||
resposta: "The ESPDocs comparator lets you select up to four series simultaneously to compare architecture, clock speed, SRAM/PSRAM memory, radio standards (Wi-Fi 4/6, Bluetooth 5/6, 802.15.4), peripheral interfaces, and hardware security blocks.",
|
||||
},
|
||||
{
|
||||
pergunta: "What is the difference between classic ESP32 and ESP32-S3?",
|
||||
resposta: "The classic ESP32 uses Xtensa LX6 cores and legacy Bluetooth/LE. The ESP32-S3 brings Xtensa LX7 cores with vector instructions for AI (TinyML), native USB OTG, more GPIOs (45 vs 36), and Bluetooth 5.0 LE.",
|
||||
},
|
||||
{
|
||||
pergunta: "What is the difference between ESP32-C3 and ESP32-C6?",
|
||||
resposta: "The ESP32-C3 is a RISC-V microcontroller with Wi-Fi 4 and Bluetooth 5 LE. The ESP32-C6 upgrades to Wi-Fi 6 (802.11ax), Bluetooth 5.4 LE, IEEE 802.15.4 radio for Zigbee 3.0 and Thread 1.3, plus an ultra-low-power coprocessor.",
|
||||
},
|
||||
];
|
||||
|
||||
export default async function Layout({ children, params }) {
|
||||
const { locale } = await params;
|
||||
const isEn = locale === "en";
|
||||
const faqs = isEn ? faqsEn : faqsPt;
|
||||
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
@@ -30,9 +58,12 @@ export default function Layout({ children }) {
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: JSON.stringify(
|
||||
jsonLd.aplicacaoWeb({
|
||||
nome: "Comparador de Séries ESP32",
|
||||
descricao: "Tabela comparativa técnica para analisar especificações, pinagens e recursos de múltiplas séries de ESP32.",
|
||||
caminho: "/comparacao",
|
||||
nome: isEn ? "ESP32 Series Comparator" : "Comparador de Séries ESP32",
|
||||
descricao: isEn
|
||||
? "Technical comparison table to analyze specifications, pinouts, and features of multiple ESP32 series."
|
||||
: "Tabela comparativa técnica para analisar especificações, pinagens e recursos de múltiplas séries de ESP32.",
|
||||
caminho: isEn ? "/en/compare" : "/comparacao",
|
||||
locale,
|
||||
})
|
||||
),
|
||||
}}
|
||||
@@ -42,8 +73,8 @@ export default function Layout({ children }) {
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: JSON.stringify(
|
||||
jsonLd.trilha([
|
||||
{ nome: "Início", caminho: "/" },
|
||||
{ nome: "Comparar Séries", caminho: "/comparacao" },
|
||||
{ nome: isEn ? "Home" : "Início", caminho: isEn ? "/en" : "/" },
|
||||
{ nome: isEn ? "Compare Series" : "Comparar Séries", caminho: isEn ? "/en/compare" : "/comparacao" },
|
||||
])
|
||||
),
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user