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
+7 -2
View File
@@ -1,4 +1,5 @@
import { useLockFn } from 'ahooks'
import i18n from 'i18next'
import { getVersion } from 'tauri-plugin-mihomo-api'
import {
@@ -47,10 +48,14 @@ const hasClashInfoPayload = (patch: ClashInfoPatch) =>
const validatePortRange = (port: number) => {
if (port < 1000) {
throw new Error('The port should not < 1000')
throw new Error(
i18n.t(($) => $.settings.modals.clashPort.messages.portTooLow),
)
}
if (port > 65535) {
throw new Error('The port should not > 65536')
throw new Error(
i18n.t(($) => $.settings.modals.clashPort.messages.portTooHigh),
)
}
}