Skip to content

sync: from linuxdeepin/dde-session-shell - #524

Open
deepin-ci-robot wants to merge 1 commit into
masterfrom
sync-pr-75-nosync
Open

sync: from linuxdeepin/dde-session-shell#524
deepin-ci-robot wants to merge 1 commit into
masterfrom
sync-pr-75-nosync

Conversation

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#75

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @deepin-ci-robot, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-ci-robot

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot
deepin-ci-robot force-pushed the sync-pr-75-nosync branch 12 times, most recently from f1ead2c to e9d706c Compare August 8, 2026 17:02
Synchronize source files from linuxdeepin/dde-session-shell.

Source-pull-request: linuxdeepin/dde-session-shell#75
@deepin-ci-robot

Copy link
Copy Markdown
Contributor Author

deepin pr auto review

★ 总体评分:79分(0-100之间的整数)

■ 【总体评价】

代码完成了多模块葡萄牙语翻译的补全与新增,但存在格式规范错误与翻译一致性问题
语法逻辑与代码质量各存在轻微缺陷,根据多维度不通过规则限定在70-79分区间

■ 【详细分析】

  • 1.语法逻辑(存在错误)✕

translations/dde-session-shell_pt.ts 中处理带 numerus="yes" 的复数翻译时,第三个 <numerusform> 标签内错误使用了 %1 占位符。在 Qt 翻译系统中,复数形式必须统一使用 %n 进行占位,使用 %1 会导致该复数分支下的数字无法被正确替换。此外,新增文件 plugins/login-gesture/translations/login-gesture_pt.ts 末尾缺少换行符(Diff提示 \ No newline at end of file),不符合 POSIX 文本文件标准。
潜在问题:复数形式翻译在特定语言环境下显示异常;文件末尾无换行符可能导致部分解析工具或版本控制系统合并时产生警告或异常。
建议:将复数翻译中的 %1 统一修正为 %n;在 login-gesture_pt.ts 文件末尾补充一个空行。

  • 2.代码质量(一般)✕

新增的 login-gesture_pt.ts 第77行中,将 <source>Ok</source> 翻译为 <translation>Ok</translation>,但在同一次提交的 login-gesture_pt_BR.ts 中,却将同样的源文翻译从 Ok 修正为了 OK,两者在相同源文的大小写处理上存在明显的不一致。另外,dde-session-shell_pt.ts 第87行翻译文本 Por favor introduza a chave de segurança 末尾包含多余的空格字符。
潜在问题:相同源文在不同地区变体翻译中风格不统一;翻译字符串末尾的多余空格可能在 UI 渲染时导致不必要的间距。
建议:将 login-gesture_pt.ts 中的 Ok 统一修改为 OK;删除 dde-session-shell_pt.ts 中翻译字符串末尾的空格。

  • 3.代码性能(无性能问题)✓

本次变更为纯静态 XML 翻译资源文件的新增与修改,不涉及任何算法逻辑、循环、系统调用或内存分配,在运行时由 Qt 的国际化系统按需加载,对系统性能无任何负面影响。

  • 4.代码安全(存在0个安全漏洞)✓

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
本次提交仅包含 .ts 格式的 XML 翻译文本节点修改与新增,完全不包含可执行代码、动态内容加载、命令拼接或用户输入处理,不存在任何攻击面。

  • 建议:维持现有的纯文本翻译维护模式,无需额外安全加固。

■ 【改进建议代码示例】

diff --git a/plugins/login-gesture/translations/login-gesture_pt.ts b/plugins/login-gesture/translations/login-gesture_pt.ts
--- a/plugins/login-gesture/translations/login-gesture_pt.ts
+++ b/plugins/login-gesture/translations/login-gesture_pt.ts
@@ -74,7 +74,7 @@
     </message>
     <message>
         <source>Ok</source>
-        <translation>Ok</translation>
+        <translation>OK</translation>
     </message>
     <message>
         <source>Drawing error, %1 chances left. Contact the administrator to reset</source>
@@ -95,4 +95,5 @@
         <translation>Contacte o administrador para repor</translation>
     </message>
 </context>
-</TS>
\ No newline at end of file
+</TS>
+
diff --git a/translations/dde-session-shell_pt.ts b/translations/dde-session-shell_pt.ts
--- a/translations/dde-session-shell_pt.ts
+++ b/translations/dde-session-shell_pt.ts
@@ -84,7 +84,7 @@
     <name>AuthPasskey</name>
     <message>
         <source>Please plug in the security key</source>
-        <translation>Por favor introduza a chave de segurança </translation>
+        <translation>Por favor introduza a chave de segurança</translation>
     </message>
     <message>
         <source>Verification successful</source>
@@ -207,7 +207,7 @@
         <source>Your password will expire in %n days, please change it timely</source>
-        <translation><numerusform>A sua palavra-passe expirará dentro de %n dias, por favor altere-a atempadamente</numerusform><numerusform>A sua palavra-passe expirará dentro de %n dias. Altere-a atempadamente</numerusform><numerusform>A sua palavra-passe vai expirar dentro de %1 dias. Por favor altere-a atempadamente.</numerusform></translation>
+        <translation><numerusform>A sua palavra-passe expirará dentro de %n dias, por favor altere-a atempadamente</numerusform><numerusform>A sua palavra-passe expirará dentro de %n dias. Altere-a atempadamente</numerusform><numerusform>A sua palavra-passe vai expirar dentro de %n dias. Por favor altere-a atempadamente.</numerusform></translation>
     </message>
     <message>
         <source>Password expired, please change</source>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant