From c5294d68d4e77a340c2d2ab665314a111fe7f860 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Feb 2026 02:12:20 +0000 Subject: [PATCH 1/2] Initial plan From 9b38f3e4da7e18d3d919860dd3c89252b4312d84 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Feb 2026 02:20:49 +0000 Subject: [PATCH 2/2] fix: export resolveI18nLabel from @object-ui/react and use it for i18n label handling in plugin-designer Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com> --- packages/plugin-designer/src/AppCreationWizard.tsx | 3 ++- packages/plugin-designer/src/NavigationDesigner.tsx | 13 +++++++------ packages/react/src/index.ts | 3 +++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/plugin-designer/src/AppCreationWizard.tsx b/packages/plugin-designer/src/AppCreationWizard.tsx index 8fc8f4d39..b0a2f853f 100644 --- a/packages/plugin-designer/src/AppCreationWizard.tsx +++ b/packages/plugin-designer/src/AppCreationWizard.tsx @@ -48,6 +48,7 @@ import { } from 'lucide-react'; import { clsx } from 'clsx'; import { twMerge } from 'tailwind-merge'; +import { resolveI18nLabel } from '@object-ui/react'; import { useDesignerTranslation } from './hooks/useDesignerTranslation'; import { useConfirmDialog } from './hooks/useConfirmDialog'; @@ -524,7 +525,7 @@ function NavigationBuilderStep({ {item.icon} )} - {item.type === 'separator' ? t('appDesigner.separatorLabel') : item.label} + {item.type === 'separator' ? t('appDesigner.separatorLabel') : resolveI18nLabel(item.label)} { if (e.key === 'Enter') handleLabelCommit(); if (e.key === 'Escape') { - setLabelDraft(item.label); + setLabelDraft(resolveI18nLabel(item.label) ?? ''); setEditingLabel(false); } }} @@ -258,12 +259,12 @@ function NavItemRow({ )} onDoubleClick={() => { if (!readOnly && item.type !== 'separator') { - setLabelDraft(item.label); + setLabelDraft(resolveI18nLabel(item.label) ?? ''); setEditingLabel(true); } }} > - {item.label} + {resolveI18nLabel(item.label)} )} @@ -410,7 +411,7 @@ function PreviewItem({ item, depth }: { item: NavigationItem; depth: number }) { style={{ marginLeft: depth * 12 }} > - {item.label} + {resolveI18nLabel(item.label)} {item.type === 'group' && item.children?.map((child) => ( diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index 5a6afc8cb..ad7014ff4 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -13,6 +13,9 @@ export * from './components/form'; export * from './LazyPluginLoader'; export * from './spec-bridge'; +// i18n utilities +export { resolveI18nLabel } from './utils/i18n'; + // Built-in i18n support export { I18nProvider,