Skip to content

feat(ui): say "class" everywhere - #517

Merged
Ardnived merged 3 commits into
mainfrom
feat/say-class-everywhere
Nov 26, 2026
Merged

Ardnived merged 3 commits into
mainfrom
feat/say-class-everywhere

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

  • Eight lines that said "event" or "meditation" read new class-worded keys from SahajCloud#1289.
  • The snapshot copies production's eleven reworded English lines (sentence case, "event" → "class").
  • The screen-reader results count says "classes" in all 18 locales.

Change outline

Behaviour — which key each surface reads

The meaning changed, so each line moves to a new key, and other languages get a fresh translation instead of a stale "event".

 useEventDisplay                                   src/hooks/use-event-display.ts
-  typeLabel  oneoff → event.display.type_oneoff
+  typeLabel  oneoff → event.display.type_oneoff_class        "One-off class"
-  whenLine / blockedMessage  ended → event.display.event_ended
+  whenLine / blockedMessage  ended → event.display.class_ended   "This class is over"
-  microcopy / blockedMessage  full → event.display.event_full
+  microcopy / blockedMessage  full → event.display.class_full    "This class is full"
 STATE_MESSAGE_KEYS                                src/components/organisms/RegistrationForm/RegistrationForm.tsx
   event_ended → class_ended,  event_full → class_full   (the server's codes are unchanged)
 ERROR_POLICY                                      src/components/molecules/Fallbacks/Fallbacks.tsx
   empty              → common.errors.no_classes
   share-unavailable  → common.errors.share_unavailable_class
   no-results         → filters.chrome.no_results_classes
   no-nearby          → search.results.no_nearby_classes
   offerLabel 'city'  → common.errors.classes_near_city

Contract — the English snapshot and the retiring keys

 src/config/translations.en.json
+  8 new keys, copied by hand at production's exact values (full sync stays blocked on #466)
~  11 English values copied from production, published there 2026-11-26:
~    Dark/Light theme, Every day, Online classes, Free meditation class(es), Online session,
~    See classes in %{region}, We couldn't find that class., registration_external, referral
 src/config/translations.test.ts  RETIRING_KEYS
+  the 8 replaced keys → sydevs/SahajCloud#1289
 src/config/a11y/*.json
~  search.results_showing  "Showing %{shown} of %{total} classes", in every locale

Preview

Preview pending: the Cloudflare branch alias appears once Workers Builds runs. Locally reviewed:

  • Ladle molecules--fallbacks: no classes found, share unavailable, no matching filters, no classes within, class full
  • Ladle views--event with example=Ended / Full: "This class is over" / "This class is full"
  • Ladle organisms--event-details: "One-off class"
  • Ladle molecules--settings-menu: "Light theme"
  • App: home list "Online classes"; /999999999 reads "We couldn't find that class."

Contract impact

None a host observes. src/types/payload/ gains the eight keys in the contracts re-sync bot PR that follows SahajCloud#1289; nothing here reads them from those types.

Test results

  • Lean gate: ✓ (lint, typecheck, 2648 unit tests)
  • Targeted specs: snapshot, a11y, Fallbacks, use-event-display, RegistrationForm, LoadMore, nav-names, all pass
  • Build: N/A (CI)

Manual verification

  1. Open a full class and an ended class: the blocked line reads "This class is full" / "This class is over".
  2. Search somewhere with no classes nearby: "No classes within … km."

Notes for reviewer

  • SahajCloud#1289 is merged and deployed. Production serves all eight new keys and the eleven English edits, matching the snapshot byte for byte.
  • Lines that still say "event" belong to other proposals: "See nearby events" (g-class-by-request), the "Search for events near…" box (g-first-screen), "Register Now" / "Register for Meditation" (g-class-buttons, register-form-calm), "Show distant events" (results-sections). The other session's share work moves "Share Meditation" to share.title_class.
  • Self-review: /code-review medium (no pr-review-toolkit here). /simplify was not run: the diff is copy and key names, read inline.
Detail

Review findings dismissed:

  • Other languages fall back to English on the eight new keys. Deliberate. Only English is switched on, and the ticket leaves other languages out. A locale switched on later needs these translated first.
  • In-place English edits are overridden by the CMS. They are the CMS's values: published to production before this PR, and checked against a fresh sync.
  • not_found_event, back_to_region and others reworded in place rather than under new keys. Agreed scope: only English is live, and a new key would leave other languages blank rather than stale.
  • payload-types.ts lacks the new keys. The contracts bot re-syncs it after SahajCloud merges, and the t() keys are typed from the snapshot.

Dropped from the proposal branch: REWORDED_KEYS (only English is live, so call the new keys directly), the snapshot stand-in edits (replaced by real production values), and e2337d4's relative-date capitalisation (#509 already rewrote it).

🤖 Generated with Claude Code

Ardnived and others added 3 commits November 26, 2026 15:40
Eight lines that said "event" or "meditation" now read class-worded keys
from SahajCloud#1289: "One-off class", "This class is over", "This class is
full", "There is no link to share for this class yet.", "No classes found.",
"See classes near %{city}", "No classes within %{km} km." and "No classes
match your filters." The meaning changed, so each is a new key and every
other language gets a fresh translation. The old keys sit in RETIRING_KEYS
until SahajCloud drops them.

The snapshot also copies production's new English for eleven keys that only
changed case or noun, published in SahajCloud on 2026-11-26 ("Dark theme",
"Every day", "Online classes", "See classes in %{region}", and others). The
full sync stays blocked on #466, so both are copied by hand, matching what
production serves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each translation uses the word its locale already uses for a class in
finding_classes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 12:52Z review-pr · attempt 3 · session · done
  • 12:52Z review-pr · attempt 3 · session
  • 03:21Z review-pr · attempt 2 · session · timed out
  • 03:21Z review-pr · attempt 2 · session
  • 22:47Z review-pr · attempt 1 · session · timed out

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

@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 26, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 26, 2026
@Ardnived
Ardnived merged commit 43713e8 into main Nov 26, 2026
14 checks passed
@Ardnived
Ardnived deleted the feat/say-class-everywhere branch November 26, 2026 22:48
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Done in SYDevelopers Technical Roadmap Nov 26, 2026
Ardnived added a commit to sydevs/SahajCloud that referenced this pull request Nov 26, 2026
…1292)

The widget reads their class-worded replacements (#1289) since
sydevs/SahajAtlasWeb#517, so translators were still asked to fill
common.errors.share_unavailable, no_events and near_city,
search.results.no_nearby, filters.chrome.no_results, and
event.display.event_ended, event_full and type_oneoff for nothing.

Removes them from the schema, the ten seed files and the generated types,
and adds a data migration sweeping the stored copy out of each group's
column on the main and every version row, since each group declares
additionalProperties: false and a leftover would refuse every later save.
down restores nothing: the old schema declares the keys but requires none.
The replacements' descriptions drop their "Replaces" notes, and the strict
budget spec keeps class_full alone.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Ardnived added a commit that referenced this pull request Nov 26, 2026
SahajCloud#1292 removed common.errors.share_unavailable, no_events and
near_city, search.results.no_nearby, filters.chrome.no_results, and
event.display.event_ended, event_full and type_oneoff, which nothing here
has read since #517. They leave the snapshot by hand, as #507 did, because
the full sync stays blocked on #466, and their RETIRING_KEYS entries go
with them.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@sydevs-dispatcher sydevs-dispatcher Bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
@sydevs-dispatcher sydevs-dispatcher 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 Nov 27, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
@Ardnived Ardnived removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 27, 2026
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