Fix: correct <html lang> and localize the <head> description per locale
The root (main)/layout renders <html> ABOVE the [locale] segment, so next-intl's getLocale() returns the default locale there - emitting <html lang="en"> on every page regardless of UI language (e.g. /de) and a hardcoded English <head> description. Both are strong "translate this page" triggers in Chrome. proxy.ts already exposes the nonce to server components via the x-middleware-request-* mechanism; expose the request pathname the same way as x-pathname, and have the root layout derive the locale from it (falling back to getLocale() when the path has no locale segment) for both <html lang> and the localized meta_description (new key in all 17 locales; the English value is unchanged).
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"meta_description": "JMAP protokolünü kullanan minimalist web posta istemcisi",
|
||||
"login": {
|
||||
"title": "Webmail",
|
||||
"username_label": "E-posta",
|
||||
|
||||
Reference in New Issue
Block a user