You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/02/06 01:15:40 UTC

Re: [PR] fix(i18n): Fix menu bar translations not updating on language change [superset]

rusackas commented on PR #34565:
URL: https://github.com/apache/superset/pull/34565#issuecomment-3857275270

   ## PR Rebased and Improved
   
   Rebased onto latest master and made improvements based on review feedback.
   
   ### Changes Made
   
   1. **Fixed locale parsing edge case** (CodeAnt-AI feedback)
      - Now handles both underscore (`en_US`) and hyphen (`en-US`) locale formats
      - Uses `locale.replace("-", "_").split("_")[0]` for robust language extraction
   
   2. **Improved tests**
      - Converted to flat `test()` pattern per project guidelines
      - Added parametrized tests covering various locale formats
      - Added type hints to test functions
   
   3. **Cleaned up branch**
      - Rebased onto current master (was significantly diverged)
      - Squashed into single clean commit
   
   ### Regarding Other Review Comments
   
   **CodeAnt-AI: "Cache / user mismatch"** - This is a pre-existing issue in the codebase where the function is keyed by `user_id` but uses `g.user` internally. While valid, it's out of scope for this fix which specifically addresses locale caching. Could be addressed in a follow-up PR.
   
   **Korbit-AI: "Unsafe Locale String Splitting"** - This was already addressed in the original PR, and I've further improved it to handle hyphen-separated locales as well.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org