Skip to content

Commit

Permalink
docs(i18n): add translation for open button
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed Dec 20, 2023
1 parent 7099598 commit 855f6c2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/packages/artalk/src/components/error-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function showErrorDialog(opts: ErrorDialogOptions) {
}

if (opts.onOpenSidebar) {
const $openSidebar = Utils.createElement('<span atk-only-admin-show> | <span style="cursor:pointer;">打开控制台</span></span>')
const $openSidebar = Utils.createElement(`<span atk-only-admin-show> | <span style="cursor:pointer;">${$t('open')+$t('ctrlCenter')}</span></span>`)
errEl.appendChild($openSidebar)
$openSidebar.onclick = () => opts.onOpenSidebar && opts.onOpenSidebar()
}
Expand Down
1 change: 1 addition & 0 deletions ui/packages/artalk/src/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ export default {
updateMsg: 'Please update Artalk {name} to get the full experience',
currentVersion: 'Current Version',
ignore: 'Ignore',
open: 'Open'
}
1 change: 1 addition & 0 deletions ui/packages/artalk/src/i18n/jp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ export default defineLocaleExternal('jp', {
updateMsg: 'フルな体験をするためには、Artalk {name} をアップデートしてください',
currentVersion: '現在のバージョン',
ignore: '無視する',
open: 'オープン',
}, ['jp-JP'])
1 change: 1 addition & 0 deletions ui/packages/artalk/src/i18n/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const zhCN: I18n = {
updateMsg: '请更新 Artalk {name} 以获得完整体验',
currentVersion: '当前版本',
ignore: '忽略',
open: '打开',
}

export default zhCN
1 change: 1 addition & 0 deletions ui/packages/artalk/src/i18n/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ export default defineLocaleExternal('zh-TW', {
updateMsg: '請更新 Artalk {name} 以獲得完整體驗',
currentVersion: '當前版本',
ignore: '忽略',
open: '打开',
})
2 changes: 1 addition & 1 deletion ui/packages/artalk/src/plugins/conf-remoter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function loadConf(ctx: ContextApi) {
errMsg: err.msg || String(err),
errData: err.data,
retryFn: () => loadConf(ctx),
onOpenSidebar:() => ctx.get('user').getData().isAdmin ? ctx.showSidebar({
onOpenSidebar: ctx.get('user').getData().isAdmin ? () => ctx.showSidebar({
view: sidebarOpenView as any
}) : undefined // only show open sidebar button when user is admin
})
Expand Down

0 comments on commit 855f6c2

Please sign in to comment.