From 9bc3ef711b7041e3a059140c8df664d365023cc3 Mon Sep 17 00:00:00 2001 From: star <15031259256@163.com> Date: Wed, 14 Jun 2023 10:42:47 +0800 Subject: [PATCH] chore(console): rename the display of builtin (#2351) --- console/src/domain/job/components/JobForm.tsx | 10 +++++----- console/src/i18n/locales.ts | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/console/src/domain/job/components/JobForm.tsx b/console/src/domain/job/components/JobForm.tsx index 794124ebbb..c528346612 100644 --- a/console/src/domain/job/components/JobForm.tsx +++ b/console/src/domain/job/components/JobForm.tsx @@ -57,11 +57,6 @@ export interface IJobFormProps { onSubmit: (data: ICreateJobSchema) => Promise } -const RuntimeType = { - BUILTIN: 'builtIn', - OTHER: 'other', -} - export default function JobForm({ job, onSubmit }: IJobFormProps) { const styles = useStyles() const [values, setValues] = useState(undefined) @@ -74,6 +69,11 @@ export default function JobForm({ job, onSubmit }: IJobFormProps) { const [t] = useTranslation() // const [resourcePool, setResourcePool] = React.useState() + const RuntimeType = { + BUILTIN: t('runtime.image.builtin'), + OTHER: t('runtime.image.other'), + } + const [form] = useForm() const history = useHistory() diff --git a/console/src/i18n/locales.ts b/console/src/i18n/locales.ts index a936a33a17..c0e688d17f 100644 --- a/console/src/i18n/locales.ts +++ b/console/src/i18n/locales.ts @@ -86,6 +86,14 @@ const runtime = { en: 'Image Built', zh: '镜像已构建', }, + 'runtime.image.builtin': { + en: 'Built-in', + zh: '内置', + }, + 'runtime.image.other': { + en: 'Other', + zh: '其他', + }, } const model = {