add translation for buttons: move pane button

This commit is contained in:
Nriver 2024-08-01 14:20:33 +08:00
parent 989a0d6cd9
commit 355c4164c9
3 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import OnClickButtonWidget from "./onclick_button.js"; import OnClickButtonWidget from "./onclick_button.js";
import appContext from "../../components/app_context.js"; import appContext from "../../components/app_context.js";
import { t } from "../../services/i18n.js";
export default class MovePaneButton extends OnClickButtonWidget { export default class MovePaneButton extends OnClickButtonWidget {
constructor(isMovingLeft) { constructor(isMovingLeft) {
@ -8,7 +9,7 @@ export default class MovePaneButton extends OnClickButtonWidget {
this.isMovingLeft = isMovingLeft; this.isMovingLeft = isMovingLeft;
this.icon(isMovingLeft ? "bx-chevron-left" : "bx-chevron-right") this.icon(isMovingLeft ? "bx-chevron-left" : "bx-chevron-right")
.title(isMovingLeft ? "Move left" : "Move right") .title(isMovingLeft ? t("move_pane_button.move_left") : t("move_pane_button.move_right"))
.titlePlacement("bottom") .titlePlacement("bottom")
.onClick(async (widget, e) => { .onClick(async (widget, e) => {
e.stopPropagation(); e.stopPropagation();

View File

@ -588,5 +588,9 @@
"left_pane_toggle": { "left_pane_toggle": {
"hide_panel": "隐藏面板", "hide_panel": "隐藏面板",
"show_panel": "显示面板" "show_panel": "显示面板"
},
"move_pane_button": {
"move_left": "向左移动",
"move_right": "向右移动"
} }
} }

View File

@ -589,5 +589,9 @@
"left_pane_toggle": { "left_pane_toggle": {
"hide_panel": "Hide panel", "hide_panel": "Hide panel",
"open_panel": "Open panel" "open_panel": "Open panel"
},
"move_pane_button": {
"move_left": "Move left",
"move_right": "Move right"
} }
} }