fix: Chinese word order problem (#765)

This commit is contained in:
Möbius 2023-04-25 15:37:51 +08:00 committed by GitHub
parent 3e1d5fb765
commit f1bb9b7b35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View file

@ -46,7 +46,7 @@
"feed": "订阅源",
"rule": "规则",
"then": "时",
"of": "of",
"of": "中的",
"yes": "是",
"no": "否",
"filter": "文件类型",
@ -135,7 +135,7 @@
"dark": "浅色模式",
"light": "深色模式"
},
"torrentsCount": "列表中无种子 | {n} 个种子 | {n} 个种子"
"torrentsCount": "列表中无种子 | {n} 个种子 | {n} 个种子"
},
"modals": {
"newFeed": {

View file

@ -21,9 +21,12 @@ export default {
getAuthenticated: (state: StoreState) => () => state.authenticated,
getTorrentCountString: (state: StoreState) => () => {
if (state.selected_torrents && state.selected_torrents.length) {
return `${state.selected_torrents.length} ${i18n.t('of')} ${i18n.tc('navbar.torrentsCount', state.filteredTorrentsCount)}`
if (i18n.locale === 'zh-hans'||i18n.locale === 'zh-hant') {
return `${i18n.tc('navbar.torrentsCount', state.filteredTorrentsCount)}${i18n.t('of')} ${state.selected_torrents.length}`
}else{
return `${state.selected_torrents.length} ${i18n.t('of')} ${i18n.tc('navbar.torrentsCount', state.filteredTorrentsCount)}`
}
}
return i18n.tc('navbar.torrentsCount', state.filteredTorrentsCount)
},
getSearchPlugins: (state: StoreState) => () => state.searchPlugins