From 38a9ad6a46ce5af21a8e0ba86bef8b492242ecde Mon Sep 17 00:00:00 2001 From: Nriver <6752679+Nriver@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:51:35 +0800 Subject: [PATCH] add translation for buttons: close pane button --- src/public/app/widgets/buttons/close_pane_button.js | 3 ++- src/public/translations/cn/translation.json | 3 +++ src/public/translations/en/translation.json | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/buttons/close_pane_button.js b/src/public/app/widgets/buttons/close_pane_button.js index 220fd2cca..b236894f0 100644 --- a/src/public/app/widgets/buttons/close_pane_button.js +++ b/src/public/app/widgets/buttons/close_pane_button.js @@ -1,3 +1,4 @@ +import { t } from "../../services/i18n.js"; import OnClickButtonWidget from "./onclick_button.js"; export default class ClosePaneButton extends OnClickButtonWidget { @@ -15,7 +16,7 @@ export default class ClosePaneButton extends OnClickButtonWidget { super(); this.icon("bx-x") - .title("Close this pane") + .title(t("close_pane_button.close_this_pane")) .titlePlacement("bottom") .onClick((widget, e) => { // to avoid split pane container detecting click within the pane which would try to activate this diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json index dc4c58b8d..93fb9f694 100644 --- a/src/public/translations/cn/translation.json +++ b/src/public/translations/cn/translation.json @@ -549,5 +549,8 @@ "october": "十月", "november": "十一月", "december": "十二月" + }, + "close_pane_button": { + "close_this_pane": "关闭此面板" } } diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 5e18cad10..a84c3d1ef 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -550,5 +550,8 @@ "october": "October", "november": "November", "december": "December" + }, + "close_pane_button": { + "close_this_pane": "Close this pane" } }