Skip to content

Mark 67 code entries as copied rather than translated - #53

Merged
tamnd merged 1 commit into
mainfrom
code-blocks-with-openers-and-comments
Aug 18, 2026
Merged

Mark 67 code entries as copied rather than translated#53
tamnd merged 1 commit into
mainfrom
code-blocks-with-openers-and-comments

Conversation

@tamnd

@tamnd tamnd commented Aug 18, 2026

Copy link
Copy Markdown
Owner

Built with pydocvi 0.1.8 (tamnd/python-docs-vi-translator#55 and #56).

The block rule now reads three more shapes of code, so 67 entries move out of prose:

def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):
parrot(1000)                                          # 1 positional argument
parrot('a million', 'bereft of life', 'jump')

A signature quoted without its body, a line with a comment on the end, and a call whose arguments are quoted strings. All 67 were read one at a time before the rule shipped and there is no prose among them.

Five entries here had been sitting translated and not fuzzy with nothing behind them, because the segments that explained them left the memory when the classifier got stricter. S04 reported all five. They now carry # pydocvi: passthrough=literal_block. The text is unchanged, because it was already the source byte for byte, which is what L01 was reporting them for.

The rest of the diff is the header stamp and the writer's line wrapping on the entries it rewrote. No translated string changes in this PR.

Audit

check before after
S04 no unmarked machine translation 5 0
A01 the coverage report is current 4 0
L01 the translation is in Vietnamese 9 4
L02 no entry is the English verbatim 144 139
total findings 1,459 1,439
checks passing 28 of 41 30 of 41
hard checks failing 6 4

L01's remaining 4 are 3 copyright notices and a transcript of a Monty Python sketch. Both are policy questions about what should be translated at all, not defects.

pydocvi 0.1.8. The block rule reads three more shapes of code: a signature
quoted without its body, a line with a comment on the end, and a call whose
arguments are quoted strings. 67 entries move out of prose, and apply now
copies a code entry before asking whether a person signed it.

Five entries had been sitting here translated and not fuzzy with nothing
behind them, because the segments that explained them left the memory when
the classifier got stricter. S04 reported all five. They now carry
`# pydocvi: passthrough=literal_block` and say where the text came from. The
text itself is unchanged, because it was already the source byte for byte,
which is what L01 was reporting them for.

The rest of the diff is the header stamp and the writer's line wrapping on
the entries it rewrote.

Audit: 1,439 findings, 30 of 41 checks passing, 4 hard checks failing, down
from 1,459 and 6. S04 5 to 0 and A01 4 to 0 in the same run. L01 9 to 4, and
the 4 left are 3 copyright notices and a Monty Python sketch, both of which
are policy questions rather than bugs. L02 144 to 139.
@tamnd
tamnd merged commit 385f78a into main Aug 18, 2026
1 check failed
@tamnd
tamnd deleted the code-blocks-with-openers-and-comments branch August 18, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant