codeant-ai-for-open-source[bot] commented on code in PR #39667:
URL: https://github.com/apache/superset/pull/39667#discussion_r3415795883


##########
superset-frontend/src/hooks/useLocale.ts:
##########
@@ -45,6 +46,7 @@ export const LOCALE_MAPPING = {
   es: () => import('antd/locale/es_ES'),
   it: () => import('antd/locale/it_IT'),
   zh: () => import('antd/locale/zh_CN'),
+  zh_TW: () => import('antd/locale/zh_TW'),

Review Comment:
   **Suggestion:** Replace this direct `antd` locale import with an approved 
locale source exposed via `@superset-ui/core` (or an approved wrapper module) 
so UI locale loading does not depend on `antd` paths directly. [custom_rule]
   
   **Severity Level:** Minor ⚠️
   <details>
   <summary><b>Why it matters? 🤔 </b></summary>
   
   The final file still directly imports an Ant Design locale module via 
`antd/locale/zh_TW` in frontend UI code. This matches the custom rule 
prohibiting direct Ant Design imports, so the suggestion identifies a real 
violation.
   </details>
   
   [![Fix in 
Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=95748a70d36644ada432fb6d6516496f&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
 [![Fix in VSCode 
Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=95748a70d36644ada432fb6d6516496f&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   
   *(Use Cmd/Ctrl + Click for best experience)*
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/src/hooks/useLocale.ts
   **Line:** 49:49
   **Comment:**
        *Custom Rule: Replace this direct `antd` locale import with an approved 
locale source exposed via `@superset-ui/core` (or an approved wrapper module) 
so UI locale loading does not depend on `antd` paths directly.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve 
this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask 
user if the user wants to fix the rest of the comments as well. if said yes, 
then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39667&comment_hash=eadd4ef92c0346cd6e000f2aa86c096375cbf8567bd674c4536a7efd0255de9e&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F39667&comment_hash=eadd4ef92c0346cd6e000f2aa86c096375cbf8567bd674c4536a7efd0255de9e&reaction=dislike'>👎</a>



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