Files
computer-playbook/tests/unit/python/utils
kevinveenbirkenbachandClaude Opus 5 27d59f4bd4 fix(i18n): check the script of short labels, not only of sentences
untranslated() is the one criterion that knows a catalog's script, and it
never fired. It returned False below LATIN_FLOOR = 6 words, while the
catalogs are mostly one- to four-word UI labels, so the guard sat above
its own corpus.

Measured across the 62 non-Latin catalogs: the floor condemns 0 entries.
Without it, 536, concentrated in the languages the model cannot write:

  av 99   as 92   ba 87   be 84   ab 84   am 56   bh 13

Every entry in the low-count tail was read before the floor was removed,
because that tail is where a false positive would live. There is none:

  ko 'Applications'            -> a refusal sentence from the model
  zh 'Updates & Package Mgmt'  -> the string plus a version changelog
  fa 'Cloud'                   -> 'Cloud' and a markdown rule
  ab 'Communication'           -> 'Comunicacion'

A word count was the wrong instrument. reason() consults this only after
an exact echo is ruled out, so for a non-Latin target, Latin text that
DIFFERS from the source cannot be a term the language keeps in English.
That distinction is what an earlier attempt at floor=2 lacked, which is
why it condemned 4053 entries including legitimate ones.

Scope, stated because the numbers invite a larger reading: this guards
the 62 non-Latin catalogs only. For the ~122 Latin-script languages a
wrong-language answer still passes, and catching those needs a detector
this repository does not have.

LATIN_FLOOR and its re-export are deleted rather than left at 1; nothing
else consumed them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-20 17:54:15 +02:00
..
…
…