fix(i18n): localize FileField upload widget + approvals snapshot field labels#2819
Open
baozhoutao wants to merge 1 commit into
Open
fix(i18n): localize FileField upload widget + approvals snapshot field labels#2819baozhoutao wants to merge 1 commit into
baozhoutao wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
baozhoutao
force-pushed
the
claude/two-pages-i18n-3877fd
branch
from
July 26, 2026 06:41
04edb85 to
2e3ea56
Compare
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…d labels
The approvals inbox drawer and its Approve/Reject/… dialogs leaked English:
- FileField (the shared upload widget) hard-coded every visible string
("Drag & drop files here", "or click to browse", "Take photo",
"Uploading…", validation errors, etc.). Route them through
useObjectTranslation with new `fields.file.*` keys, translated across all
10 locale bundles.
- The record-snapshot summary title-cased raw machine keys
("assessment_status" → "Assessment Status") instead of the target object's
field labels. Consume the new server-sent `payload_labels`
(framework side) in payloadSummary/decisionAmountEntry, falling back to the
prettified key when absent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Closes #2818
背景
审批中心抽屉与操作弹窗在中文环境下漏英文两处:
FileField组件硬编码 "Drag & drop files here" / "or click to browse" 等,完全无t()。prettifyKey(机器名)生造英文,没读对象字段 label。改动
FileField全部可见文案改走useObjectTranslation+ 新增fields.file.*键,翻译全部 10 个 locale。payloadSummary/decisionAmountEntry优先用 framework 新增下发的payload_labels,缺失回退prettifyKey;approvalsApi行类型补payload_labels?。验证(真机)
app-showcase后端 + objectui console dev(HMR,因/_console是 vendored 旧包)。通过|请填写以下信息以继续操作。|审批意见|附件|拖拽文件到此处|或点击浏览|取消|确认—— 拖拽区已中文化。payload_labels。@object-ui/i18ntsc 通过;@object-ui/consoletsc 干净;FileField 组件测试 41 passed;FileField lint 0 error。依赖 framework 侧 payload_labels 富化:objectstack-ai/objectstack#3501。
🤖 Generated with Claude Code