codeant-ai-for-open-source[bot] commented on PR #34565:
URL: https://github.com/apache/superset/pull/34565#issuecomment-4009020347
## **Sequence Diagram**
Shows the main flow where the frontend language change causes the backend to
convert the Locale to a stable string, use it as a cache key, extract the
language, and rebuild menu translations so the UI updates correctly.
```mermaid
sequenceDiagram
participant Client
participant Backend
participant CacheLayer
participant MenuBuilder
Client->>Backend: Request SPA payload after language change
Backend->>Backend: get_locale() -> str(locale) (normalize
hyphen/underscore)
Backend->>CacheLayer: cached_common_bootstrap_data(user_id, locale_str)
CacheLayer-->>Backend: (miss/hit ensures stable key using string)
Backend->>MenuBuilder: Extract language from locale_str and build
menu_data(language)
MenuBuilder-->>Backend: localized menu_data
Backend-->>Client: Return updated bootstrap payload (menu translations)
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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]