Skip to content

feat(translations): the atlas calendar's day count, "+ N classes" and "No classes" keys - #1301

Merged
Ardnived merged 2 commits into
mainfrom
feat/atlas-calendar-words
Nov 27, 2026
Merged

Ardnived merged 2 commits into
mainfrom
feat/atlas-calendar-words

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

  • Three sy-atlas-translations keys let the atlas calendar say "classes" where Schedule-X says "events".
  • They also give the phone month view its day count ("Today · 4 classes").

Change outline

Contract — sy-atlas-translations → calendar

The new keys, which SahajAtlasWeb reads after its next pnpm sync:translations --write.

 calendar                                       src/globals/SahajAtlasTranslations/translationsSchema.json
-  description: "The Calendar view's own header. …"
+  description: "The Calendar view's own words. …"
   title, view_month, view_week, view_list
   times_note                                   # description: the line now sits above the calendar
+  day_count   plural   "%{count} class" / "%{count} classes"     phone month view, under the day's date
+  more        plural   "+ %{count} class" / "+ %{count} classes" month grid, a day's overflow button
+  none        default "No classes"                               a day with no classes

Migration — English for the two plural keys

A plural key cannot declare a schema default, so production gets its English here. none declares a default, and the boot reconcile writes it.

+20261127_190000_atlas_calendar_words          data only, the prior snapshot re-stamped
+  up    addEnglishKey × 4   calendar.day_count_{one,other}, calendar.more_{one,other}
+  down  dropEnglishKey      every stored form of day_count and more, plus none, in every locale

Preview

No preview surface.

Contract impact

  • SahajAtlasWeb: the calendar PR that follows this one syncs the snapshot (pnpm sync:translations --write) and the types (pnpm types:cms), then wires all three keys. Merging this first is the producer-first order.
  • src/payload-types.ts gains SyAtlasTranslationsCalendarStrings.day_count_*, more_* and none.

Migration

  • New migration: src/migrations/20261127_190000_atlas_calendar_words.ts
  • Impact: sy_atlas_translations_locales.calendar and _sy_atlas_translations_v_locales.version_calendar, English rows only. It adds four keys where they are absent and never overwrites a stored word.
  • Reversible: yes. down removes every form of the new keys from every locale, because the previous schema refuses them.

Test results

  • Lean gate: ✓ lint, format, both typechecks, unit lane (294 files, 3924 tests)
  • Targeted specs: translations-english-defaults.int.spec.ts, translations-globals.int.spec.ts, 41 passed
  • Build: N/A

Notes for reviewer

🤖 Generated with Claude Code

Ardnived and others added 2 commits November 27, 2026 09:56
… "No classes" keys

Three sy-atlas-translations keys for SahajAtlasWeb's calendar, so it names classes
rather than Schedule-X's "events":

- calendar.day_count (plural): "%{count} class" / "classes", the quieter line under
  the phone month view's day heading ("Today · 4 classes").
- calendar.more (plural): "+ %{count} class" / "classes", the month grid's button for
  a day with more classes than its box shows.
- calendar.none: "No classes", declared as a schema default.

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.
times_note's description now says the line sits above the calendar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@railway-app

railway-app Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

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

Service Status Web Updated
SahajCloud 🕒 Building (View Logs) Web Nov 27, 2026 at 5:07 pm UTC
1 service not affected by this PR
  • mailpit

@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1301 November 27, 2026 17:07 Destroyed
@sydevs-dispatcher

sydevs-dispatcher Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

🤖 no session running

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

This branch was successfully deployed

No deployments
sahajcloud / SahajCloud-pr-1301 — 1b378992 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