feat: add localization for "Already Using Latest Core Version" in English and Chinese
This commit is contained in:
@@ -36,7 +36,8 @@ function getAllSourceContent() {
|
||||
const WHITELIST_KEYS = [
|
||||
'theme.light',
|
||||
'theme.dark',
|
||||
'theme.system'
|
||||
'theme.system',
|
||||
"Already Using Latest Core Version"
|
||||
];
|
||||
|
||||
// 主流程
|
||||
|
||||
@@ -50,13 +50,13 @@ export const ClashCoreViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
setChangingCore(core);
|
||||
closeAllConnections();
|
||||
const errorMsg = await changeClashCore(core);
|
||||
|
||||
|
||||
if (errorMsg) {
|
||||
showNotice('error', errorMsg);
|
||||
setChangingCore(null);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
mutateVerge();
|
||||
setTimeout(() => {
|
||||
mutate("getClashConfig");
|
||||
@@ -89,7 +89,11 @@ export const ClashCoreViewer = forwardRef<DialogRef>((props, ref) => {
|
||||
showNotice('success', t(`Core Version Updated`));
|
||||
} catch (err: any) {
|
||||
setUpgrading(false);
|
||||
showNotice('error', err.response?.data?.message || err.toString());
|
||||
const errMsg = err.response?.data?.message || err.toString();
|
||||
const showMsg = errMsg.includes("already using latest version")
|
||||
? "Already Using Latest Core Version"
|
||||
: errMsg;
|
||||
showNotice('error', t(showMsg));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -270,6 +270,7 @@
|
||||
"Support %host, %port, %secret": "Support %host, %port, %secret",
|
||||
"Clash Core": "Clash Core",
|
||||
"Upgrade": "Upgrade",
|
||||
"Already Using Latest Core Version": "Already Using Latest Core Version",
|
||||
"Restart": "Restart",
|
||||
"Release Version": "Release Version",
|
||||
"Alpha Version": "Alpha Version",
|
||||
|
||||
@@ -270,6 +270,7 @@
|
||||
"Support %host, %port, %secret": "支持 %host, %port, %secret",
|
||||
"Clash Core": "Clash 内核",
|
||||
"Upgrade": "升级内核",
|
||||
"Already Using Latest Core Version": "已使用最新内核版本",
|
||||
"Restart": "重启内核",
|
||||
"Release Version": "正式版",
|
||||
"Alpha Version": "预览版",
|
||||
|
||||
Reference in New Issue
Block a user