Repository navigation
feat(translations): define Sahaj Atlas translation schema by view - #539
Merged
Merged
Conversation
Replace the placeholder Common/Map/Location/Event schema with the real
Atlas i18next catalog, organized into five view tabs: Common, Region,
Event, Registration, Share. Leaf tabs (common, share) emit one JSON
field; nested tabs (region, event, registration) wrap their subgroups
in a group. All 64 leaf keys are the loss-free union across the app's
10 locale files, every value a plain string (Ruby-style %{var} interp
+ i18next _one/_other plural suffixes preserved verbatim).
Key normalization: snake_case the three camelCase question keys
(healthInfo/priorExperience/referralSource) and rename recurrence.null
to no_recurrence.
Regenerates payload-types.ts.
Refs #527
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Update the sy-atlas-translations assertions for the new tabs (Common, Region, Event, Registration, Share) and representative JSON field names (common, locations, venues, details, form, share). Narrow the "no group wrappers" case to wm-web, and add a sy-atlas check that the three nested tabs each wrap their subgroups in one group whose first field is a tabs field (leaf tabs have none) — mirroring wm-app. Refs #527 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Drops the placeholder map/location/event JSON columns and adds the region_*, event_*, registration_*, and share columns on sy_atlas_translations_locales and its _v_locales versions table (common is unchanged). Generated by db:migrations:create; all new columns are creates (not renames), with a clean inverse down(). Refs #527 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Drop the intermediate Map; assert leaf-vs-nested group counts in a single pass over the tabs (nested → 1 group with inner tabs field, leaf → 0), with a per-tab failure label. Same intent, less state, and now checks every tab rather than five named labels. Refs #527 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Per /code-review: the field-name assertion only covered 6 representative fields, so a dropped nested sub-group (event.recurrence, event.timing, registration.errors, registration.questions) would slip through. Assert the full set of 10 leaf JSON fields instead. Refs #527 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
🚅 Deployed to the SahajCloud-pr-539 environment in sahajcloud
|
Ardnived
added a commit
that referenced
this pull request
Jul 12, 2026
* feat(seeds): atlas country slugs use ISO alpha-2 codes Countries claim their lowercased legacy countryCode as slug (belgium -> be) so the Atlas widget can derive the code from the slug instead of the deprecated legacyData.countryCode. Countries sort first in buildRegionSlugs, so the two-letter slugs are always theirs; a missing or malformed code falls back to the name-based slug. Refs #556 Co-Authored-By: Claude Fable 5 <[email protected]> * fix(events): resolve webPath when selected without webUrl ensureWebPathDeps only injected _status into an include-mode select when webUrl was requested, but webPath is publish-gated too — so select[webPath]=true alone stripped _status before the afterRead hook and the path always read null. Inject both deps whenever either path field is selected. Refs #556 Co-Authored-By: Claude Fable 5 <[email protected]> * test(regions): cover ISO country slugs in webPath chains and geojson Pin the #556 contract: a country slugged with its ISO alpha-2 code routes the code as the first webPath segment for itself and every descendant, and a geojson feature under a country-rooted chain carries it (selecting webPath alone — the ensureWebPathDeps regression path). Refs #556 Co-Authored-By: Claude Fable 5 <[email protected]> * chore(migrations): rewrite country slugs to ISO alpha-2 codes * fix(migrations): drop duplicate sy-atlas-translations views migration migrate:create re-emitted the #539 views delta (already applied via 20260705_160029) because it picks its diff-base snapshot by filename timestamp and 20260705_161112 (bcp47, from a parallel branch) sorts later but predates the views change. Replaying the ADD/DROP COLUMNs would abort the in-process boot migration on deploy. 20260711_230013's freshly generated snapshot reflects the full current schema, so future migrate:create runs diff against a correct base. Refs #556 Co-Authored-By: Claude Fable 5 <[email protected]> * docs(migrations): document the out-of-order snapshot trap migrate:create diffs against the newest-by-filename-timestamp snapshot, not the last index.ts entry, so parallel-branch migrations merged out of timestamp order leave a stale diff base and the next run re-emits already-applied DDL (a replay aborts the boot migration). Caught in #566. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sy-atlas-translationsschema with the real Sahaj Atlas i18next catalog, organized into five view tabs — Common, Region, Event, Registration, Share — so translators manage all Atlas UI copy per-view in the CMS.%{var}interpolation and i18next_one/_otherplural suffixes preserved verbatim — no richText).common,share) emit one JSON field; nested tabs (region,event,registration) wrap their subgroups in a group.Changes
src/globals/SahajAtlasTranslations/translationsSchema.json— full rewrite (5 tabs); descriptions transcribed verbatim from the ticket appendix.healthInfo→health_info,priorExperience→prior_experience,referralSource→referral_source,recurrence.null→no_recurrence,details.share→share(seeds the forthcoming Share view).tests/int/translations-globals.int.spec.ts— updatedsy-atlas-translationsassertions (new tabs + representative JSON field names) and added a nested-group check (Region/Event/Registration each wrap subgroups in one group whose first field is atabsfield; leaf tabs have none).src/payload-types.ts— regenerated.Migration
src/migrations/20260705_160029_sy_atlas_translations_views.tssy_atlas_translations_localesand its_sy_atlas_translations_v_localesversions table — drops the placeholdermap/location/eventJSON columns and addsregion_*,event_*,registration_*,share(thecommoncolumn is unchanged). Only placeholder data is dropped.down()re-adds the old columns and drops the new ones. PureADD/DROP COLUMN, no FK or table-rebuild changes.Test Results
translations-globals.int.spec.ts): 12 passedNotes for reviewer
db:migrations:create(all new columns are creates, not renames) and left unaugmented per the migrations rule.sydevs/SahajAtlasWeb.Closes #527
🤖 Generated with Claude Code