Skip to content

feat(translations): the atlas filters' Show N classes, No classes match and Remove keys - #1293

Merged
Ardnived merged 4 commits into
mainfrom
feat/atlas-filter-sheet-keys
Nov 27, 2026
Merged

Ardnived merged 4 commits into
mainfrom
feat/atlas-filter-sheet-keys

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Three sy-atlas-translations keys for SahajAtlasWeb's live-applying filter sheet: Show N classes, No classes match, Remove ….
  • A plural key cannot declare a schema default, so a data-only migration ships the two English plural families to production.

Change outline

Contract — filters.chrome (src/globals/SahajAtlasTranslations/translationsSchema.json)

Three keys join an existing leaf group, so the filters_chrome jsonb column gains keys and no DDL runs.

 filters.chrome
   apply                       # kept until the atlas stops reading it
   …
   no_results_classes
+  show_classes   plural       "Show %{count} class" / "Show %{count} classes"
+  no_match       default      "No classes match"
+  widen          plural       "Remove %{label} (%{count} class)" / "(%{count} classes)"

Flow — how each key's English reaches production

no_match follows the #1218 default path. The two plural keys take the one path that route leaves out.

 boot
   prodMigrations
+    20261126_233000_atlas_filter_sheet_plurals.up
+      addEnglishKey × {show_classes,widen}_{one,other}   # en row + latest version row, absent keys only
   onInit → reconcileEnglishDefaults
+    fills no_match                                       # plural keys are skipped here by design

down sweeps every stored form (_one/_few/_many/_other) and no_match from every locale, since the previous schema refuses them.

Files — seeds and docs

  • seeds/sy-atlas-translations/data.*.json: English plural families in data.en.json (no no_match, which has a default), and machine translations for all three keys in the nine other locales, with few/many for cs, ru and uk.
  • src/migrations/AGENTS.md and src/globals/AGENTS.md: a plural key is the one translation key that still ships its English by data migration.

Preview

No preview surface. To see the keys in the admin, open the global's Filters tab:

  • Sahaj Atlas Translations: the Filters tab's Chrome group lists the three new rows, with show_classes and widen as plural rows.

Contract impact

src/payload-types.ts gains the three keys. SahajAtlasWeb picks them up through pnpm types:cms and pnpm sync:translations --write in the filters-sheet PR, which follows this one. WeMeditateWeb copies the types but reads none of these keys.

Migration

  • New migration: src/migrations/20261126_233000_atlas_filter_sheet_plurals.ts (data only; the .json is the prior snapshot re-stamped)
  • Impact: sy_atlas_translations_locales.filters_chrome and _sy_atlas_translations_v_locales.version_filters_chrome, English row and latest version row only; only absent keys are added, so stored words are never overwritten
  • Reversible: yes. down drops every form of the new keys from every locale and version row.

Test results

  • Lean gate (.claude/skills/pr-prep/check.sh): ✓ lint, format, typecheck, unit (294 files, 3924 tests)
  • Targeted specs: atlas-translations-schema, client-english-fallback, translations-no-a11y: 80 passed
  • Build: N/A (CI)

Notes for reviewer

  • filters.chrome.apply stays for now. Retiring it, with its sweep migration, is a follow-up once the atlas stops reading it.
  • Dismissed: batching the four addEnglishKey calls, because 8 UPDATEs on one global row once per deploy is immaterial and every sibling migration loops the same way. Also dismissed: the index.ts trailing comma, which matches the hand-written entries above it.
  • Deferred: letting a plural key declare a per-form default (schemaWalker.ts, englishDefaults.ts, about 8 files) would retire this kind of migration. It is the first plural key since feat(translations): declare a key's English in the schema, reconciled on boot #1218, so it hasn't earned the mechanism yet.
  • maxLength dropped from the new keys. Nothing anchors a budget until the widget's slot exists.
Detail

The machine translations reuse each locale's existing word for "class" (hu "foglalkozás", ru "занятие", and so on). French and Hungarian take one form for both counts, matching how event.display.sessions_count is seeded there.

🤖 Generated with Claude Code

Ardnived and others added 3 commits November 26, 2026 16:02
…ch and Remove keys

Three sy-atlas-translations keys for SahajAtlasWeb's live-applying filter sheet:

- filters.chrome.show_classes (plural): "Show %{count} class" / "classes", the
  main button once an answer is picked.
- filters.chrome.no_match: "No classes match", declared as a schema default.
- filters.chrome.widen (plural): "Remove %{label} (%{count} class)" / "classes",
  the way out when nothing matches.

A plural key's English cannot be a schema default, so a data-only migration
adds the two English families to production. The nine locale seeds carry
machine translations. filters.chrome.apply stays until the atlas stops reading it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1293 November 26, 2026 23:17 Destroyed
@railway-app

railway-app Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-1293 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Nov 27, 2026 at 12:15 am UTC
1 service not affected by this PR
  • mailpit

@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

🤖 no session running
conflict held since 23:17Z, waiting for the base to settle

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

…et-keys

# Conflicts:
#	seeds/sy-atlas-translations/data.cs.json
#	seeds/sy-atlas-translations/data.de.json
#	seeds/sy-atlas-translations/data.en.json
#	seeds/sy-atlas-translations/data.es.json
#	seeds/sy-atlas-translations/data.fr.json
#	seeds/sy-atlas-translations/data.hu.json
#	seeds/sy-atlas-translations/data.nl.json
#	seeds/sy-atlas-translations/data.pt-BR.json
#	seeds/sy-atlas-translations/data.ru.json
#	seeds/sy-atlas-translations/data.uk.json
#	src/globals/SahajAtlasTranslations/translationsSchema.json
#	src/migrations/index.ts
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1293 November 27, 2026 00:12 Destroyed
@Ardnived
Ardnived merged commit 2335b77 into main Nov 27, 2026
11 checks passed
@Ardnived
Ardnived deleted the feat/atlas-filter-sheet-keys branch November 27, 2026 00:28
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Done in SYDevelopers Technical Roadmap Nov 27, 2026
sydevs-dispatcher Bot pushed a commit to sydevs/SahajAtlasWeb that referenced this pull request Nov 27, 2026
Ardnived pushed a commit to sydevs/SahajAtlasWeb that referenced this pull request Nov 27, 2026
* chore(contracts): re-sync from sydevs/SahajCloud#1291

* chore(contracts): re-sync from sydevs/SahajCloud#1288

* chore(contracts): re-sync from sydevs/SahajCloud#1292

* chore(contracts): re-sync from sydevs/SahajCloud#1293

* chore(contracts): re-sync from sydevs/SahajCloud#1294

* chore(contracts): re-sync from sydevs/SahajCloud#1295

* chore(contracts): re-sync from sydevs/SahajCloud#1298

---------

Co-authored-by: sydevs-bot <[email protected]>

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-1293 — fe494861 Deployed Nov 27, 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.

1 participant