Add locale peram in Drupal State.
5 unresolved threads
5 unresolved threads
Closes #3243643
Merge request reports
Activity
68 69 constructor({ 69 70 apiBase, 70 71 apiPrefix = 'jsonapi', 72 locale = 'en', changed this line in version 3 of the diff
6 6 const store: any = new DrupalState({ 7 7 apiBase: 'https://live-contentacms.pantheonsite.io', 8 8 apiPrefix: 'api', 9 locale: '', changed this line in version 3 of the diff
21 21 const store: DrupalState = new DrupalState({ 22 22 apiBase: 'https://live-contentacms.pantheonsite.io', 23 23 apiPrefix: 'api', 24 locale: '', changed this line in version 3 of the diff
77 81 const store: DrupalState = new DrupalState({ 78 82 apiBase: 'http://demo-decoupled-bridge.lndo.site', 79 83 apiPrefix: 'en/jsonapi', 84 locale: '', changed this line in version 3 of the diff
@abhisekmazumdar added a few comments - mostly pretty small changes. We also should have some test coverage for this as well. Maybe just
- A locale is honored if specified - maybe set locale to
es
in this test? - Locale can be optional. And if not provided it won't be used as part of the URL structure.
- A locale is honored if specified - maybe set locale to
added 3 commits
-
7cdc80f4...712023f2 - 2 commits from branch
project:1.0.x
- 7ab87b68 - Add locale peram in Drupal State.
-
7cdc80f4...712023f2 - 2 commits from branch
added 2 commits
240 } 241 ); 242 expect( 243 await store.getObject({ 244 objectName: 'node--page', 245 id: '04fe66ed-1161-47f4-8a3f-6450eb9a8fa9', 246 query: `{ 247 title 248 id 249 }`, 250 }) 251 ).toEqual(nodePageSpanishResourceQueryObject); 252 expect(fetchMock).toBeCalledTimes(1); 253 }); 254 255 test("Locale not provided it won't be used as part of URL structure", async () => { added 2 commits
Please register or sign in to reply