Let the glossary decide which single words L02 leaves alone - #57
Merged
Conversation
L02 asks whether a translation is the English handed back, and for an entry reading `sys` the answer is yes and it is the right answer. Narrowing the identifier rule put 6 558 single-word entries into prose for the first time and took this check from 10 findings to 144, a third of which were index entries naming a module or a statement that a reviewer correctly left in English. Nothing in the string separates those from `module`, `object` and `type`, which are the other side of the same list, ordinary English words used as index categories and sitting untranslated. `sys` and `Notes` are the same shape. So the decision is made once in the glossary, where `keep_en` already means it, and L02 skips an entry whose whole msgid is a kept term. G03 then checks that term in both directions. Matched on the whole msgid rather than on a substring. A kept term inside a sentence says nothing about whether the sentence was translated. On the corpus: L02 139 to 85, G03 81 to 95, G02 191 to 190, G04 143 to 142. 54 fewer rather than the 38 the issue predicted. The glossary already held `type` and `Boolean` as kept and the issue's triage had counted those 16 as real findings. The glossary wins because it is the written decision, and the disagreement is now visible rather than being an argument nobody was having.
Closed
3 tasks
Owner
Author
|
Correcting the table in the description. Those numbers were measured with an Measured on what actually shipped, content tamnd/python-docs-vi-machine-translation#54:
53 fewer The rest of the description holds. |
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #49, the tool half of it. The glossary half is content tamnd/python-docs-vi-machine-translation#54.
Narrowing the identifier rule in #47 put 6,558 single-word entries into
Corpus.prose()for the first time and tookL02from 10 findings to 144. A third of those were entries readingsys,builtins,import,exec,NaNandInfinity. Each one is a Sphinx index entry naming a module or a statement, and a reviewer left it in English because that is what a Vietnamese programmer calls it.Nothing in the string separates those from
module,objectandtype, which are the other side of the same list: ordinary English words used as index categories, sitting untranslated.sysandNotesare the same shape, and that is precisely the discrimination #47 established the classifier cannot make.So the decision is made once, by hand, in the glossary, where
keep_enalready means it.L02now skips an entry whose wholemsgidis a kept term, andG03checks that term in both directions instead. A written decision rather than an exception buried in a check.Matched on the whole
msgid, not on a substring: a kept term inside a sentence says nothing about whether the sentence was translated.Measured on the real corpus
54 fewer
L02findings, not the 38 the issue predicted, and the extra 16 are worth naming. The glossary already heldtypeandBooleanas kept, and the issue's triage had counted those 16 entries as real findings. The glossary and the triage disagree, the glossary wins because it is the written decision, and the disagreement is now visible instead of being an argument nobody was having. Filed as #58.The 14 new
G03findings are the other direction: entries where a kept term appears in prose and the translation rendered it in Vietnamese anyway.sysishệ thốngin some entries andsysin others, so the corpus says both, andG03is now the place that says so.Checks
make checkgreen, 1,403 tests, 97.45 per cent coverage.H03clean.