Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…hema simplification I18nLabelSchema was changed from z.union([z.string(), I18nObjectSchema]) to z.string(), so label/description/title fields now only accept plain strings. Updated 32 tests across 12 UI schema test files to expect i18n objects to be rejected (toThrow) instead of accepted (not.toThrow). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
…and update tests
BREAKING CHANGE: I18nLabelSchema no longer accepts i18n objects ({ key, defaultValue, params }).
All label/description/title fields in UI schemas now accept only plain strings.
i18n translation keys will be auto-generated by the framework at registration time.
Closes #1054
Agent-Logs-Url: https://github.com/objectstack-ai/framework/sessions/e1cf9252-11e8-44d6-a2d2-1f4d43c59d12
Co-authored-by: xuyushun441-sys <255036401+xuyushun441-sys@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix i18n label to be a pure string
feat(i18n): I18nLabelSchema → string-only; remove inline i18n objects from metadata labels
Apr 2, 2026
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.
I18nLabelSchemawasz.union([z.string(), I18nObjectSchema]), allowinglabel/descriptionfields to be either a plain string or{ key, defaultValue, params }. This caused React rendering crashes (objects as children), inconsistent API responses, and a parallel i18n system with hand-written keys that no translation service actually managed.Core schema change
I18nLabelSchemais nowz.string(). All UI schemas that reference it (AppSchema,NavigationArea,PageSchema,DashboardWidgetSchema,ChartSchema,NotificationSchema,AriaPropsSchema, etc.) automatically enforce string-only.I18nObjectSchemais retained for theTranslationBundlesystem.Plugin migrations
Converted all inline i18n objects to plain strings (extracting
defaultValue):setup-app.ts(label, description),setup-areas.ts(4 areas × label + description)Test updates
31 tests across 12 UI schema test files updated from asserting i18n objects are accepted to asserting they are rejected. All 6,792 tests pass.