fix: bundle install title

This commit is contained in:
Joel 2024-11-21 15:22:19 +08:00
parent 351615fb98
commit 2560d3edae
4 changed files with 6 additions and 4 deletions

View File

@ -34,9 +34,7 @@ const InstallBundle: FC<Props> = ({
if (step === InstallStep.uploadFailed)
return t(`${i18nPrefix}.uploadFailed`)
if (step === InstallStep.installed)
return t(`${i18nPrefix}.installedSuccessfully`)
if (step === InstallStep.installFailed)
return t(`${i18nPrefix}.installFailed`)
return t(`${i18nPrefix}.installComplete`)
return t(`${i18nPrefix}.installPlugin`)
}, [step, t])

View File

@ -34,13 +34,15 @@ const InstallFromLocalPackage: React.FC<InstallFromLocalPackageProps> = ({
const getTitle = useCallback(() => {
if (step === InstallStep.uploadFailed)
return t(`${i18nPrefix}.uploadFailed`)
if (isBundle && step === InstallStep.installed)
return t(`${i18nPrefix}.installComplete`)
if (step === InstallStep.installed)
return t(`${i18nPrefix}.installedSuccessfully`)
if (step === InstallStep.installFailed)
return t(`${i18nPrefix}.installFailed`)
return t(`${i18nPrefix}.installPlugin`)
}, [step, t])
}, [isBundle, step, t])
const { getIconUrl } = useGetIcon()

View File

@ -94,6 +94,7 @@ const translation = {
},
installModal: {
installPlugin: 'Install Plugin',
installComplete: 'Installation complete',
installedSuccessfully: 'Installation successful',
installedSuccessfullyDesc: 'The plugin has been installed successfully.',
uploadFailed: 'Upload failed',

View File

@ -94,6 +94,7 @@ const translation = {
},
installModal: {
installPlugin: '安装插件',
installComplete: '安装完成',
installedSuccessfully: '安装成功',
installedSuccessfullyDesc: '插件已成功安装。',
uploadFailed: '上传失败',