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

+27 -7
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: "ESP Component Registry & IDF Component Manager · ESPDocs",
descricao: isEs
@@ -14,7 +15,7 @@ export async function generateMetadata({ params }) {
? "Official interactive catalog of the ESP Component Registry: display drivers, LVGL, ESP-SR voice recognition, RainMaker, BSPs, and idf_component.yml generator."
: isFr
? "Catalogue interactif du ESP Component Registry : pilotes d'écran, LVGL, reconnaissance vocale ESP-SR, RainMaker, BSPs et générateur d'idf_component.yml."
: isDe
: isZh ? "官方交互式 ESP Component Registry 目录:显示屏驱动、LVGL、ESP-SR 语音识别、RainMaker、BSP 以及 idf_component.yml 生成器。" : isDe
? "Interaktiver Katalog der ESP Component Registry: Display-Treiber, LVGL, ESP-SR-Sprachkennung, RainMaker, BSPs und idf_component.yml-Generator."
: "Catálogo oficial e interativo do ESP Component Registry: drivers de displays, LVGL, reconhecimento de voz ESP-SR, RainMaker, BSPs e gerador de idf_component.yml.",
caminho: "/componentes",
@@ -55,7 +56,7 @@ export async function generateMetadata({ params }) {
"espressif esp-sr",
"bibliothèques ESP-IDF",
]
: isDe
: isZh ? ["ESP Component Registry", "IDF Component Manager", "idf_component.yml", "idf.py add-dependency", "ESP32 组件", "espressif esp_lvgl_port", "espressif esp_rainmaker", "espressif esp-sr", "ESP-IDF 库"] : isDe
? [
"ESP Component Registry",
"IDF Component Manager",
@@ -175,6 +176,24 @@ const faqsDe = [
resposta: "Ja, Entwickler und Unternehmen können öffentliche oder private Komponenten mit dem offiziellen Compote-CLI-Tool (pip install idf-component-manager) in der ESP Component Registry veröffentlichen.",
},
];
const faqsZh = [
{
pergunta: "什么是 ESP Component Registry 和 IDF Component Manager?",
resposta: "ESP Component Registry(components.espressif.com)是乐鑫模块化软件包的官方中央仓库。IDF Component Manager 集成在 ESP-IDF 中(v4.4+,v5.x+ 起默认启用),可根据 idf_component.yml 清单自动下载、编译并解析依赖版本。",
},
{
pergunta: "如何向 ESP-IDF 项目中添加组件?",
resposta: "可以在项目终端运行 'idf.py add-dependency \"namespace/component^version\"'(例如:idf.py add-dependency \"espressif/esp_lvgl_port^2.4.0\"),也可以直接编辑 main/idf_component.yml。",
},
{
pergunta: "使用 Component Registry 与 git 子模块有什么区别?",
resposta: "Component Registry 省去了管理笨重 Git 子模块和手动跟踪的麻烦。它提供语义化版本(^ 和 ~)、自动解析传递依赖,以及按需的模块化编译。",
},
{
pergunta: "我可以创建并发布自己的组件吗?",
resposta: "可以,任何开发者或公司都可以使用官方的 Compote CLI 工具(pip install idf-component-manager)向 ESP Component Registry 发布公开或私有组件。",
},
];
export default async function ComponentesLayout({ children, params }) {
const { locale } = await params;
@@ -182,8 +201,9 @@ export default async function ComponentesLayout({ 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/componentes" : isEn ? "/en/components" : isFr ? "/fr/composants" : isDe ? "/de/komponenten" : "/componentes";
const isZh = locale === "zh-CN";
const faqs = isEs ? faqsEs : isEn ? faqsEn : isFr ? faqsFr : isZh ? faqsZh : isDe ? faqsDe : faqsPt;
const canonPath = isEs ? "/es/componentes" : isEn ? "/en/components" : isFr ? "/fr/composants" : isZh ? "/zh-CN/components" : isDe ? "/de/komponenten" : "/componentes";
return (
<>
@@ -192,7 +212,7 @@ export default async function ComponentesLayout({ 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 ? "Inicio" : isEn ? "Home" : isFr ? "Accueil" : isZh ? "首页" : isDe ? "Startseite" : "Início", caminho: isEs ? "/es" : isEn ? "/en" : isFr ? "/fr" : isZh ? "/zh-CN" : isDe ? "/de" : "/" },
{ nome: "ESP Component Registry", caminho: canonPath },
])
),
@@ -215,7 +235,7 @@ export default async function ComponentesLayout({ children, params }) {
? "ESP Component Registry Hub & Manifest Builder"
: isFr
? "Hub de l'ESP Component Registry & Générateur de Manifeste"
: isDe
: isZh ? "ESP Component Registry 中心与清单生成器" : isDe
? "ESP Component Registry Hub & Manifest-Generator"
: "Hub do ESP Component Registry & Construtor de Manifesto",
descricao: isEs
@@ -224,7 +244,7 @@ export default async function ComponentesLayout({ children, params }) {
? "Curated catalog and idf_component.yml manifest generator for modular ESP-IDF components."
: isFr
? "Catalogue sélectionné et générateur de manifeste idf_component.yml pour les composants modulaires d'ESP-IDF."
: isDe
: isZh ? "ESP-IDF 模块化组件的精选目录与 idf_component.yml 清单生成器。" : isDe
? "Kuratierter Katalog und idf_component.yml-Manifest-Generator für modulare ESP-IDF-Komponenten."
: "Catálogo curado e gerador de manifesto idf_component.yml para componentes modulares do ESP-IDF.",
caminho: canonPath,