Skip to content

A language folder is drafted from the English master, and proved complete - #619

Open
maximsan wants to merge 3 commits into
mainfrom
feat/draft-a-language-folder
Open

maximsan wants to merge 3 commits into
mainfrom
feat/draft-a-language-folder

Conversation

@maximsan

Copy link
Copy Markdown
Owner

Why

The drafting half of the translation step — ADR-0026's three jobs: draft a
language folder, mark it complete, queue what has gone stale. Closes #603.

The words are agent-drafted, so the tool does the bookkeeping around them:
plan writes a queue of every piece of prose that is absent or stale, an agent
fills each text, apply writes the folder with a fingerprint per field, and
check refuses to call a language complete while anything is missing.

Watch for

  • Two bugs found on the way, both fixed here, both live. A Polish folder
    whose aliases held kawa, kawy, kawie, kawę was refused at startup — the
    overlay wanted every translated list to match English's length, which
    contradicts ADR-0025's "ten forms where English needs three". And
    card_kind_help was the one bank whose entries had no id, so no folder
    could ever land on it, which made ADR-0026's complete unreachable. Its
    id is additive, so no schema bump.
  • A register decides which strings are words and which are keys, and
    anything it does not name is prose. That default is the safe one for words
    and the wrong one for a key, so translatable_fields_test.dart fails when a
    string that reads like a key is heading for translation — checked by
    deleting an entry and watching it go red, not by assuming.
  • An answer held as one of its options' words follows that option.
    fill[].a and bagpick's answer are values, not indices, so translating the
    options alone would leave every one of those cards unanswerable, silently.
    choices[] needs nothing: it carries correct on the choice itself.
  • Two judgement calls a reviewer could take differently. latin is left
    English on the grounds that a Latin name is the same in every language, and
    moduleLabel is translated as prose even though the extractor derives it
    from a module's own words — so a language that translates one and not the
    other could disagree with itself. Neither is ruled anywhere.
  • The tool counts 4,654 pieces of prose for a language; the map's own
    estimate is ~4,700, which is the closest thing to an independent check that
    the register draws the line in the right place.

Not here

No language folder ships: this is the tool, not Polish. assets/content/l10n/
stays empty, and the completeness test passes over whatever is there.

Checks

A full round trip against the real banks, outside the suite: 4,654 queued,
filled with marker text, applied, check green — then every written bank
overlaid onto its master through the app's own overlayTranslations without a
refusal. The synthetic folder was deleted afterwards.

The overlay refused any translated list whose length differed from the
master's. That rule landed to stop translated prose lists replacing English
silently, and caught aliases as collateral: ADR-0025 makes a term's aliases
its inflected forms — ten in Polish where English needs three — so a correct
Polish folder threw at startup.

Aliases are search keys rather than prose, which is the distinction ADR-0025
already draws, so they set their own length and every other list still has
to match the master's.
…d complete

The tool ADR-0026 asks for: plan queues every piece of prose that is absent
or stale, apply writes the folder with a fingerprint per field, and check
refuses to call a language complete while anything is missing. The words
themselves are agent-drafted, so plan writes the queue and apply reads it
back — no translation engine is wired in.

A register says which strings are words and which are keys; anything it does
not name is prose, and a test fails when a string that reads like a key is
heading for translation. Two couplings it has to respect: an answer held as
one of its options' words follows that option into the language, and a term's
aliases set their own length.

card_kind_help gained an id. A folder lands on a bank entry by entry by id,
so the one bank without one could not be translated at all.
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.

Draft a language folder from the English master

1 participant