From 1bbf4414d005bba23aea80b3f98b0110c1b44ccc Mon Sep 17 00:00:00 2001 From: SuZhou-Joe Date: Tue, 8 Aug 2023 17:39:13 +0800 Subject: [PATCH] feat: update Signed-off-by: SuZhou-Joe --- src/core/server/workspaces/workspaces_service.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/server/workspaces/workspaces_service.ts b/src/core/server/workspaces/workspaces_service.ts index 1d46281b6f56..d0d4f59ebc61 100644 --- a/src/core/server/workspaces/workspaces_service.ts +++ b/src/core/server/workspaces/workspaces_service.ts @@ -3,6 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ import { URL } from 'node:url'; +import { i18n } from '@osd/i18n'; import { CoreService } from '../../types'; import { CoreContext } from '../core_context'; import { InternalHttpServiceSetup } from '../http'; @@ -103,7 +104,7 @@ export class WorkspacesService private async checkAndCreateWorkspace( internalRepository: ISavedObjectsRepository, workspaceId: string, - workspaceAttribute: Omit, + workspaceAttribute: Omit, permissions?: Permissions ) { /** @@ -150,7 +151,9 @@ export class WorkspacesService internalRepository, PUBLIC_WORKSPACE, { - name: 'public', + name: i18n.translate('workspaces.public.workspace.default.name', { + defaultMessage: 'public', + }), }, publicWorkspaceACL.getPermissions() ), @@ -158,7 +161,9 @@ export class WorkspacesService internalRepository, MANAGEMENT_WORKSPACE, { - name: 'Management', + name: i18n.translate('workspaces.management.workspace.default.name', { + defaultMessage: 'Management', + }), }, managementWorkspaceACL.getPermissions() ),