Skip to content

fix(translations): 22 Hungarian atlas strings still render in English - #784

Merged
Ardnived merged 6 commits into
mainfrom
claude/fix-782-hu-translations
Sep 14, 2026
Merged

Ardnived merged 6 commits into
mainfrom
claude/fix-782-hu-translations

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A Hungarian visitor saw Free Meditation Classes as the atlas heading and a registration form labelled Your name / Your email / Register. All 22 keys now hold Hungarian.
  • Five more 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_retry moves to the formal register, so the whole form speaks one way to the visitor.
  • A new unit case pins every seed locale, so an English value coming back fails the lane instead of shipping.

Changes

  • seeds/sy-atlas-translations/data.hu.json — 27 English values replaced with Hungarian, plus captcha_retry to formal
  • tests/unit/atlas-translations-schema.spec.ts — one it.each case per non-English locale, with a per-locale allowlist of the values that may still equal English

Preview

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

  • Lean gate: ✓ lint, typecheck, typecheck:tests, test:unit — 139 files, 1970 tests, 65s
  • Targeted specs: tests/unit/atlas-translations-schema.spec.ts — 58 passed
  • Build: N/A — Railway builds on deploy, and nothing under src/ changed
  • No migration: the diff touches no src/ file, so the Payload config and every JSON column schema are byte-identical

Manual verification

A native Hungarian reader is what this PR most needs. Three things to check:

  1. Open the widget with locale=hu and register for a class. Every label in that form is Hungarian.
  2. GET /api/atlas/seo?route=/&locale=hu returns a Hungarian title, against a seeded database.
  3. pnpm seed translations --dry-run reports the changed groups for hu.

Notes for reviewer

The five extra keys are commit 2 on their own, droppable without touching the rest. event.recurrence.monthly_1st … monthly_last held 1st %{weekday} of Every Month against English's 1st %{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.* and event.display.*, matching registration.questions (Gyakorolt már…) and contact_to_join_full (…keresse a szervezőt), which were already formal. registration.form.captcha_retry was 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.title reuses the exact string already at common.chrome.widget_label (Ingyenes meditációs órák) rather than coining a second heading.

⚠ nl has this PR's own bug, and this PR does not fix it. registration.form.submit is Register — 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 become Minden %{weekday} — kedd would have to be kedden, and the substitution cannot agree. The file had already solved this with a colon, in weekly_n (%{interval} hetente: %{weekday}) and distance_from_place (%{distance} innen: %{place}), so the new values follow it:

Key English Hungarian
weekly_1 Every %{weekday} Hetente: %{weekday}
weekly_2 Every 2nd %{weekday} Kéthetente: %{weekday}
hosted_from Hosted from %{city} Közvetítve innen: %{city}

The 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 sibling monthly_date (Havonta, a hónap %{day}. napján).

Checked mechanically: no changed value invents or drops a placeholder against data.en.json. The suite's invents no placeholder English lacks case covers the inventing half.

Vocabulary reused rather than coined

  • alkalom for a session — already first_session / next_session, so online_notice_title is Online alkalom
  • e-mail-cím for the address — already common.report_errors.email
  • Kéthetente — already type_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:

  • Every non-English locale is pinned, through ENGLISH_VALUES_ALLOWED, a Record keyed on Exclude<SEED_LOCALES[number], 'en'> — so a locale added to that list fails the type-check until it gets an allowlist. Pinning hu alone rested on the claim that every other locale's English value was a single-word loanword, and two are not: nl's registration.form.submit, and de/nl's event.display.time_in_place (%{time} in %{city}, a format string like pill_range).
  • The comparison folds case and trims. Byte equality is what missed this PR's own five 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.json restored from origin/main → red, listing all 25 of its keys.
  • An English calendar.view_month planted in data.nl.json → red, naming that key. This is the case that only exists because the assertion now covers every locale.
  • 1st %{weekday} of Every month planted in data.hu.json → red, naming event.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, and Online, Region, Format, Week, Contact, Website, Filters, Okay are the word in those languages. The exception is nl's registration.form.submit, flagged above and in the spec — a separate ticket with a Dutch reader, not this PR.

Review tooling

pr-review-toolkit is not installed in this session. What ran instead: a full read of the branch diff, a scripted equality and placeholder comparison against data.en.json for all ten locales, a scan of the schema for maxLength (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

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
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-784 September 14, 2026 17:08 Destroyed
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Sep 14, 2026
@sydevs-bot

sydevs-bot commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 17:23Z address-review · attempt 1 · session · done
  • 17:23Z address-review · attempt 1 · session
  • 17:16Z adversarial-review · attempt 1 · session · done
  • 17:16Z adversarial-review · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 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 hu alone, where every other in the file is it.each(SEED_LOCALES). nl holds registration.form.submit: "Register". (spec.ts:306)
  • should-fix — exact equality misses the capitalisation variant this PR found. (spec.ts:309)
  • consider — captcha_retry is 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

@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Sep 14, 2026
`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
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-784 September 14, 2026 17:29 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

All three review findings adopted. Pushed 824b4a2, three commits.

  • Pin every locale, not hu — 2f5ca28. ENGLISH_VALUES_ALLOWED covers all nine non-English locales, typed so a new locale fails the type-check until it has an entry.
  • Fold case before comparing — 824b4a2. Zero new matches across all ten files, so every allowlist is unchanged and the ⚠ paragraph is gone.
  • captcha_retry to formal — 3bedb3c. The Hungarian registration form now speaks one register throughout.

⚠ One finding is pinned, not fixed. nl's registration.form.submit is the English verb Register. Dutch copy needs a Dutch reader, so the allowlist names it as a real gap. It wants its own ticket.

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

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Sep 14, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review September 14, 2026 17:40
@sydevs-bot
sydevs-bot requested a review from Ardnived September 14, 2026 17:40
@Ardnived
Ardnived merged commit 7c3570c into main Sep 14, 2026
35 of 38 checks passed
@Ardnived
Ardnived deleted the claude/fix-782-hu-translations branch September 14, 2026 17:41
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Sep 14, 2026

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-784 — 824b4a22 Deployed Sep 14, 2026 by railway-app[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

fix(translations): 22 Hungarian atlas strings still render in English

3 participants