fix(i18n): localize json-ld metadata and eliminate breadcrumb leaks
- Pass currentLocale to jsonLd.serie and jsonLd.framework to ensure English headline, name, and properties - Localize JSON-LD @id anchors to #article, #about, #glossary, #organization, and #author for English routes - Pass isEn prop to PageHero across all internal pages to prevent breadcrumbs from defaulting to Portuguese - Add scripts/verifica-vazamentos.py to smoke-imagem.sh to permanently test all 36 English URLs (visible text and ld+json) Co-Authored-By: Antigravity <noreply@google.com>
This commit is contained in:
1 parent
47c55515bb
commit
0d5f8f9c5f
17 files changed
+151
-21
No files matched your search
+8
-8
@@ -106,11 +106,11 @@ export const jsonLd = {
|
||||
description: isEn
|
||||
? "ESP32 ecosystem documentation: specifications, pinouts, comparison, and series selection."
|
||||
: "Documentação do ecossistema ESP32 em português brasileiro: especificações, pinagem, comparação e seleção de séries.",
|
||||
publisher: { "@id": `${SITE.url}/#organizacao` },
|
||||
publisher: { "@id": `${SITE.url}/#${isEn ? "organization" : "organizacao"}` },
|
||||
},
|
||||
{
|
||||
"@type": "Organization",
|
||||
"@id": `${SITE.url}/#organizacao`,
|
||||
"@id": `${SITE.url}/#${isEn ? "organization" : "organizacao"}`,
|
||||
name: "Ciência Embarcada",
|
||||
url: SITE.blog,
|
||||
logo: {
|
||||
@@ -124,7 +124,7 @@ export const jsonLd = {
|
||||
},
|
||||
{
|
||||
"@type": "Person",
|
||||
"@id": `${SITE.url}/#autor`,
|
||||
"@id": `${SITE.url}/#${isEn ? "author" : "autor"}`,
|
||||
name: SITE.autor,
|
||||
url: SITE.autorUrl,
|
||||
email: SITE.autorEmail,
|
||||
@@ -180,7 +180,7 @@ export const jsonLd = {
|
||||
return {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "TechArticle",
|
||||
"@id": `${SITE.url}${basePath}#artigo`,
|
||||
"@id": `${SITE.url}${basePath}#${isEn ? "article" : "artigo"}`,
|
||||
headline: isEn
|
||||
? `${serie.nome_completo || chave}: specifications and pinout`
|
||||
: `${serie.nome_completo || chave}: especificações e pinagem`,
|
||||
@@ -226,7 +226,7 @@ export const jsonLd = {
|
||||
return {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "TechArticle",
|
||||
"@id": `${SITE.url}${basePath}#artigo`,
|
||||
"@id": `${SITE.url}${basePath}#${isEn ? "article" : "artigo"}`,
|
||||
headline: isEn
|
||||
? `${framework.nome} for ESP32: Guide and Documentation`
|
||||
: `${framework.nome} para ESP32: Guia e Documentação`,
|
||||
@@ -274,7 +274,7 @@ export const jsonLd = {
|
||||
return {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "DefinedTermSet",
|
||||
"@id": `${SITE.url}${basePath}#glossario`,
|
||||
"@id": `${SITE.url}${basePath}#${isEn ? "glossary" : "glossario"}`,
|
||||
name: isEn ? "ESP32 Technical Glossary" : "Glossário Técnico do ESP32",
|
||||
inLanguage: isEn ? "en" : "pt-BR",
|
||||
hasDefinedTerm: categorias.flatMap((cat) =>
|
||||
@@ -282,7 +282,7 @@ export const jsonLd = {
|
||||
"@type": "DefinedTerm",
|
||||
name: t.termo,
|
||||
description: t.definicao,
|
||||
inDefinedTermSet: `${SITE.url}${basePath}#glossario`,
|
||||
inDefinedTermSet: `${SITE.url}${basePath}#${isEn ? "glossary" : "glossario"}`,
|
||||
}))
|
||||
),
|
||||
};
|
||||
@@ -400,7 +400,7 @@ export const jsonLd = {
|
||||
return {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "AboutPage",
|
||||
"@id": `${SITE.url}${basePath}#sobre`,
|
||||
"@id": `${SITE.url}${basePath}#${isEn ? "about" : "sobre"}`,
|
||||
name: isEn ? "About ESPDocs" : "Sobre o ESPDocs",
|
||||
description: isEn
|
||||
? "ESPDocs is an independent platform organizing technical documentation of the ESP32 ecosystem."
|
||||
|
||||
Reference in new issue
Block a user