fix(seo): replaceState nur bei abweichendem lng und Manifest auf Deutsch

Vermeidet unnötige History-Änderungen beim Seitenaufbau und stellt die
PWA-Beschreibung konsistent zu lang: 'de' bereit.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-30 20:55:14 +02:00
co-authored by Cursor
parent 2eb6551200
commit e73c078463
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -22,6 +22,9 @@ function setMeta(attr: 'name' | 'property', key: string, content: string) {
function syncLanguageUrl(lang: SeoLang) { function syncLanguageUrl(lang: SeoLang) {
const url = new URL(window.location.href) const url = new URL(window.location.href)
const currentLng = url.searchParams.get('lng')
if (currentLng && normalizeSeoLang(currentLng) === lang) return
url.searchParams.set('lng', lang) url.searchParams.set('lng', lang)
const next = `${url.pathname}${url.search}${url.hash}` const next = `${url.pathname}${url.search}${url.hash}`
window.history.replaceState({}, '', next) window.history.replaceState({}, '', next)
+1 -1
View File
@@ -51,7 +51,7 @@ export default defineConfig({
short_name: 'Daagbok', short_name: 'Daagbok',
lang: 'de', lang: 'de',
description: description:
'Digitales Yacht-Logbuch — E2E-verschlüsselt, offline-fähig. Digital yacht logbook — E2E encrypted, offline-capable PWA.', 'Digitales Yacht-Logbuch — E2E-verschlüsselt, offline-fähig.',
theme_color: '#1e293b', theme_color: '#1e293b',
background_color: '#0f172a', background_color: '#0f172a',
display: 'standalone', display: 'standalone',