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


##########
superset/translations/fa/LC_MESSAGES/messages.po:
##########
@@ -10463,7 +10463,7 @@ msgstr "در حال اجرا"
 
 #, fuzzy, python-format

Review Comment:
   **Suggestion:** The translation entry for this Python-format string is still 
marked as "fuzzy", which means msgfmt will ignore the provided Farsi `msgstr` 
and the application will continue to show the English text at runtime; remove 
the `fuzzy` flag so the new translation is actually used. [logic error]
   
   <details>
   <summary><b>Severity Level:</b> Major ⚠️</summary>
   
   ```mdx
   - ⚠️ Farsi UI shows English text for query progress.
   - ⚠️ SQL Lab localization appears incomplete to Farsi users.
   ```
   </details>
   
   ```suggestion
   #, python-format
   ```
   <details>
   <summary><b>Steps of Reproduction ✅ </b></summary>
   
   ```mdx
   1. Build or run Superset with the Farsi locale enabled and compiled from
   `superset/translations/fa/LC_MESSAGES/messages.po` (the `.mo` is generated 
by `msgfmt`,
   which ignores entries marked `#, fuzzy`).
   
   2. From the UI, navigate to SQL Lab and run a query that is executed in 
blocks so that the
   server-side code calls the gettext key `msgid "Running block %(block_num)s 
out of
   %(block_count)s"` (the translatable string present at
   `superset/translations/fa/LC_MESSAGES/messages.po:10465`).
   
   3. When the progress status is rendered, gettext looks up that msgid in the 
Farsi catalog,
   but because the entry is tagged `#, fuzzy` on line `10464`, the compiled 
catalog does not
   use the provided `msgstr` and falls back to the English `msgid`.
   
   4. Observe in the Farsi UI that the progress message still appears as 
`Running block 1 out
   of 3` (English) instead of the translated Persian text `"در حال اجرای بیانیه 
%(block_num)s
   از %(block_count)s"`, confirming that the fuzzy flag is preventing the 
translation from
   being applied.
   ```
   </details>
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset/translations/fa/LC_MESSAGES/messages.po
   **Line:** 10464:10464
   **Comment:**
        *Logic Error: The translation entry for this Python-format string is 
still marked as "fuzzy", which means msgfmt will ignore the provided Farsi 
`msgstr` and the application will continue to show the English text at runtime; 
remove the `fuzzy` flag so the new translation is actually used.
   
   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.
   ```
   </details>
   <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38494&comment_hash=af68729b0d0c46fe966efdf66703e3912c0905284df044491a810a75c15aaf36&reaction=like'>👍</a>
 | <a 
href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F38494&comment_hash=af68729b0d0c46fe966efdf66703e3912c0905284df044491a810a75c15aaf36&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