neuer checkout-pfad: /de/bestellen/paketID und /en/checkout/PackageID

This commit is contained in:
Codex Agent
2025-12-20 16:17:21 +01:00
parent 18297aa3f1
commit 6500b8df2c
18 changed files with 331 additions and 345 deletions

View File

@@ -18,6 +18,13 @@ describe('buildLocalizedPath', () => {
expect(buildLocalizedPath('/contact?ref=ad', 'de', supported)).toBe('/de/kontakt?ref=ad');
});
it('rewrites localized prefixes with dynamic segments', () => {
expect(buildLocalizedPath('/bestellen/123', 'en', supported, 'de', defaultLocaleRewrites))
.toBe('/en/checkout/123');
expect(buildLocalizedPath('/checkout/123', 'de', supported, 'de', defaultLocaleRewrites))
.toBe('/de/bestellen/123');
});
it('falls back to default locale when target not supported', () => {
expect(buildLocalizedPath('/demo', 'fr', supported)).toBe('/de/demo');
});