mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-18 18:02:08 +08:00
chore: update i18n
This commit is contained in:
@@ -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),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user