Skip to content

is_noop calls a :ref: with display text markup, so its prose is never translated #54

Description

@tamnd

is_noop strips the markup and asks whether anything is left. For a role with display text there is prose inside the markup, and stripping takes it away with everything else.

Found while narrowing human_segments to skip code. One entry in the mirror is:

:ref:`Documentation on attributes and methods on classes <class-attrs-and-methods>`.

A person translated it correctly, rendering the display text and leaving the target alone:

:ref:`Tài liệu về các thuộc tính và phương thức trên lớp <class-attrs-and-methods>`.

The classifier calls it noop, which means two things. batch never queues it, so no model is ever asked. And Corpus.prose() skips it, so no check that reads a translation looks at it. It is only visible at all because it happens to be the one non-prose entry a human translated to something other than a copy of the source.

This is the failure the is_version_marker docstring describes, in a different rule: an entry that wants translating, classified as one that does not, invisible from every angle that would report it.

:ref:targetwith no display text is a genuine no-op and should stay one. The distinction is whether the role carries text a reader sees, which is text <target> `` inside the backticks, and P03 and `P06` already parse exactly that shape.

Not urgent on its own, one entry. Worth measuring first: the count of noop entries whose markup contains display text is the real size of this, and it is a lower bound on entries the pipeline will never translate and never report.

Activity

  1. tamnd commented on Aug 18, 2026

    @tamnd
    OwnerAuthor

    Measured against the pinned mirror, so the size is not a guess.

    139 noop entries carry role display text of two or more English words, 630 words in total. Every one is prose a reader sees, and none of them has ever been queued or checked.

    That is the lower bound. It counts two or more alphabetic words to keep single tokens out, since a one-word display text is often an identifier and would need the same judgement is_version_marker makes.

  2. tamnd commented on Aug 18, 2026

    @tamnd
    OwnerAuthor

    Shipped in #59, content tamnd/python-docs-vi-machine-translation#55.

    130 entries rather than the 139 this issue measured. The difference is how the words are counted, and the recount is the part worth keeping.

    Counting runs of [A-Za-z]{2,} over the display text finds 266 entries, and 136 of those are wrong. :c:member:base_exec_prefix <PyConfig.base_exec_prefix>`` is one identifier, and a pattern looking for runs of letters reads base, `exec` and `prefix` in it and calls that a sentence. Counting whole words between the spaces gives 130.

    That leaves 81 :c:member: entries with a one-word display text as no-ops, which is the same call is_version_marker makes about a bare token and deliberately the cautious one. A missed entry stays exactly as it is today. A false positive sends an identifier to a model to be translated into something that links nowhere.

    Where the 130 live:

    role entries
    :ref: 117
    :rfc: 6
    :term: 4
    :doc: 3
    :option: 2

    All 130 display strings were read rather than sampled, and there is no identifier among them: A logging cookbook, Basic Tutorial, Configurable memory allocators, Explanation of the object-oriented interface, Command Line Interface Libraries.

    prose 75,593 to 75,723, noop 5,721 to 5,591, batches 2,801 to 2,803. The audit does not move, which is the expected result: these entries were invisible to every check and are now untranslated, and an untranslated entry is not a finding. They will be queued on the next fleet run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions