4 Star 0 Fork 6

src-openEuler/kiran-session-guard

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0016-fix-polkit-ts-fix-untranslated-text-from-polkit-agen.patch 5.94 KB
一键复制 编辑 原始数据 按行查看 历史
liubuguiii 提交于 2024-04-09 17:11 +08:00 . sync 2.5.1-11
From a99db7807474f51454a0941d8ddbe272b6945050 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
Date: Tue, 6 Feb 2024 14:22:04 +0800
Subject: [PATCH 16/16] fix(polkit ts): fix untranslated text from polkit-agent
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 修复kiran-polkit-agent中未翻译的文本
---
src/polkit-agent/dialog.cpp | 2 +-
src/polkit-agent/listener.cpp | 2 +-
translations/kiran-polkit-agent.zh_CN.ts | 39 ++++++++++++++++--------
3 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/src/polkit-agent/dialog.cpp b/src/polkit-agent/dialog.cpp
index 460e834..e7da7fe 100644
--- a/src/polkit-agent/dialog.cpp
+++ b/src/polkit-agent/dialog.cpp
@@ -253,7 +253,7 @@ void Dialog::onAuthComplete(bool success)
}
else
{
- onAuthShowMessage("Authentication error", MessageTypeError);
+ onAuthShowMessage(tr("Authentication error"), MessageTypeError);
ui->edit->lineEdit()->clear();
ui->edit->setEnabled(false);
diff --git a/src/polkit-agent/listener.cpp b/src/polkit-agent/listener.cpp
index 7474329..8a79c0a 100644
--- a/src/polkit-agent/listener.cpp
+++ b/src/polkit-agent/listener.cpp
@@ -147,7 +147,7 @@ void Listener::onAuthDialogCompleted(bool isSuccess)
{
if (!isSuccess)
{
- m_result->setError("Authentication Error");
+ m_result->setError(tr("Authentication Error"));
}
m_inProcess = false;
diff --git a/translations/kiran-polkit-agent.zh_CN.ts b/translations/kiran-polkit-agent.zh_CN.ts
index ae75cc2..452e955 100644
--- a/translations/kiran-polkit-agent.zh_CN.ts
+++ b/translations/kiran-polkit-agent.zh_CN.ts
@@ -74,7 +74,7 @@
<context>
<name>Kiran::SessionGuard::AuthController</name>
<message>
- <location filename="../lib/auth-proxy/auth-controller.cpp" line="290"/>
+ <location filename="../lib/auth-proxy/auth-controller.cpp" line="311"/>
<source>Failed to authenticate</source>
<translation>认证失败</translation>
</message>
@@ -82,32 +82,32 @@
<context>
<name>Kiran::SessionGuard::AuthTypeSwitcher</name>
<message>
- <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="55"/>
+ <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="68"/>
<source>face auth</source>
<translation>人脸认证</translation>
</message>
<message>
- <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="56"/>
+ <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="69"/>
<source>finger auth</source>
<translation>人脸认证</translation>
</message>
<message>
- <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="57"/>
+ <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="70"/>
<source>password auth</source>
<translation>密码认证</translation>
</message>
<message>
- <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="58"/>
+ <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="71"/>
<source>finger vein auth</source>
<translation>指静脉认证</translation>
</message>
<message>
- <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="59"/>
+ <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="72"/>
<source>iris auth</source>
<translation>虹膜认证</translation>
</message>
<message>
- <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="60"/>
+ <location filename="../lib/common-widgets/auth-type-switcher.cpp" line="73"/>
<source>ukey auth</source>
<translation>UKey认证</translation>
</message>
@@ -120,29 +120,44 @@
<translation>认证</translation>
</message>
<message>
- <location filename="../src/polkit-agent/dialog.cpp" line="187"/>
+ <location filename="../src/polkit-agent/dialog.cpp" line="228"/>
<source>fingerprint auth</source>
<translation>指纹认证</translation>
</message>
<message>
- <location filename="../src/polkit-agent/dialog.cpp" line="188"/>
+ <location filename="../src/polkit-agent/dialog.cpp" line="229"/>
<source>face auth</source>
<translation>人脸认证</translation>
</message>
<message>
- <location filename="../src/polkit-agent/dialog.cpp" line="189"/>
+ <location filename="../src/polkit-agent/dialog.cpp" line="230"/>
<source>fingervein auth</source>
<translation>指静脉认证</translation>
</message>
+ <message>
+ <location filename="../src/polkit-agent/dialog.cpp" line="231"/>
+ <source>iris auth</source>
+ <translation>虹膜认证</translation>
+ </message>
+ <message>
+ <location filename="../src/polkit-agent/dialog.cpp" line="256"/>
+ <source>Authentication error</source>
+ <translation>认证错误</translation>
+ </message>
</context>
<context>
<name>Kiran::SessionGuard::PolkitAgent::Listener</name>
<message>
- <location filename="../src/polkit-agent/listener.cpp" line="51"/>
- <location filename="../src/polkit-agent/listener.cpp" line="72"/>
+ <location filename="../src/polkit-agent/listener.cpp" line="73"/>
+ <location filename="../src/polkit-agent/listener.cpp" line="94"/>
<source>Existing authentication is in progress, please try again later</source>
<translation>已存在正在进行的认证,请稍后再进行尝试</translation>
</message>
+ <message>
+ <location filename="../src/polkit-agent/listener.cpp" line="150"/>
+ <source>Authentication Error</source>
+ <translation>认证错误</translation>
+ </message>
</context>
<context>
<name>Listener</name>
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/kiran-session-guard.git
git@gitee.com:src-openeuler/kiran-session-guard.git
src-openeuler
kiran-session-guard
kiran-session-guard
master

搜索帮助

371d5123 14472233 46e8bd33 14472233