codeant-ai-for-open-source[bot] commented on code in PR #41984: URL: https://github.com/apache/superset/pull/41984#discussion_r3584417027
########## superset/translations/ja/LC_MESSAGES/messages.po: ########## @@ -16204,6 +15775,8 @@ msgid "" "You need access to the following tables: %(tables)s, " "'all_database_access' or 'all_datasource_access' permission" msgstr "" +"テーブルへの以下のアクセス権が必要です:%(tables)s" +"(「all_database_access」または「all_datasource_access)" Review Comment: **Suggestion:** The translated message is truncated and has unbalanced punctuation/quotes, which will render a broken user-facing permission error and hide part of the original instruction. Complete the sentence and fix the unmatched quote/parenthesis so the message faithfully conveys both required permissions. [typo] <details> <summary><b>Severity Level:</b> Major ⚠️</summary> ```mdx ⚠️ Japanese users see broken table-permission error message. ⚠️ Guidance on required permissions truncated and unclear. ⚠️ Security denial message harder for admins to interpret. ``` </details> <details> <summary><b>Steps of Reproduction ✅ </b></summary> ```mdx 1. In `superset/security/manager.py:1788-1815`, note `get_table_access_error_msg()` builds a translated error message via `_()` using msgid `"You need access to the following tables: %(tables)s, 'all_database_access' or 'all_datasource_access' permission"` and returns it to `get_table_access_error_object()` which is used in `raise SupersetSecurityException(...)` at `manager.py:3863`. 2. In the Japanese catalog `superset/translations/ja/LC_MESSAGES/messages.po` around lines 15778-15779 (verified via grep/read), the `msgstr` for that msgid is split across two lines as `"テーブルへの以下のアクセス権が必要です:%(tables)s"` and `"(「all_database_access」または「all_datasource_access)"`, leaving the closing Japanese quote/parenthesis and the final “permission” portion missing. 3. Run Superset with `LANG=ja` (Japanese locale) and connect a user that lacks table permissions so `get_table_access_error_object()` is triggered (for example, open SQL Lab, run a query that references a table the user cannot access, causing `denied` to be non-empty and `raise SupersetSecurityException(self.get_table_access_error_object(denied))` at `manager.py:3858-3867`). 4. Observe the user-facing error text in the Japanese UI: the message is truncated after the table list, followed by a dangling `"(「all_database_access」または「all_datasource_access)"` fragment with unmatched closing quote/parenthesis and missing context about required permissions, confirming a broken and incomplete permission error caused by the current `msgstr` formatting. ``` </details> [](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=a3e7e9bfa5a04f43a7d6c7530e9e9046&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=a3e7e9bfa5a04f43a7d6c7530e9e9046&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/translations/ja/LC_MESSAGES/messages.po **Line:** 15778:15779 **Comment:** *Typo: The translated message is truncated and has unbalanced punctuation/quotes, which will render a broken user-facing permission error and hide part of the original instruction. Complete the sentence and fix the unmatched quote/parenthesis so the message faithfully conveys both required permissions. 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%2F41984&comment_hash=74c7da4d8df19f3d1d35b9cd0a9a1581494446fe4b1a85ef9877ca8f51720b91&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F41984&comment_hash=74c7da4d8df19f3d1d35b9cd0a9a1581494446fe4b1a85ef9877ca8f51720b91&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]
