Repository navigation
fix(translations): 22 Hungarian atlas strings still render in English - #784
Conversation
A Hungarian visitor saw `Free Meditation Classes` as the atlas heading and filled in a form labelled `Your name` / `Your email` / `Register`. The whole registration form, its three validation errors, the country list's own heading and six event strings were sitting in `data.hu.json` as English. `_meta.omitted_keys` says a key with no translation is omitted, never blank, so the English merge (#705) serves it openly. An English value inside the file is the failure that rule exists to prevent: the merge cannot tell it apart from a real translation, so nothing downstream reports it. Two choices worth naming, both taken from the file's own conventions rather than from the English: - **Placeholders stay uninflected.** Hungarian marks case on the noun, so `Every %{weekday}` cannot be rendered as `Minden %{weekday}` — `kedd` would need `kedden`. The file already dodges this with a colon (`weekly_n`: `%{interval} hetente: %{weekday}`, `distance_from_place`: `%{distance} innen: %{place}`), so `weekly_1` and `weekly_2` follow it, and `hosted_from` becomes `Közvetítve innen: %{city}`. - **Formal register in `registration.*` and `event.display.*`**, matching `registration.questions` (`Gyakorolt már…`) and `contact_to_join_full` (`…keresse a szervezőt`), which were already formal. Vocabulary is reused where the file had already settled it: `alkalom` for a session (`first_session`, `next_session`), `Ingyenes meditációs órák` for the heading (already `common.chrome.widget_label`), `e-mail-cím` for the address (already `common.report_errors.email`). The three keys #782 excludes on purpose are untouched: `filters.dates.pill_range` (a format string identical in all ten locales) and `filters.format.online` / `event.display.online` (`Online` is the Hungarian word too). Nothing under `src/` changes. Closes #782 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WgJbtZDmrFcu9q8Yha5Wjs
Scope note: these five are beyond #782's list of 22, and are the same defect. #782 found its 22 by comparing each Hungarian value to its English counterpart for equality. `event.recurrence.monthly_1st` through `monthly_4th` and `monthly_last` are English text that differs from `data.en.json` only in capitalisation — `1st %{weekday} of Every Month` against `1st %{weekday} of every month` — so exact equality did not see them, and the ticket's table does not list them. They render in English to a Hungarian visitor exactly as the other 22 did, which is what the ticket's title is about. Leaving them would ship a file still holding English, so they are fixed here rather than filed. They are a separate commit, named separately, so a reviewer who wants only #782's stated scope can drop this one without touching the rest. The wording follows the sibling `monthly_date` already in the file (`Havonta, a hónap %{day}. napján`), and puts the ordinal before the placeholder so the definite article is fixed by `első` / `második` and never by `%{weekday}`, which the substitution cannot agree with. Refs #782 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WgJbtZDmrFcu9q8Yha5Wjs
#782's failure had no detector. A seed file cannot report an English value: `_meta.omitted_keys` makes an untranslated key OMITTED rather than blank, so the English merge (#705) serves English openly — an English VALUE reaches the same merge looking exactly like a real translation. The suite's existing checks (declared keys, non-blank, no invented placeholder) all passed on the broken file. The case asserts the exact list of Hungarian values equal to their English counterpart, which is now the three #782 excludes on purpose rather than 25. Asserting the list, not its length, means a new English value names itself. Verified by failing first: with `data.hu.json` restored from `origin/main` the case goes red listing all 27 keys, and green against the fix. Two limits are in the comment rather than left to be rediscovered: - **Only `hu` is pinned.** `cs`, `fr`, `de` and `nl` hold 1, 2, 4 and 6 English-identical values today, each a single word (`Filter`, `Region`, `Website`, `Contact`) that may be the right loanword. #782 leaves those to a native reader. - **Equality is the weak half**, and this PR is the proof: the five `event.recurrence.monthly_*` values were English prose differing from `data.en.json` only in capitalisation, so this comparison would have passed them. It catches an English value copied from the English file, not one typed by hand. Refs #782 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WgJbtZDmrFcu9q8Yha5Wjs
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Holistic. The diff is the ticket's size: 27 values in one seed file, one test case, nothing under src/. I re-derived the claims at d12b1f4 — no placeholder invented or dropped, nothing over its schema maxLength, only the three intended keys still equal English. The five extra monthly_* keys are the same defect, correctly split out. seeds/translations/import.ts overwrites seeded locales, so the fix lands. The Hungarian still needs the native reader you asked for.
Findings
- should-fix — the case pins
hualone, where every other in the file isit.each(SEED_LOCALES).nlholdsregistration.form.submit: "Register". (spec.ts:306) - should-fix — exact equality misses the capitalisation variant this PR found. (
spec.ts:309) - consider —
captcha_retryis the one informal value in a formal form. (data.hu.json:251)
Checked. #782 and this body; the branch diff; the spec whole; the schema's 25 maxLength leaves; all ten seed files against en, exact and case-insensitive; the seed importer.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`registration.form.captcha_retry` was the one informal value in the Hungarian registration form. The nine siblings this PR wrote are formal (magázás), so the mixed register is now visible to a visitor filling the form in, where before it was a pre-existing quirk beside untranslated English. `Várd meg` / `regisztrálj` become `Várja meg` / `regisztráljon`. The key carries no `maxLength` in the schema, and the value grows by 3 characters. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HL1aS691uJgJaQSfRm6JVH
Every other case in this file runs `it.each(SEED_LOCALES)`. This one pinned `hu`, on the PR's claim that the other locales' English values were "every one a single word that may be the right loanword". Two are not: - `nl` holds `registration.form.submit: "Register"` — an English verb on the button a Dutch visitor presses. That is #782's own defect, in another file, and it was unpinned. - `de` and `nl` hold `event.display.time_in_place`, a format string like `pill_range`, not a word. `ENGLISH_VALUES_ALLOWED` now pins all nine non-English locales. An entry is a claim that the value is right in that language, and `registration.form.submit` carries a `⚠` saying it is not one — pinned so it is named rather than hidden. The `Record` is keyed on `Exclude<SEED_LOCALES[number], 'en'>`, so a locale added to that list fails the type-check until it gets an allowlist. Verified failing first, twice: an English `calendar.view_month` planted in `data.nl.json` names itself in the diff, and `data.hu.json` restored from `origin/main` lists all 25 of its keys. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HL1aS691uJgJaQSfRm6JVH
The assertion compared bytes, and the ⚠ paragraph above it admitted the
gap: five `event.recurrence.monthly_*` values in `data.hu.json` held
`1st %{weekday} of Every Month` against English's `of every month`, so byte
equality passed them while a Hungarian visitor read English. They are commit
2 of this PR, found by reading the file, not by this lane.
`value.trim().toLowerCase()` on both sides closes exactly that gap. Run over
all ten seed files, it matches no value byte equality did not already match,
so every allowlist is unchanged — the assertion is strictly stronger for one
expression, and the ⚠ paragraph goes.
Verified failing first: `1st %{weekday} of Every month` planted in
`data.hu.json` names `event.recurrence.monthly_1st` in the diff, where the
byte comparison this replaces reported nothing.
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HL1aS691uJgJaQSfRm6JVH
|
All three review findings adopted. Pushed
⚠ One finding is pinned, not fixed. Lean gate green: lint, typecheck, typecheck:tests, 1970 unit tests in 65s. Each assertion was watched failing first. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
Free Meditation Classesas the atlas heading and a registration form labelledYour name/Your email/Register. All 22 keys now hold Hungarian.event.recurrence.monthly_*values were English too, in a separate commit — fix(translations): 22 Hungarian atlas strings still render in English #782's exact-match analysis could not see them.registration.form.captcha_retrymoves to the formal register, so the whole form speaks one way to the visitor.Changes
seeds/sy-atlas-translations/data.hu.json— 27 English values replaced with Hungarian, pluscaptcha_retryto formaltests/unit/atlas-translations-schema.spec.ts— oneit.eachcase per non-English locale, with a per-locale allowlist of the values that may still equal EnglishPreview
Preview pending — Railway builds it after this push. Nothing in it shows this change until the seed runs against that database, so the Manual verification steps below are the real check.
Test results
lint,typecheck,typecheck:tests,test:unit— 139 files, 1970 tests, 65stests/unit/atlas-translations-schema.spec.ts— 58 passedsrc/changedsrc/file, so the Payload config and every JSON column schema are byte-identicalManual verification
A native Hungarian reader is what this PR most needs. Three things to check:
locale=huand register for a class. Every label in that form is Hungarian.GET /api/atlas/seo?route=/&locale=hureturns a Hungarian title, against a seeded database.pnpm seed translations --dry-runreports the changed groups forhu.Notes for reviewer
The five extra keys are commit 2 on their own, droppable without touching the rest.
event.recurrence.monthly_1st…monthly_lastheld1st %{weekday} of Every Monthagainst English's1st %{weekday} of every month. Equal but for capitalisation, so #782's method did not list them, and they render in English exactly as the other 22 did. The test now folds case, so that class of value cannot hide again.Register: formal (magázás) throughout
registration.*andevent.display.*, matchingregistration.questions(Gyakorolt már…) andcontact_to_join_full(…keresse a szervezőt), which were already formal.registration.form.captcha_retrywas the one informal value left, and commit 3 moves it (Várd meg/regisztrálj→Várja meg/regisztráljon) — a register switch inside one form is visible to the person filling it in.countries.titlereuses the exact string already atcommon.chrome.widget_label(Ingyenes meditációs órák) rather than coining a second heading.⚠
nlhas this PR's own bug, and this PR does not fix it.registration.form.submitisRegister— the English verb on the button a Dutch visitor presses. Dutch copy needs a Dutch reader, so the allowlist pins it and names it instead. It is the one entry there that is not a genuine loanword.Detail
Placeholders stay uninflected, on purpose
Hungarian marks case on the noun, so
Every %{weekday}cannot becomeMinden %{weekday}—keddwould have to bekedden, and the substitution cannot agree. The file had already solved this with a colon, inweekly_n(%{interval} hetente: %{weekday}) anddistance_from_place(%{distance} innen: %{place}), so the new values follow it:weekly_1weekly_2hosted_fromThe five monthly keys put the ordinal before the placeholder for the same reason — the definite article is then fixed by
első/második, never by%{weekday}, and the shape matches the siblingmonthly_date(Havonta, a hónap %{day}. napján).Checked mechanically: no changed value invents or drops a placeholder against
data.en.json. The suite'sinvents no placeholder English lackscase covers the inventing half.Vocabulary reused rather than coined
alkalomfor a session — alreadyfirst_session/next_session, soonline_notice_titleisOnline alkalome-mail-címfor the address — alreadycommon.report_errors.emailKéthetente— alreadytype_class_fortnightly(Kéthetenkénti foglalkozás)The assertion pins every locale, and folds case
Two changes from the first version, both from the adversarial review:
ENGLISH_VALUES_ALLOWED, aRecordkeyed onExclude<SEED_LOCALES[number], 'en'>— so a locale added to that list fails the type-check until it gets an allowlist. Pinninghualone rested on the claim that every other locale's English value was a single-word loanword, and two are not:nl'sregistration.form.submit, andde/nl'sevent.display.time_in_place(%{time} in %{city}, a format string likepill_range).monthly_*keys. Folding matched no value byte equality did not already match, across all ten files, so every allowlist is unchanged and the assertion is strictly stronger for one expression.Asserting the list rather than its length means a new English value names itself in the failure.
The test failed before it passed — three times
data.hu.jsonrestored fromorigin/main→ red, listing all 25 of its keys.calendar.view_monthplanted indata.nl.json→ red, naming that key. This is the case that only exists because the assertion now covers every locale.1st %{weekday} of Every monthplanted indata.hu.json→ red, namingevent.recurrence.monthly_1st. The byte comparison this replaces reported nothing for it.Scope left alone
Nine locales hold values equal to English, and the allowlist now states each one as a claim that the value is right in that language. Most are genuine:
%{start} – %{end}carries no word at all, andOnline,Region,Format,Week,Contact,Website,Filters,Okayare the word in those languages. The exception isnl'sregistration.form.submit, flagged above and in the spec — a separate ticket with a Dutch reader, not this PR.Review tooling
pr-review-toolkitis not installed in this session. What ran instead: a full read of the branch diff, a scripted equality and placeholder comparison againstdata.en.jsonfor all ten locales, a scan of the schema formaxLength(none of the 28 changed keys carries one), the adversarial review on the thread, and the lean gate. The language quality itself is what the manual verification above asks for.Closes #782
🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_01HL1aS691uJgJaQSfRm6JVH