From 76d3323e8f607d4466158b62bdb36e6c403539f3 Mon Sep 17 00:00:00 2001 From: F_Chao Fengchao <834317452@qq.com> Date: Thu, 30 May 2024 11:37:40 +0800 Subject: [PATCH] Modify the translation method of PasswordBar.qml to i18n. --- shell/contents/lockscreen/PasswordBar.qml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/contents/lockscreen/PasswordBar.qml b/shell/contents/lockscreen/PasswordBar.qml index 381f75b8..33fddae4 100644 --- a/shell/contents/lockscreen/PasswordBar.qml +++ b/shell/contents/lockscreen/PasswordBar.qml @@ -24,7 +24,7 @@ Rectangle { // for displaying temporary number in pin dot display property int previewCharIndex: -2 - property string pinLabel: qsTr("Enter PIN") + property string pinLabel: i18n("Enter PIN") property bool keypadOpen @@ -41,11 +41,11 @@ Rectangle { target: root.lockScreenState function onUnlockSucceeded() { - root.pinLabel = qsTr("Logging in..."); + root.pinLabel = i18n("Logging in..."); } function onUnlockFailed() { - root.pinLabel = qsTr("Wrong PIN"); + root.pinLabel = i18n("Wrong PIN"); } function onPasswordChanged() { @@ -85,8 +85,8 @@ Rectangle { function keyPress(data) { if (!lockScreenState.waitingForAuth) { - if (root.pinLabel !== qsTr("Enter PIN")) { - root.pinLabel = qsTr("Enter PIN"); + if (root.pinLabel !== i18n("Enter PIN")) { + root.pinLabel = i18n("Enter PIN"); } root.previewCharIndex = lockScreenState.password.length;