tapomoyadhikari commented on issue #42433:
URL: https://github.com/apache/superset/issues/42433#issuecomment-5083164707

   Thanks for the investigation. I think the root cause is simpler than the 
language-pack endpoint path.
   
   `embedded/index.tsx` already receives `bootstrapData.common.language_pack`, 
but it does not run the same initialization as the main app bootstrap 
(`preamble.ts`).
   
   The fix should be to mirror that setup before rendering:
   
   ```ts
   configure({
     languagePack: bootstrapData.common.language_pack,
   });
   
   dayjs.locale(bootstrapData.common.locale);
   ````
   
   The embedded app loads the bootstrap data but never passes the language pack 
to `@superset-ui/core`, so i18n stays on the default English catalog.
   
   I don't think the `/superset/language_pack/<locale>/` fetch or guest token 
path is needed here as the language pack is already available in the bootstrap 
payload. Restoring the missing initialization should make embedded dashboards 
behave like the regular SPA.
   
   It may also be worth comparing the embedded bootstrap flow with the main app 
flow more broadly, since this looks like another case of embedded entry points 
missing shared initialization.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to