fix bugs & add batchdelete peer & add peer to ab

This commit is contained in:
ljw
2024-09-29 11:50:23 +08:00
parent 8be855ff3e
commit 777510c7ec
14 changed files with 427 additions and 65 deletions
+2 -3
View File
@@ -1,17 +1,16 @@
import en from '@/utils/i18n/en.json'
import zhCN from '@/utils/i18n/zh_CN.json'
import { useAppStore } from '@/store/app'
import { pinia } from '@/store'
export function T (key, params, num = 0) {
const appStore = useAppStore(pinia)
const appStore = useAppStore()
const lang = appStore.setting.lang
const trans = lang === 'zh-CN' ? zhCN : en
const tran = trans[key]
if (!tran) {
return key
}
const msg = num > 0 ? (tran.Other ? tran.Other : tran.One) : tran.One
const msg = num > 1 ? (tran.Other ? tran.Other : tran.One) : tran.One
//msg 是这样 {name} is name
//params 是这样 {name: 'zhangsan'}
//替换