@bleedingdev/modern-js-plugin-i18n 3.2.0-ultramodern.31 → 3.2.0-ultramodern.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "modern",
18
18
  "modern.js"
19
19
  ],
20
- "version": "3.2.0-ultramodern.31",
20
+ "version": "3.2.0-ultramodern.36",
21
21
  "engines": {
22
22
  "node": ">=20"
23
23
  },
@@ -87,15 +87,15 @@
87
87
  "i18next-fs-backend": "^2.6.6",
88
88
  "i18next-http-backend": "^4.0.0",
89
89
  "i18next-http-middleware": "^3.9.7",
90
- "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.2.0-ultramodern.31",
91
- "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.2.0-ultramodern.31",
92
- "@modern-js/server-runtime": "npm:@bleedingdev/modern-js-server-runtime@3.2.0-ultramodern.31",
93
- "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.31",
94
- "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.31",
95
- "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.31"
90
+ "@modern-js/runtime-utils": "npm:@bleedingdev/modern-js-runtime-utils@3.2.0-ultramodern.36",
91
+ "@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.2.0-ultramodern.36",
92
+ "@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.36",
93
+ "@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.36",
94
+ "@modern-js/server-runtime": "npm:@bleedingdev/modern-js-server-runtime@3.2.0-ultramodern.36",
95
+ "@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.36"
96
96
  },
97
97
  "peerDependencies": {
98
- "@modern-js/runtime": "3.2.0-ultramodern.31",
98
+ "@modern-js/runtime": "3.2.0-ultramodern.36",
99
99
  "i18next": ">=25.7.4",
100
100
  "react": "^19.2.6",
101
101
  "react-dom": "^19.2.6",
@@ -120,8 +120,8 @@
120
120
  "react-dom": "^19.2.6",
121
121
  "react-i18next": "17.0.8",
122
122
  "ts-jest": "^29.4.11",
123
- "@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.2.0-ultramodern.31",
124
- "@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.2.0-ultramodern.31"
123
+ "@modern-js/app-tools": "npm:@bleedingdev/modern-js-app-tools@3.2.0-ultramodern.36",
124
+ "@modern-js/runtime": "npm:@bleedingdev/modern-js-runtime@3.2.0-ultramodern.36"
125
125
  },
126
126
  "sideEffects": false,
127
127
  "publishConfig": {
@@ -162,6 +162,40 @@ describe('localisedUrls', () => {
162
162
  ),
163
163
  ).toBe('/products/cervena-bota');
164
164
  });
165
+
166
+ test('resolves nested optional route params with translated ancestors', () => {
167
+ const localisedUrls = {
168
+ '/checkout': {
169
+ en: '/checkout',
170
+ cs: '/pokladna',
171
+ },
172
+ '/checkout/thank-you': {
173
+ en: '/checkout/thank-you',
174
+ cs: '/pokladna/dekujeme',
175
+ },
176
+ '/checkout/thank-you/:orderId?': {
177
+ en: '/checkout/thank-you/:orderId?',
178
+ cs: '/pokladna/dekujeme/:orderId?',
179
+ },
180
+ };
181
+
182
+ expect(
183
+ resolveLocalisedPath(
184
+ '/checkout/thank-you',
185
+ 'cs',
186
+ ['en', 'cs'],
187
+ localisedUrls,
188
+ ),
189
+ ).toBe('/pokladna/dekujeme');
190
+ expect(
191
+ resolveLocalisedPath(
192
+ '/pokladna/dekujeme/ABC-123',
193
+ 'en',
194
+ ['en', 'cs'],
195
+ localisedUrls,
196
+ ),
197
+ ).toBe('/checkout/thank-you/ABC-123');
198
+ });
165
199
  });
166
200
 
167
201
  describe('i18n server API prefix skips', () => {