@@ -14,7 +14,7 @@ import { activityRowToFeedItem, ArrangedRelatedTab, auditEntriesToFeedItems, bod
1414import { Empty , EmptyTitle , EmptyDescription , Button , PageHeaderActions , PageHeaderTrailingContext , PanelToggles , type PanelToggleItem } from '@object-ui/components' ;
1515import { useAuth , createAuthenticatedFetch } from '@object-ui/auth' ;
1616import { usePermissions } from '@object-ui/permissions' ;
17- import { useDisplayLocale , useLocalization } from '@object-ui/i18n' ;
17+ import { useDisplayLocale , useLocalization , pickLocalized } from '@object-ui/i18n' ;
1818import { ActionProvider , useObjectTranslation , useObjectLabel , useActionTextLocalizer , usePageAssignment , isRecordPageOf , useMetadata , RecordContextProvider , SchemaRenderer , DiscussionContextProvider , HighlightFieldsProvider , InlineEditProvider , resolveApprovalLock , useGlobalUndo , useDataInvalidation , notifyDataChanged , subscribeDataChanges , dataChangeMatches , useRowPredicate , classifyLoadError , extractWriteErrorMessage } from '@object-ui/react' ;
1919import { buildExpandFields , captureUpdateUndoData , recordDelete , resolveAffordance , resolveRecordIdParamSeed , userActionPredicates , withoutDeniedFields , type AffordanceGrantPrincipal , type SchemaLike } from '@object-ui/core' ;
2020import { toast } from 'sonner' ;
@@ -772,7 +772,7 @@ export function RecordDetailView({ dataSource, objects, onEdit, objectNameOverri
772772 // The tenant default currency (ADR-0053) a `dynamic` currency diff reads,
773773 // the same `useLocalization().currency` the record page's cells read.
774774 const { currency : tenantCurrency } = useLocalization ( ) ;
775- const { objectLabel, objectPluralLabel, viewLabel : _vLabel , sectionLabel, actionParamText, actionParamOptionLabel, actionDescription, actionResultDialog, fieldLabel, fieldOptionLabel } = useObjectLabel ( ) ;
775+ const { objectLabel, objectPluralLabel, viewLabel : _vLabel , sectionLabel, actionParamText, actionParamOptionLabel, actionDescription, actionSubmitText , actionResultDialog, fieldLabel, fieldOptionLabel } = useObjectLabel ( ) ;
776776 // label + confirmText + successMessage through ONE call (objectui#4265) —
777777 // the three keys of an `_actions.<name>` bundle entry can no longer be
778778 // localized apart from one another on this surface.
@@ -1354,6 +1354,10 @@ export function RecordDetailView({ dataSource, objects, onEdit, objectNameOverri
13541354 : p . options ,
13551355 } ) ) ;
13561356 const declaredDescription = actionDescription ( objForI18n , action ?. name , action ?. description ) ;
1357+ // The submit button's verb, resolved as `useConsoleActionRuntime`
1358+ // resolves it: the bundle entry first, then the authored `I18nLabel`
1359+ // collapsed to the active language; absent, the dialog says "Confirm".
1360+ const submitText = actionSubmitText ( objForI18n , action ?. name , pickLocalized ( action ?. submitText , language ) || undefined ) ;
13571361 setParamState ( {
13581362 open : true ,
13591363 params : localized ,
@@ -1374,14 +1378,15 @@ export function RecordDetailView({ dataSource, objects, onEdit, objectNameOverri
13741378 // `${...}` holes in the description and each `helpText` are filled in
13751379 // the runner's template scope, as `confirmText` is (objectui#12967).
13761380 description : interpolate && declaredDescription ? interpolate ( declaredDescription ) : declaredDescription ,
1381+ submitText,
13771382 interpolate,
13781383 resolve,
13791384 // The runner's `run`, as `useConsoleActionRuntime` forwards it: a
13801385 // refused run keeps what the user typed (objectui#13161).
13811386 run,
13821387 } ) ;
13831388 } ) ;
1384- } , [ objectName , objectDef , objects , fieldLabel , fieldOptionLabel , actionParamText , actionParamOptionLabel ] ) ;
1389+ } , [ objectName , objectDef , objects , fieldLabel , fieldOptionLabel , actionParamText , actionParamOptionLabel , actionSubmitText , language ] ) ;
13851390
13861391 // Global undo/redo (Ctrl+Z), backed by the dataSource — the success toast's
13871392 // "Undo" button (for `undoable` actions) restores the record's prior values.
0 commit comments