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: "Qual ESP32 escolher",
|
||||
descricao: "Responda a perguntas simples sobre conectividade (Wi-Fi 6, 5GHz, Matter), energia, periféricos e segurança ou use o filtro paramétrico para encontrar o ESP32 perfeito.",
|
||||
caminho: "/seletor",
|
||||
keywords: ["qual ESP32 escolher", "qual ESP32 usar", "escolher microcontrolador", "ESP32 para meu projeto", "comparar ESP32"],
|
||||
});
|
||||
export async function generateMetadata({ params }) {
|
||||
const { locale } = await params;
|
||||
const isEn = locale === "en";
|
||||
return paginaMeta({
|
||||
titulo: isEn ? "Which ESP32 to Choose" : "Qual ESP32 escolher",
|
||||
descricao: isEn
|
||||
? "Answer simple questions about connectivity (Wi-Fi 6, 5GHz, Matter), power, peripherals, and security or use the parametric filter to find the perfect ESP32."
|
||||
: "Responda a perguntas simples sobre conectividade (Wi-Fi 6, 5GHz, Matter), energia, periféricos e segurança ou use o filtro paramétrico para encontrar o ESP32 perfeito.",
|
||||
caminho: "/seletor",
|
||||
locale,
|
||||
keywords: isEn
|
||||
? ["which ESP32 to choose", "which ESP32 to use", "choose microcontroller", "ESP32 for my project", "compare ESP32"]
|
||||
: ["qual ESP32 escolher", "qual ESP32 usar", "escolher microcontrolador", "ESP32 para meu projeto", "comparar ESP32"],
|
||||
});
|
||||
}
|
||||
|
||||
const faqs = [
|
||||
const faqsPt = [
|
||||
{
|
||||
pergunta: "Qual ESP32 escolher para iniciantes?",
|
||||
resposta: "Para quem está começando no mundo Maker e IoT, o ESP32 clássico (NodeMCU/DevKitC) ou o ESP32-C3 são as melhores opções devido à vasta quantidade de bibliotecas, exemplos prontos no Arduino IDE e farta documentação em português.",
|
||||
@@ -26,7 +35,30 @@ const faqs = [
|
||||
},
|
||||
];
|
||||
|
||||
export default function Layout({ children }) {
|
||||
const faqsEn = [
|
||||
{
|
||||
pergunta: "Which ESP32 to choose for beginners?",
|
||||
resposta: "For makers and developers starting out in IoT, the classic ESP32 (NodeMCU/DevKitC) or ESP32-C3 are top choices thanks to extensive library support, readily available Arduino IDE examples, and thorough documentation.",
|
||||
},
|
||||
{
|
||||
pergunta: "Which ESP32 supports Wi-Fi 6, Bluetooth 6 and Thread/Zigbee/Matter?",
|
||||
resposta: "The ESP32-C6 and ESP32-C5 are the leading series for modern networking. The ESP32-C6 offers 2.4 GHz Wi-Fi 6 and 802.15.4 radio (Zigbee 3.0 / Thread / Matter). The ESP32-C5 is the first to introduce Dual-Band Wi-Fi 6 on both 2.4 GHz and 5 GHz bands simultaneously.",
|
||||
},
|
||||
{
|
||||
pergunta: "Which is the most powerful ESP32 for AI (TinyML) and Displays?",
|
||||
resposta: "The ESP32-P4 (dual-core RISC-V at 400 MHz with AI vector extensions, MIPI-CSI/DSI interfaces, and up to 64 MB PSRAM) and ESP32-S3 (dual-core Xtensa at 240 MHz with neural network vector acceleration and RGB LCD support) provide maximum speed for edge AI and rich graphical interfaces.",
|
||||
},
|
||||
{
|
||||
pergunta: "Which ESP32 consumes the least power for battery-operated projects?",
|
||||
resposta: "Compact RISC-V microcontrollers with ULP coprocessors like the ESP32-C2, ESP32-C3, and ESP32-H2 (dedicated 802.15.4 without Wi-Fi) achieve ultra-low deep sleep currents ranging between 5 µA and 10 µA.",
|
||||
},
|
||||
];
|
||||
|
||||
export default async function Layout({ children, params }) {
|
||||
const { locale } = await params;
|
||||
const isEn = locale === "en";
|
||||
const faqs = isEn ? faqsEn : faqsPt;
|
||||
|
||||
return (
|
||||
<>
|
||||
<script
|
||||
@@ -34,9 +66,12 @@ export default function Layout({ children }) {
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: JSON.stringify(
|
||||
jsonLd.aplicacaoWeb({
|
||||
nome: "Seletor Inteligente de ESP32",
|
||||
descricao: "Ferramenta interativa que analisa conectividade, consumo, periféricos e segurança para indicar a série ideal de ESP32.",
|
||||
caminho: "/seletor",
|
||||
nome: isEn ? "Intelligent ESP32 Selector" : "Seletor Inteligente de ESP32",
|
||||
descricao: isEn
|
||||
? "Interactive tool analyzing connectivity, power consumption, peripherals, and security to recommend the ideal ESP32 series."
|
||||
: "Ferramenta interativa que analisa conectividade, consumo, periféricos e segurança para indicar a série ideal de ESP32.",
|
||||
caminho: isEn ? "/en/selector" : "/seletor",
|
||||
locale,
|
||||
})
|
||||
),
|
||||
}}
|
||||
@@ -46,8 +81,8 @@ export default function Layout({ children }) {
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: JSON.stringify(
|
||||
jsonLd.trilha([
|
||||
{ nome: "Início", caminho: "/" },
|
||||
{ nome: "Seletor de ESP32", caminho: "/seletor" },
|
||||
{ nome: isEn ? "Home" : "Início", caminho: isEn ? "/en" : "/" },
|
||||
{ nome: isEn ? "ESP32 Selector" : "Seletor de ESP32", caminho: isEn ? "/en/selector" : "/seletor" },
|
||||
])
|
||||
),
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user