From 7602bfdb2132df8e29717d93a8c957529a389add Mon Sep 17 00:00:00 2001 From: KoalaDev <6156589+Shik3i@users.noreply.github.com> Date: Thu, 25 Jun 2026 04:21:02 +0200 Subject: [PATCH] fix: preserve language in cross-links, add og:locale + Organization schema to alternatives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix cross-links on teleparty↔screen-sharing pages: use {{LANG_PREFIX}} so German page links stay German, etc. - Add og:locale meta tag with correct locale code per language (e.g. en_US, de_DE, fr_FR, ja_JP, zh_CN, uk_UA) - Add Organization schema.org JSON-LD block alongside existing BreadcrumbList on all 3 alternatives templates --- website/alternatives/index.html | 16 ++++++++++++++++ website/alternatives/screen-sharing.html | 18 +++++++++++++++++- website/alternatives/teleparty.html | 18 +++++++++++++++++- website/build.cjs | 9 +++++++++ 4 files changed, 59 insertions(+), 2 deletions(-) diff --git a/website/alternatives/index.html b/website/alternatives/index.html index 623ae18..1aca346 100644 --- a/website/alternatives/index.html +++ b/website/alternatives/index.html @@ -35,6 +35,7 @@ + @@ -64,6 +65,21 @@ } + + + diff --git a/website/alternatives/screen-sharing.html b/website/alternatives/screen-sharing.html index 54dee7f..75f5eaf 100644 --- a/website/alternatives/screen-sharing.html +++ b/website/alternatives/screen-sharing.html @@ -35,6 +35,7 @@ + @@ -70,6 +71,21 @@ } + + + @@ -173,7 +189,7 @@
{{ALT_TRY_KOALASYNC}}

- {{ALT_TELEPARTY_TITLE}} + {{ALT_TELEPARTY_TITLE}}

diff --git a/website/alternatives/teleparty.html b/website/alternatives/teleparty.html index c769d37..ee8d9b3 100644 --- a/website/alternatives/teleparty.html +++ b/website/alternatives/teleparty.html @@ -35,6 +35,7 @@ + @@ -70,6 +71,21 @@ } + + + @@ -173,7 +189,7 @@
{{ALT_TRY_KOALASYNC}}

- {{ALT_SCREEN_TITLE}} + {{ALT_SCREEN_TITLE}}

diff --git a/website/build.cjs b/website/build.cjs index e6b04ad..902e9a9 100644 --- a/website/build.cjs +++ b/website/build.cjs @@ -215,6 +215,15 @@ async function compile() { compiled = compiled.replace(/\{\{ALT_INDEX_TITLE\}\}/g, indexTitle); compiled = compiled.replace(/\{\{ALT_INDEX_META_DESC\}\}/g, indexDesc); + // og:locale mapping for Facebook + const ogLocales = { + en: 'en_US', de: 'de_DE', fr: 'fr_FR', es: 'es_ES', + 'pt-BR': 'pt_BR', ru: 'ru_RU', it: 'it_IT', pl: 'pl_PL', + tr: 'tr_TR', nl: 'nl_NL', ja: 'ja_JP', ko: 'ko_KR', + zh: 'zh_CN', uk: 'uk_UA', pt: 'pt_PT' + }; + compiled = compiled.replace(/\{\{OG_LOCALE\}\}/g, ogLocales[lang] || 'en_US'); + // Merge locale with English fallback for keys not present in current locale const mergedLocale = { ...englishLocale, ...locale }; for (const [key, value] of Object.entries(mergedLocale)) {