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


##########
superset/translations/it/LC_MESSAGES/messages.po:
##########
@@ -1424,104 +1380,99 @@ msgstr "Importa"
 msgid "Align +/-"
 msgstr ""
 
-#, fuzzy
 msgid "Align +/- for all columns"
-msgstr "Mostra colonna"
+msgstr ""
 
 msgid "All"
 msgstr ""
 
-#, fuzzy, python-format
+#, python-format
 msgid "All %s hidden columns"
-msgstr "Colonna del Tempo"
+msgstr "Tutte le %s colonne nascoste"
 
 msgid "All Text"
 msgstr ""
 
 msgid "All charts"
-msgstr "Grafico a Proiettile"
+msgstr "Tutti i grafici"
 
 msgid "All charts/global scoping"
-msgstr ""
+msgstr "Tutti i grafici/ambito globale"
 
-#, fuzzy
 msgid "All dimensions"
-msgstr "descrizione"
+msgstr "Tutte le dimensioni"
 
 msgid "All filters"
-msgstr "Filtri"
+msgstr "Tutti i filtri"
 
 msgid "All panels"
-msgstr ""
+msgstr "Tutti i pannelli"
 
-#, fuzzy
 msgid "All records"
-msgstr "Grafico a Proiettile"
+msgstr "Tutti i record"
 
 msgid "Allow CREATE TABLE AS"
 msgstr "Permetti CREATE TABLE AS"
 
 msgid "Allow CREATE VIEW AS"
-msgstr "Permetti CREATE TABLE AS"
+msgstr "Permette CREATE TABLE AS"

Review Comment:
   **Suggestion:** This translation maps the `CREATE VIEW` permission label to 
`CREATE TABLE`, which changes the meaning of a security-sensitive setting in 
the UI and can mislead administrators into enabling the wrong capability. 
Translate it consistently with VIEW semantics. [logic error]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ Database security option mislabelled in Italian UI.
   - ⚠️ Admins may misconfigure CREATE VIEW permissions.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Open the database configuration form in the Italian UI (API schema for 
this field is
   described in `docs/static/resources/openapi.json:4032,4442,4558` as "Allow 
CREATE VIEW AS
   option in SQL Lab").
   
   2. The frontend renders the label for this boolean using the gettext msgid 
`Allow CREATE
   VIEW AS` (see OpenAPI description and associated React form components).
   
   3. In the Italian catalog 
`superset/translations/it/LC_MESSAGES/messages.po:1417-1418`,
   this msgid is translated as `Permette CREATE TABLE AS`, which refers to 
`CREATE TABLE`
   instead of `CREATE VIEW`.
   
   4. An Italian-speaking administrator enabling this option will think they 
are enabling
   `CREATE TABLE AS`, potentially misconfiguring security because the 
underlying flag
   actually controls `CREATE VIEW AS` capability.
   ```
   </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=342ec1be7b9d4164a96e964a37df3055&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=342ec1be7b9d4164a96e964a37df3055&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/it/LC_MESSAGES/messages.po
   **Line:** 1417:1418
   **Comment:**
        *Logic Error: This translation maps the `CREATE VIEW` permission label 
to `CREATE TABLE`, which changes the meaning of a security-sensitive setting in 
the UI and can mislead administrators into enabling the wrong capability. 
Translate it consistently with VIEW semantics.
   
   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%2F36114&comment_hash=1ef1b76189e169df1c27b9469a43bd3eafcbcee6e26bcbd5ab759e3b30910303&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F36114&comment_hash=1ef1b76189e169df1c27b9469a43bd3eafcbcee6e26bcbd5ab759e3b30910303&reaction=dislike'>👎</a>



##########
superset/translations/it/LC_MESSAGES/messages.po:
##########
@@ -7721,39 +7181,34 @@ msgstr ""
 
 #, python-format
 msgid "Invalid tab ids: %(tab_ids)s"
-msgstr ""
+msgstr "Id schede non validi: %s(tab_ids)"

Review Comment:
   **Suggestion:** The interpolation token is malformed: `"%s(tab_ids)"` is not 
a valid named placeholder for Python `%` formatting. This will raise a 
formatting error when the app passes a dict with `tab_ids`. Use the same 
placeholder shape as the source (`"%(tab_ids)s"`). [type error]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ❌ Report creation with invalid tabs crashes validation.
   - ⚠️ Users see generic errors instead of helpful messages.
   ```
   </details>
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Trigger report tab validation in 
`superset/superset/commands/report/base.py:160` by
   creating or updating a report with invalid tab IDs (e.g. a tab id that does 
not exist on
   the dashboard).
   
   2. The command constructs a validation error via `_("Invalid tab ids: 
%(tab_ids)s",
   tab_ids=str(invalid_tab_ids))`, which calls gettext with a named placeholder
   `%(tab_ids)s`.
   
   3. In the Italian locale catalog
   `superset/translations/it/LC_MESSAGES/messages.po:7183-7184`, the 
translation for this
   msgid is `Id schede non validi: %s(tab_ids)`, replacing the named 
placeholder with
   `%s(tab_ids)`.
   
   4. At runtime, gettext tries to interpolate the Italian string using the 
mapping
   `{'tab_ids': '...'}`; because the translation contains `%s` instead of 
`%(tab_ids)s`,
   Python's `%` operator looks for a key `'s'` in the dict, raising a 
`KeyError` and breaking
   error reporting for invalid tab IDs.
   ```
   </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=dc2f4abf6058402db52235d2e2578abe&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=dc2f4abf6058402db52235d2e2578abe&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/it/LC_MESSAGES/messages.po
   **Line:** 7183:7184
   **Comment:**
        *Type Error: The interpolation token is malformed: `"%s(tab_ids)"` is 
not a valid named placeholder for Python `%` formatting. This will raise a 
formatting error when the app passes a dict with `tab_ids`. Use the same 
placeholder shape as the source (`"%(tab_ids)s"`).
   
   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%2F36114&comment_hash=0b51d67bc1b36ee31d29b693c990ec5ff611ce340c4728f05b466b4e26b60c88&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F36114&comment_hash=0b51d67bc1b36ee31d29b693c990ec5ff611ce340c4728f05b466b4e26b60c88&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