Add Scandinavian i18n (da/sv/nb) via DeepL pipeline.

Integrate new locale bundles, language cycling in the UI, SEO hreflang tags, and localized beta flyer HTML variants with scripts for batch translation and key validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-31 15:53:43 +02:00
parent 2e656dc6b2
commit 3749f87c1d
30 changed files with 3975 additions and 42 deletions
+21
View File
@@ -0,0 +1,21 @@
import { describe, expect, it } from 'vitest'
import { getNextLanguage, normalizeAppLanguage, SUPPORTED_LANGUAGES } from './i18nLanguages.js'
describe('i18nLanguages', () => {
it('normalizes regional tags to supported base codes', () => {
expect(normalizeAppLanguage('de-DE')).toBe('de')
expect(normalizeAppLanguage('nb-NO')).toBe('nb')
expect(normalizeAppLanguage('xx')).toBe('en')
})
it('cycles through all supported languages', () => {
let current: string = 'de'
const seen = new Set<string>()
for (let i = 0; i < SUPPORTED_LANGUAGES.length; i++) {
seen.add(current)
current = getNextLanguage(current)
}
expect(seen.size).toBe(SUPPORTED_LANGUAGES.length)
expect(current).toBe('de')
})
})