diff --git a/src/components/ConversionTracking.astro b/src/components/ConversionTracking.astro new file mode 100644 index 0000000..a30b96e --- /dev/null +++ b/src/components/ConversionTracking.astro @@ -0,0 +1,28 @@ +--- +// Google Ads conversion wiring for any `a[data-conversion]` on the page. +// Include once per component that renders conversion links (Astro dedupes the +// bundled script); the per-element guard keeps a link from ever being bound +// twice even if two components include it on the same page. +--- + + diff --git a/src/components/Footer.astro b/src/components/Footer.astro index fb7d44c..5e73bda 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -6,7 +6,18 @@ import { resolveLocale, localesForPath, localizedPath, t } from '../lib/i18n'; const { code: lang } = resolveLocale(Astro.url.pathname); const ui = t(lang); -const aboutHref = localesForPath('/about/').includes(lang) ? localizedPath('/about/', lang) : '/about/'; +const localeHref = (path: string) => + localesForPath(path).includes(lang) ? localizedPath(path, lang) : path; + +// Sitemap links reuse the localized chrome strings — no new translations needed. +const links = [ + { href: localeHref('/voice/'), label: ui.navVoice }, + { href: localeHref('/voice/download/'), label: ui.subDownload }, + { href: localeHref('/voice/changelog/'), label: ui.subChangelog }, + { href: '/docs', label: ui.navDocs }, + { href: localeHref('/blog/'), label: ui.navBlog }, + { href: localeHref('/about/'), label: ui.footerAbout }, +]; let siteVersion: string; try { @@ -16,48 +27,72 @@ try { } --- -