From 5ff83f2a6865bcc3276bfaf499da2c3b0a549cf7 Mon Sep 17 00:00:00 2001 From: cutefishd Date: Thu, 22 Apr 2021 02:30:46 +0800 Subject: [PATCH] Menu: Close window text modification --- qml/AppItem.qml | 3 ++- translations/zh_CN.ts | 17 +++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/qml/AppItem.qml b/qml/AppItem.qml index bef288f..a870ca2 100644 --- a/qml/AppItem.qml +++ b/qml/AppItem.qml @@ -71,8 +71,9 @@ DockItem { } MenuItem { - text: qsTr("Close All") visible: windowCount !== 0 + text: windowCount === 1 ? qsTr("Close window") + : qsTr("Close %1 windows").arg(windowCount) onTriggered: appModel.closeAllByAppId(model.appId) } } diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts index 1689d0e..636a687 100644 --- a/translations/zh_CN.ts +++ b/translations/zh_CN.ts @@ -4,24 +4,29 @@ AppItem - + Open 打开 - + Unpin 取消固定 - + Pin 固定 - - Close All - 关闭所有 + + Close window + 关闭窗口 + + + + Close %1 windows + 关闭%1个窗口