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: [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