chore: update i18n

This commit is contained in:
wonfen
2026-07-24 11:53:50 +08:00
parent 82c486923b
commit bce83d5c6f
123 changed files with 2178 additions and 277 deletions
+3 -3
View File
@@ -70,8 +70,8 @@ export const TestItem = ({
})
const menu = [
{ label: 'Edit', handler: onEditTest },
{ label: 'Delete', handler: onDelete },
{ label: t('shared.actions.edit'), handler: onEditTest },
{ label: t('shared.actions.delete'), handler: onDelete },
]
useEffect(() => {
@@ -220,7 +220,7 @@ export const TestItem = ({
sx={{ minWidth: 120 }}
dense
>
{t(item.label)}
{item.label}
</MenuItem>
))}
</Menu>
+11 -5
View File
@@ -68,8 +68,12 @@ export const TestViewer = forwardRef<TestViewerRef, Props>(
formIns.handleSubmit(async (form) => {
setLoading(true)
try {
if (!form.name) throw new Error('`Name` should not be null')
if (!form.url) throw new Error('`Url` should not be null')
if (!form.name) {
throw new Error(t('tests.modals.test.errors.nameRequired'))
}
if (!form.url) {
throw new Error(t('tests.modals.test.errors.urlRequired'))
}
let newList
let uid
@@ -84,7 +88,7 @@ export const TestViewer = forwardRef<TestViewerRef, Props>(
'image/svg+xml',
)
if (doc.querySelector('parsererror')) {
throw new Error('`Icon`svg format error')
throw new Error(t('tests.modals.test.errors.invalidSvg'))
}
}
@@ -95,7 +99,9 @@ export const TestViewer = forwardRef<TestViewerRef, Props>(
await patchVerge({ test_list: newList })
onChange(uid)
} else {
if (!form.uid) throw new Error('UID not found')
if (!form.uid) {
throw new Error(t('tests.modals.test.errors.uidMissing'))
}
uid = form.uid
await patchTestList(uid, form)
@@ -105,7 +111,7 @@ export const TestViewer = forwardRef<TestViewerRef, Props>(
setLoading(false)
setTimeout(() => formIns.reset(), 500)
} catch (err: any) {
showNotice.error(err)
showNotice.error('tests.modals.test.errors.saveFailed', err)
setLoading(false)
}
}),