From 9320a548f4c2c2b6968ab7d992d0def912e29ced Mon Sep 17 00:00:00 2001 From: Nriver <6752679+Nriver@users.noreply.github.com> Date: Thu, 1 Aug 2024 14:32:53 +0800 Subject: [PATCH] add translation for buttons: protected_session_status.js --- src/public/app/widgets/buttons/protected_session_status.js | 5 +++-- src/public/translations/cn/translation.json | 5 ++++- src/public/translations/en/translation.json | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/public/app/widgets/buttons/protected_session_status.js b/src/public/app/widgets/buttons/protected_session_status.js index b218e6bde..2a9a14f14 100644 --- a/src/public/app/widgets/buttons/protected_session_status.js +++ b/src/public/app/widgets/buttons/protected_session_status.js @@ -1,3 +1,4 @@ +import { t } from "../../services/i18n.js"; import protectedSessionHolder from "../../services/protected_session_holder.js"; import CommandButtonWidget from "./command_button.js"; @@ -12,8 +13,8 @@ export default class ProtectedSessionStatusWidget extends CommandButtonWidget { : "bx-shield-quarter"; this.settings.title = () => protectedSessionHolder.isProtectedSessionAvailable() - ? "Protected session is active. Click to leave protected session." - : "Click to enter protected session"; + ? t("protected_session_status.active") + : t("protected_session_status.inactive"); this.settings.command = () => protectedSessionHolder.isProtectedSessionAvailable() ? "leaveProtectedSession" diff --git a/src/public/translations/cn/translation.json b/src/public/translations/cn/translation.json index 0cb729e77..158eabf4d 100644 --- a/src/public/translations/cn/translation.json +++ b/src/public/translations/cn/translation.json @@ -611,6 +611,9 @@ "onclick_button": { "hdie": "隐藏", "no_click_handler": "按钮组件'{componentId}'没有定义点击处理程序" + }, + "protected_session_status": { + "active": "受保护的会话已激活。点击退出受保护的会话。", + "inactive": "点击进入受保护的会话" } - } diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 83a3e96ea..6ca0d39cc 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -612,6 +612,9 @@ "onclick_button": { "hide": "hide", "no_click_handler": "Button widget '{componentId}' has no defined click handler" + }, + "protected_session_status": { + "active": "Protected session is active. Click to leave protected session.", + "inactive": "Click to enter protected session" } - }