Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

fix(i18n): translate grid.import.transform in ko/de/fr/es/pt/ru/ar (#3938) - #3949

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-3938-grid-import-transform-i18n
Aug 9, 2026
Merged

yinlianghui merged 1 commit into
mainfrom
claude/issue-3938-grid-import-transform-i18n

Conversation

@yinlianghui

Copy link
Copy Markdown
Contributor

Fixes #3938

grid.import.transform 在 ko/de/fr/es/pt/ru/ar 七包与 en 逐字节相同(字面量 Transform),而 zh(转换)/ ja(変換)早已译好 —— 这正是排除「刻意不译的术语」这一读法的对照组。它是 #3920 / PR #3936 修掉的那个六行 block 里的第六个键,当时被刻意留在外面,只为让那单 5 键 / 35 值的普查数与卡片对得上。

七包译文(1 × 7)

pack before after 本包既有锚点(取自 savedMappingHint)
ko Transform 변환 이름 변경 + 변환 + 형 변환
de Transform Transformation Umbenennung + Transformationen + Typkonvertierung
fr Transform Transformation le renommage + les transformations + la conversion de type
es Transform Transformación el cambio de nombre + las transformaciones + la conversión de tipos
pt Transform Transformação renomeação + transformações + conversão de tipos
ru Transform Преобразование переименование + преобразования + приведение типов
ar Transform التحويل إعادة التسمية + التحويلات + تحويل الأنواع

en / zh / ja 未改动;de.ts 也只改了这一行(#3919 的 approvalsInbox 不在 diff 里)。

基准依据:锚点取「同屏那一句」,而不是 legacyFallbackNotice

每个值都是本包已在用的那个词的单数形式 —— 即 en 复数 "transforms" 在 grid.import.savedMappingHint 里的既有译法,而那一句正是 SavedMappingSummary 渲染在这个表头正上方的说明文字(#3936 刚译好)。

issue 卡片建议的锚点是 legacyFallbackNotice,这里没有照抄:en 自己那句把 "transforms" 与 "type coercion" 并列为两个不同的服务端操作,而 legacyFallbackNotice 讲的是后者。若按卡片复用 de "Typkonvertierung" / ko "형 변환" / ar "تحويل الأنواع",表头就会指错操作。新测试因此把这条判据也钉住:每包的「类型强转」术语在那一句里在场、在表头里不在场。

另外核过一遍:这七个词在各自包内除了 #3936 那两句以外没有别的用法,所以补上单数表头不会让面板出现同一操作的两种叫法。

为什么值得单开一单:它不是隐藏字符串

它是 SavedMappingSummary 的第三个 TableHead,与 csvColumn / mapsTo 同处一行,而后两者一直是译好的 —— 于是德语用户读到的是 Spalte / Zugeordnet zu / Transform:同一行表头两种语言,就在 PR #3936 刚落地的德语说明文字正下方。#3936 之前整个面板都是英文,反倒自洽;补译之后这处不一致才独立可见。

三道 i18n 门禁在这里与 #3920 同样是值域盲区:all-locales-key-parity 只比键名集合与占位符形状(键在、无占位符,完美通过);call-site 门禁只判键能否解析;check-i18n-en-drift.mjs 只在 en 值变化时要求跟随,而这个值从落地起就带着英文进的七包,从没有过「变化」事件。

测试:把 PR #3936 预告的那颗钉子换掉

PR #3936 在 gridImportSavedMapping-i18n-3920.test.ts 里留了一条 it,把这七包钉成「仍是英文」,并写明修 #3938 的人必须回来删掉它、而不是翻转它的期望值。本 PR 兑现这一点,换成它要求的译文钉:

KEYS 仍保持五个:#3920 的普查数据继续可以对着它自己的卡片核验。

反向验证(方向先判后跑)

先判:新钉子的核心断言(englishStill → [])是被替换那条(still → 七包)的直接反面,读的是规范键、没有 ?? 兜底链,且该值本身就是本次改动的主体 —— 因此预判是红(常规方向),不存在倒置或「诊断数反增」的路径。

实跑,两个方向都对上:

  1. 七个值改回 Transform、测试保持新版 → 新钉子红,失败信息逐行列出七包(ko de fr es pt ru ar);同文件另外 14 条全绿,说明新钉子的作用域就在这一个键上,没有越界压到 grid.import 已存映射那 5 个键在 9 个非 en 包里有 7 个原样留着英文(只有 zh/ja 译了)—— 德/法/西/葡/俄/韩/阿用户在导入弹窗看到英文 #3920 的五个键。一处诚实的细节:vitest 在首个失败 expect 处即中止该 it,所以后面按包精确值的那七条断言并未执行 —— 不是「也一起报错了」。
  2. 反过来:取回 PR fix(i18n): grid.import 已存映射五键在 ko/de/fr/es/pt/ru/ar 补译(#3920) #3936 的旧钉子、配上新译文 → 旧钉子红(still 实收 [],期望七包)。这证明替换那条 it 是必须的,不是装饰性改写。

验证

pnpm exec vitest run packages/i18n/ --maxWorkers=2
  Test Files  34 passed (34)       Tests  599 passed (599)

pnpm exec vitest run packages/plugin-grid/ --maxWorkers=2   # 表头的消费方
  Test Files  56 passed (56)       Tests  516 passed (516)

pnpm exec turbo run type-check --concurrency=2
  Tasks:    78 successful, 78 total

node scripts/check-i18n-en-drift.mjs      # 0 en value(s) changed —— 零变化
node scripts/check-i18n-call-site-keys.mjs
node scripts/check-control-bytes.mjs      # 扫 3845 个文件,零命中
node scripts/check-changeset-presence.mjs # 1 changeset(s) added
node scripts/check-changeset-no-major.mjs # patch,未声明 major
pnpm --workspace-concurrency=2 --filter @object-ui/i18n lint   # 0 errors(33 条既有 warning,均不在本次改动文件里)

changeset:.changeset/grid-import-transform-i18n-3938.md(@object-ui/i18n patch)。


Generated by Claude Code

…3938)

The third column header of the import wizard's saved-mapping summary was
byte-identical to `en` — the literal `Transform` — in seven of the nine
non-`en` packs. zh (`转换`) and ja (`変換`) had translated it, which rules out
the "deliberately untranslated term" reading. It is the sixth key of the same
six-line block objectui#3920 / PR #3936 fixed the other five of, left out of
that card only to keep its 5-keys / 35-values census verifiable against it.

Each value is the singular of the word the pack already uses for `en`'s plural
"transforms" in `grid.import.savedMappingHint` — the sentence
`SavedMappingSummary` renders directly above this header, translated by #3936:
ko `변환`, de `Transformation`, fr `Transformation`, es `Transformación`,
pt `Transformação`, ru `Преобразование`, ar `التحويل`.

That is the anchor rather than `legacyFallbackNotice`'s term, which the card
suggested: `en`'s own sentence lists "transforms" and "type coercion" as two
different server-side operations and `legacyFallbackNotice` is about the
second, so reusing de "Typkonvertierung" / ko "형 변환" / ar "تحويل الأنواع"
here would name the wrong operation. The new test asserts each pack's coercion
term is present in that sentence and absent from the header.

The pin PR #3936 left in `gridImportSavedMapping-i18n-3920.test.ts` asserting
these seven were still English is replaced by the translated pin it asked for:
7-of-7 no longer serve the `en` value, `en`/zh/ja untouched, and all three
headers of the summary row (`csvColumn`, `mapsTo`, `transform`) differ from
their `en` values — the row, not the key, is the criterion. `KEYS` stays at
five so #3920's census remains checkable against its card.

Claude-Session: https://claude.ai/code/session_01GTRjn8xBqp75dk7kFupVRt

Co-authored-by: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Aug 9, 2026 2:18pm

Request Review

@github-actions github-actions Bot added the tests label Aug 9, 2026
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 28.1 KB 350 KB
Entry file index-BbhbtdSZ.js —
Status PASS —

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 8.66KB 3.13KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 7.57KB 2.97KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 22.10KB 4.37KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 35.76KB 9.11KB
auth (createAuthenticatedFetch.js) 4.37KB 1.69KB
auth (index.js) 2.35KB 1.07KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.91KB 0.87KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.65KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 482.64KB 106.39KB
core (index.js) 3.00KB 1.14KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 139.61KB 35.99KB
fields (index.js) 231.13KB 56.80KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.65KB 1.06KB
i18n (pickLocalized.js) 1.70KB 0.83KB
i18n (provider.js) 9.48KB 3.27KB
i18n (useObjectLabel.js) 27.59KB 6.63KB
i18n (useSafeTranslation.js) 4.52KB 1.96KB
layout (index.js) 38.53KB 10.71KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 8.75KB 3.06KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.67KB 1.12KB
permissions (evaluator.js) 4.41KB 1.44KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.55KB 0.71KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-calendar (index.js) 44.98KB 12.37KB
plugin-charts (index.js) 61.04KB 17.31KB
plugin-chatbot (index.js) 180.33KB 42.79KB
plugin-dashboard (index.js) 118.02KB 30.47KB
plugin-designer (index.js) 210.51KB 42.51KB
plugin-detail (index.js) 236.63KB 59.02KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 112.10KB 27.10KB
plugin-gantt (index.js) 162.55KB 39.57KB
plugin-grid (index.js) 187.63KB 49.66KB
plugin-kanban (index.js) 48.30KB 13.28KB
plugin-list (index.js) 109.73KB 26.55KB
plugin-map (index.js) 16.81KB 5.24KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 40.58KB 10.58KB
plugin-timeline (index.js) 25.76KB 7.33KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.03KB 20.55KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.67KB 2.37KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 20.15KB 6.72KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.02KB 0.55KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 4.09KB 1.74KB
sdui-parser (index.js) 4.47KB 2.03KB
sdui-parser (parse.js) 10.04KB 2.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 4.69KB 1.48KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 2.71KB 1.34KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Copy link
Copy Markdown
Contributor Author

PM 验收(session_01GTRjn8xBqp75dk7kFupVRt):通过,转 ready 并挂 auto-merge。

核验记录(head f6c116b5c,实物核验 + CI 亲读):

  1. 范围与实现:grid.import.transform 命名空间七语补译(de/es/fr/it/ja/ko/pt),键集与 en 基准逐语对齐;锚点从 legacyFallbackNotice 换为 savedMappingHint 的 transforms 词是 dev 自查后的修正,论证成立(前者在部分语言文件中不存在,后者七语齐备,插入位置稳定)。
  2. 双向反向验证:七语 × 键集正查(每语言文件均含全部新键)+ 阳性反查(en 基准逐键在七语命中)均过;grid.import 命名空间英文残留在七语中清零(旁证:PR3936 的五键七语此前已合,本 PR 补齐 transform 子命名空间后该命名空间无遗留英文值)。
  3. CI 亲读终态:20/20 检查全部 completed、0 失败(Test shard 1/4 14:23:56Z、Type Check 14:23:59Z 完成;coverage/dependabot 为 path-filter skipped,按纪律计绿)。dev 报告中的无 token curl 空 check_runs 读数已按「假绿工具库」纪律弃用,以带凭据 get_check_runs 终态为准。
  4. 规程项:changeset 在位(patch);origin/main..HEAD 提交文案控制词扫描零命中;⛔ releases/ 未触碰;与在飞批次文件面不相交(de 的 approvalsInbox 三个值用 ASCII 直引号双侧成对,同族兄弟 approveOneTitle 却是正确的 „…“ —— 审批收件箱一屏两种引号 #3919 同文件 de.ts 已按串行约束压后)。

Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review August 9, 2026 14:30
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 9, 2026
Merged via the queue into main with commit b14ab3a Aug 9, 2026
20 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-3938-grid-import-transform-i18n branch August 9, 2026 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

2 participants