Skip to content

fix: meta language resolution and key leak - #105

Merged
Flash303 merged 2 commits into
mainfrom
dev
Oct 11, 2026
Merged

Flash303 merged 2 commits into
mainfrom
dev

Conversation

@Flash303

Copy link
Copy Markdown
Owner

This pull request improves the handling of SEO meta translations across the frontend by introducing a new translateMeta function that ensures no untranslated i18n keys appear in SEO tags, and by updating how the language is resolved for meta generation. It also updates all static and dynamic pages to use this safer translation method for their meta titles and descriptions.

SEO Meta Translation Improvements:

  • Added translateMeta to seo-meta.ts, which guarantees that meta translations never return raw i18n keys and always fallback to a supported language or an empty string if no translation is available. This prevents untranslated keys from appearing in SEO-relevant tags.
  • Updated siteTitle and all usages of meta descriptions and titles in static and dynamic pages to use translateMeta instead of the regular translate function, ensuring consistent and safe SEO strings. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Language Resolution Consistency:

  • Improved the resolveMetaLanguage function to correctly extract the language from loaderData (not data) in React Router matches, and to validate that the resolved language is supported, defaulting to French if not. [1] [2]

Refactoring and Consistency:

  • Refactored imports and usages throughout all affected pages (LegalNotice, Privacy, Terms, Compare, Home, ServerDetail, root.tsx) to consistently use the new translation and language resolution utilities. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

@Flash303
Flash303 merged commit 7285c38 into main Oct 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant