add translation for buttons: left pane toggle

This commit is contained in:
Nriver 2024-08-01 14:18:21 +08:00
parent 8a0fec0a63
commit 989a0d6cd9
3 changed files with 11 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import options from "../../services/options.js"; import options from "../../services/options.js";
import splitService from "../../services/resizer.js"; import splitService from "../../services/resizer.js";
import CommandButtonWidget from "./command_button.js"; import CommandButtonWidget from "./command_button.js";
import { t } from "../../services/i18n.js";
export default class LeftPaneToggleWidget extends CommandButtonWidget { export default class LeftPaneToggleWidget extends CommandButtonWidget {
constructor() { constructor() {
@ -13,8 +14,8 @@ export default class LeftPaneToggleWidget extends CommandButtonWidget {
: "bx-chevrons-right"; : "bx-chevrons-right";
this.settings.title = () => options.is('leftPaneVisible') this.settings.title = () => options.is('leftPaneVisible')
? "Hide panel" ? t("left_pane_toggle.hide_panel")
: "Open panel"; : t("left_pane_toggle.show_panel");
this.settings.command = () => options.is('leftPaneVisible') this.settings.command = () => options.is('leftPaneVisible')
? "hideLeftPane" ? "hideLeftPane"

View File

@ -584,5 +584,9 @@
"show_help": "显示帮助", "show_help": "显示帮助",
"about": "关于 TriliumNext 笔记", "about": "关于 TriliumNext 笔记",
"logout": "登出" "logout": "登出"
},
"left_pane_toggle": {
"hide_panel": "隐藏面板",
"show_panel": "显示面板"
} }
} }

View File

@ -585,5 +585,9 @@
"show_help": "Show Help", "show_help": "Show Help",
"about": "About TriliumNext Notes", "about": "About TriliumNext Notes",
"logout": "Logout" "logout": "Logout"
},
"left_pane_toggle": {
"hide_panel": "Hide panel",
"open_panel": "Open panel"
} }
} }