bito-code-review[bot] commented on code in PR #41651:
URL: https://github.com/apache/superset/pull/41651#discussion_r3509915812
##########
scripts/translations/backfill_po.py:
##########
@@ -647,6 +701,15 @@ def backfill(
missing: list[polib.POEntry] = [e for e in cat if e.msgid and
_is_missing(e)]
print(f"Found {len(missing)} untranslated entries for '{lang}'.",
file=sys.stderr)
+ skipped_dnt = [e for e in missing if _is_do_not_translate(e)]
+ if skipped_dnt:
+ missing = [e for e in missing if not _is_do_not_translate(e)]
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Missing integration test for DNT filtering</b></div>
<div id="fix">
The `_is_do_not_translate` function has 3 unit tests verifying its logic in
isolation (lines 444-464), but no integration test validates that DNT entries
are actually skipped when the `backfill()` function runs end-to-end. Without an
integration test, regressions in the filter logic (e.g., the filter being
applied at the wrong stage, or not being applied at all) would go undetected
until the script runs against real `.po` files.
</div>
</div>
<small><i>Code Review Run #502ef6</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]