feat(i18n): Simplified Chinese (zh-CN), search answers per locale, fr/de/es data fixes
CI / Lint e auditorias (push) Successful in 1m10s
CI / Trivy (dependências e segredos) (push) Successful in 12s
CI / Imagem Docker (linux/arm64) (push) Successful in 2m39s
Release / Plano (reaproveitar a imagem?) (push) Successful in 6s
Release / ci (push) Skipped
Release / Publica a imagem (linux/arm64) (push) Successful in 18s
Release / Cria a release no Gitea (push) Successful in 5s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas RayanandClaude Sonnet 5.5 committed 2026-11-01 23:28:39 -03:00
1 parent ae61416468
commit 5a9fe676fc
61 files changed
+2517 -920

No files matched your search

+29 -9
View File
@@ -6,6 +6,7 @@ export async function generateMetadata({ params }) {
const isEs = locale === "es";
const isFr = locale === "fr";
const isDe = locale === "de";
const isZh = locale === "zh-CN";
return paginaMeta({
titulo: isEs
? "Diagnóstico de errores comunes en ESP32: Guía profesional"
@@ -13,7 +14,7 @@ export async function generateMetadata({ params }) {
? "Common ESP32 Errors & Diagnostics: Professional Guide"
: isFr
? "Diagnostic des erreurs courantes sur ESP32 : guide professionnel"
: isDe
: isZh ? "ESP32 常见故障诊断:专业指南" : isDe
? "Diagnose häufiger ESP32-Fehler: Professioneller Leitfaden"
: "Diagnóstico de Erros Comuns no ESP32: Guia Profissional",
descricao: isEs
@@ -22,7 +23,7 @@ export async function generateMetadata({ params }) {
? "Definitive technical guide to identify and fix Brownout, Guru Meditation, Task Watchdog, Stack Overflow, memory leaks, and boot issues on ESP32 (Arduino & ESP-IDF)."
: isFr
? "Guide technique pour identifier et résoudre Brownout, Guru Meditation, Task Watchdog, Stack Overflow, fuites de mémoire et pannes de démarrage sur ESP32 (Arduino et ESP-IDF)."
: isDe
: isZh ? "权威技术指南,用于识别并解决 ESP32(Arduino 与 ESP-IDF)上的 Brownout、Guru Meditation、Task Watchdog、栈溢出、内存泄漏和启动故障。" : isDe
? "Technischer Leitfaden zur Behebung von Brownout, Guru Meditation, Task Watchdog, Stack Overflow, Speicherlecks und Boot-Problemen beim ESP32 (Arduino & ESP-IDF)."
: "Guia técnico definitivo para identificar e resolver Brownout, Guru Meditation, Task Watchdog, Stack Overflow, vazamento de memória e falhas de boot no ESP32 (Arduino e ESP-IDF).",
caminho: "/diagnostico",
@@ -60,7 +61,7 @@ export async function generateMetadata({ params }) {
"ESP32 redémarre en boucle",
"failed to connect to esp32",
]
: isDe
: isZh ? ["ESP32 常见错误", "brownout detector was triggered", "guru meditation error", "task watchdog got triggered", "stack canary watchpoint triggered", "如何调试 ESP32", "ESP32 反复重启", "failed to connect to esp32"] : isDe
? [
"häufige ESP32-Fehler",
"brownout detector was triggered",
@@ -178,6 +179,24 @@ const faqsDe = [
resposta: "Beim Start beginnt die interne Systemuhr des ESP32 im Jahr 1970. Die TLS-Zertifikatsprüfung stuft das Serverzertifikat als ungültig ein, da es in der fernen 'Zukunft' liegt. Eine Zeitsynchronisation über SNTP (configTime) vor dem Verbindungsaufbau behebt das Problem.",
},
];
const faqsZh = [
{
pergunta: "ESP32 上出现“Brownout detector was triggered”是什么原因?",
resposta: "当 Wi-Fi/BLE 射频产生快速电流峰值(常超过 500mA)时,3V3 电源轨跌到 2.8V ~ 2.43V 以下,就会出现这个错误,通常由过细的 USB 线或容量不足的 LDO 稳压器引起。工程上的解决办法是在 VCC 附近放置 10µF 到 100µF 的低 ESR 旁路电容,并使用 600mA 以上的可靠 LDO 稳压器。",
},
{
pergunta: "如何解决“Guru Meditation Error (LoadProhibited)”?",
resposta: "LoadProhibited 表示试图读取或写入空(NULL)或无效的内存地址。解决办法是用 Espressif Exception Decoder 或 addr2line 定位源代码行,并加入 if (ptr != NULL) 这类防御式检查。",
},
{
pergunta: "为什么 FreeRTOS 中会触发任务看门狗定时器(TWDT)?",
resposta: "当高优先级任务在紧凑的阻塞循环中独占 CPU(例如没有 vTaskDelay 的 while(1)),使负责喂操作系统看门狗的低优先级 IDLE 任务得不到运行时,TWDT 就会触发。",
},
{
pergunta: "为什么 ESP32 上 HTTPS 和 TLS 连接会出现错误 -0x2700?",
resposta: "ESP32 启动时,内部系统时钟从 1970 年纪元开始。TLS 证书校验器会因服务器证书的有效期落在遥远的“未来”而拒绝该证书。在发起 TLS 连接之前,通过 SNTP(configTime)同步时间即可解决。",
},
];
export default async function DiagnosticoLayout({ children, params }) {
const { locale } = await params;
@@ -185,8 +204,9 @@ export default async function DiagnosticoLayout({ children, params }) {
const isEs = locale === "es";
const isFr = locale === "fr";
const isDe = locale === "de";
const faqs = isEs ? faqsEs : isEn ? faqsEn : isFr ? faqsFr : isDe ? faqsDe : faqsPt;
const canonPath = isEs ? "/es/diagnostico" : isEn ? "/en/diagnostics" : isFr ? "/fr/diagnostic" : isDe ? "/de/diagnose" : "/diagnostico";
const isZh = locale === "zh-CN";
const faqs = isEs ? faqsEs : isEn ? faqsEn : isFr ? faqsFr : isZh ? faqsZh : isDe ? faqsDe : faqsPt;
const canonPath = isEs ? "/es/diagnostico" : isEn ? "/en/diagnostics" : isFr ? "/fr/diagnostic" : isZh ? "/zh-CN/diagnostics" : isDe ? "/de/diagnose" : "/diagnostico";
return (
<>
@@ -195,8 +215,8 @@ export default async function DiagnosticoLayout({ children, params }) {
dangerouslySetInnerHTML={{
__html: JSON.stringify(
jsonLd.trilha([
{ nome: isEs ? "Inicio" : isEn ? "Home" : isFr ? "Accueil" : isDe ? "Startseite" : "Início", caminho: isEs ? "/es" : isEn ? "/en" : isFr ? "/fr" : isDe ? "/de" : "/" },
{ nome: isEs ? "Diagnóstico y errores comunes" : isEn ? "Diagnostics & Common Errors" : isFr ? "Diagnostic et erreurs courantes" : isDe ? "Diagnose und häufige Fehler" : "Diagnóstico & Erros Comuns", caminho: canonPath },
{ nome: isEs ? "Inicio" : isEn ? "Home" : isFr ? "Accueil" : isZh ? "首页" : isDe ? "Startseite" : "Início", caminho: isEs ? "/es" : isEn ? "/en" : isFr ? "/fr" : isZh ? "/zh-CN" : isDe ? "/de" : "/" },
{ nome: isEs ? "Diagnóstico y errores comunes" : isEn ? "Diagnostics & Common Errors" : isFr ? "Diagnostic et erreurs courantes" : isZh ? "诊断与常见错误" : isDe ? "Diagnose und häufige Fehler" : "Diagnóstico & Erros Comuns", caminho: canonPath },
])
),
}}
@@ -214,14 +234,14 @@ export default async function DiagnosticoLayout({ children, params }) {
dangerouslySetInnerHTML={{
__html: JSON.stringify(
jsonLd.aplicacaoWeb({
nome: isEs ? "Guía de diagnóstico y errores en ESP32" : isEn ? "ESP32 Error Diagnostics & Debugging Guide" : isFr ? "Guide de diagnostic et erreurs sur ESP32" : isDe ? "ESP32-Fehlerdiagnose und Debugging-Leitfaden" : "Guia de Diagnóstico e Erros no ESP32",
nome: isEs ? "Guía de diagnóstico y errores en ESP32" : isEn ? "ESP32 Error Diagnostics & Debugging Guide" : isFr ? "Guide de diagnostic et erreurs sur ESP32" : isZh ? "ESP32 故障诊断指南" : isDe ? "ESP32-Fehlerdiagnose und Debugging-Leitfaden" : "Guia de Diagnóstico e Erros no ESP32",
descricao: isEs
? "Herramienta y guía técnica de análisis de fallas, pánicos de CPU y decodificación de registros en ESP32."
: isEn
? "Technical guide and log decoder for troubleshooting CPU panics, crashes, and exceptions on ESP32."
: isFr
? "Outil et guide technique d'analyse des pannes, des paniques CPU et du décodage de logs sur ESP32."
: isDe
: isZh ? "用于分析故障、CPU 异常和解码 ESP32 日志的工具与技术指南。" : isDe
? "Werkzeug und technischer Leitfaden zur Fehleranalyse, Behebung von CPU-Panics und Dekodierung von Logs auf dem ESP32."
: "Ferramenta e guia técnico de análise de falhas, pânicos de CPU e decodificação de logs no ESP32.",
caminho: canonPath,