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
+17
-9
@@ -1,20 +1,28 @@
|
||||
import Link from "next/link";
|
||||
import { useLocale } from "next-intl";
|
||||
|
||||
/**
|
||||
* Abertura padrão das páginas internas: trilha, rótulo, título, frase de apoio
|
||||
* e ações. Mesma voz da /livro e da home, para que nenhuma página pareça
|
||||
* de outro produto.
|
||||
*/
|
||||
export default function PageHero({ trail = [], icon: Icon, label, title, lede, align = "left", children }) {
|
||||
export default function PageHero({
|
||||
trail = [],
|
||||
icon: Icon,
|
||||
label,
|
||||
title,
|
||||
lede,
|
||||
align = "left",
|
||||
children,
|
||||
isEn: isEnProp,
|
||||
locale: localeProp,
|
||||
}) {
|
||||
const center = align === "center";
|
||||
let isEn = false;
|
||||
try {
|
||||
const locale = useLocale();
|
||||
isEn = locale === "en";
|
||||
} catch {
|
||||
// fallback
|
||||
}
|
||||
const isEn =
|
||||
isEnProp !== undefined
|
||||
? isEnProp
|
||||
: localeProp
|
||||
? localeProp === "en"
|
||||
: trail.some((t) => t.isEn || (t.href && t.href.startsWith("/en")));
|
||||
|
||||
return (
|
||||
<section className="shell pt-8 sm:pt-12">
|
||||
|
||||
Reference in new issue
Block a user