mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-09-03 14:37:55 +00:00
fix: preserve language in cross-links, add og:locale + Organization schema to alternatives
- 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
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user