+ {shouldShowWarning + ? changeAccessModalWarning + : i18n.translate('workspace.detail.collaborator.changeAccessLevel.confirmation', { + defaultMessage: + 'Do you want to change access level of {numCollaborators} collaborator{pluralSuffix} to "{accessLevel}"?', + values: { + numCollaborators: selections.length, + pluralSuffix: selections.length > 1 ? 's' : '', + accessLevel: type, + }, + })} +
+- {i18n.translate('workspace.detail.collaborator.changeAccessLevel.confirmation', { + : item + ); + }); + + const result = await handleSubmitPermissionSettings( + newSettings as WorkspacePermissionSetting[] + ); + + if (result?.success) { + notifications?.toasts?.addSuccess({ + title: i18n.translate('workspace.detail.collaborator.change.access.success.title', { + defaultMessage: 'The access level changed', + }), + text: i18n.translate('workspace.detail.collaborator.change.access.success.body', { defaultMessage: - 'Do you want to change access level to {numCollaborators} collaborator{pluralSuffix, select, true {} other {s}} to "{accessLevel}"?', + 'The access level is changed to {level} for {num} collaborator{pluralSuffix, select, true {} other {s}}.', values: { - numCollaborators: selection.length, - pluralSuffix: selection.length === 1, - accessLevel: WORKSPACE_ACCESS_LEVEL_NAMES[level], + level: WORKSPACE_ACCESS_LEVEL_NAMES[level], + num: selection.length, + pluralSuffix: selection.length === 1 ? '' : 's', }, - })} -
-