glaterza commented on code in PR #44397:
URL: https://github.com/apache/superset/pull/44397#discussion_r4158991437
##########
scripts/translations/backfill_po.py:
##########
@@ -594,6 +643,8 @@ def _build_batch_items(
"index_key": entry.msgid,
"is_plural": False,
}
+ if note := _developer_note(entry):
Review Comment:
You're right. Before this PR the only extracted comment was the stamped
marker, so the loose phrase match was safe. Free-text notes broke that
assumption. Fixed in 4bbce5afc3.
An extracted comment now marks an entry do-not-translate only if it has the
exact `do-not-translate` line that `apply_do_not_translate.py` stamps. The
loose match still applies to translator comments, where the legacy ru `# Не
переводить` marker lives. Across the 30 catalogs, every extracted comment is
either that marker or an `i18n:` note, so nothing relied on the loose match
there.
Your example is now a test case, along with three other phrasings, a marker
next to a note (still honored), and an end-to-end case where an entry whose
note says "do not translate as the animal" reaches the translator and gets
filled. These tests fail on the previous code. The howtos also say that a note
only guides the translation, and point to the registry for strings that must
stay untranslated.
--
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]