Skip to content

fix: rename "UOS AI" to "小U同学" in Chinese translation - #511

Merged
deepin-bot[bot] merged 2 commits into
linuxdeepin:release/eaglefrom
tianming-1996:release/eagle
Aug 13, 2026
Merged

fix: rename "UOS AI" to "小U同学" in Chinese translation#511
deepin-bot[bot] merged 2 commits into
linuxdeepin:release/eaglefrom
tianming-1996:release/eagle

Conversation

@tianming-1996

@tianming-1996 tianming-1996 commented Aug 7, 2026

Copy link
Copy Markdown

根因分析

文本编辑器(deepin-editor)在右键菜单提供"语音朗读"和"语音听写"功能,依赖 UOS AI(com.iflytek.aiassistant DBus 服务)。卸载 UOS AI 后使用这些功能时,弹出提示"请前往应用商店安装"UOS AI"后再使用"。

产品品牌已从"UOS AI"更名为"小U同学",但简体中文翻译文件 translations/deepin-editor_zh_CN.ts 未同步更新。

  • 缺陷位置: translations/deepin-editor_zh_CN.ts:1032
  • 源码调用: src/editor/dtextedit.cppslotVoiceReadingAction()slotdictationAction() 共 4 处 tr("Please install UOS AI from the app store first."),共用同一条翻译条目。

修复方案

仅修改 translations/deepin-editor_zh_CN.ts 一行,将翻译值中的"UOS AI"替换为"小U同学"。不修改英文源字符串(Qt tr() 翻译键),不影响其他语言。

改动安全评估

低风险。仅修改翻译文案值,不涉及代码逻辑、函数签名或外部调用者(0 处引用)。

@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 @tianming-1996, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@sourcery-ai

sourcery-ai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds proper hover and press interaction states to ColorLabel in ColorSelectWdg, refactoring painting and mouse event handling so the color markers visually respond to hover/press and emit their selection signal on mouse release instead of press.

Sequence diagram for updated ColorLabel mouse interaction

sequenceDiagram
    actor User
    participant ColorLabel
    participant ColorSelectWdg

    User->>ColorLabel: enterEvent
    ColorLabel->>ColorLabel: m_bHover = true
    ColorLabel->>ColorLabel: update

    User->>ColorLabel: mousePressEvent (LeftButton)
    ColorLabel->>ColorLabel: m_bPressed = true
    ColorLabel->>ColorLabel: update

    User->>ColorLabel: mouseReleaseEvent (LeftButton)
    ColorLabel->>ColorLabel: m_bPressed = false
    ColorLabel->>ColorLabel: m_bSelected = true
    ColorLabel->>ColorLabel: update
    ColorLabel-->>ColorSelectWdg: sigColorClicked(m_bSelected, m_color)

    User->>ColorLabel: leaveEvent
    ColorLabel->>ColorLabel: m_bHover = false
    ColorLabel->>ColorLabel: m_bPressed = false
    ColorLabel->>ColorLabel: update
Loading

File-Level Changes

Change Details Files
Implement hover and press visual states for ColorLabel and adjust selection signaling to occur on mouse release.
  • Refactor paintEvent to branch on pressed, hover, and normal states with distinct circle geometry and color (pressed: inner circle shrunk and darkened; hover: slightly enlarged circle with outer glow; normal: previous small-circle-plus-ring logic).
  • Introduce m_bHover and m_bPressed state flags, updating them in new enterEvent, leaveEvent, mousePressEvent, and mouseReleaseEvent overrides, and triggering repaint via update().
  • Change selection activation from mousePressEvent to mouseReleaseEvent, ensuring the signal is emitted only when the left mouse button is released while still in the pressed state, and call base-class event handlers for proper propagation.
  • Add QEvent include and mark overridden event handlers with override in the header for clarity and correctness.
src/widgets/ColorSelectWdg.cpp
src/widgets/ColorSelectWdg.h

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@tianming-1996
tianming-1996 force-pushed the release/eagle branch 3 times, most recently from 3604de7 to 6a71b34 Compare August 12, 2026 05:34
@tianming-1996 tianming-1996 changed the title fix(editor): add hover and press states to color mark icons fix: rename "UOS AI" to "小U同学" in Chinese translation Aug 12, 2026
1. 更新简体中文翻译中语音朗读/语音听写的提示文案,将"UOS AI"改为"小U同学";
2. 仅修改 zh_CN 翻译值,不改动英文源字符串以保持其他语言翻译条目匹配;
3. 覆盖 slotVoiceReadingAction 与 slotdictationAction 共用的同一翻译条目;

=====================================

1. updated the prompt text of text-to-speech/speech-to-text in Simplified Chinese translation, renaming "UOS AI" to "小U同学";
2. only modified the zh_CN translation value, keeping the English source string unchanged to preserve translation entry matching for other languages;
3. covers the single shared translation entry used by both slotVoiceReadingAction and slotdictationAction;

Log: 文本编辑器卸载 UOS AI 后使用语音朗读/听写时的提示文案中产品名"UOS AI"更改为"小U同学",同步产品品牌更名

Bug: https://pms.uniontech.com/bug-view-373369.html
@tianming-1996

Copy link
Copy Markdown
Author

recheck

@tianming-1996

Copy link
Copy Markdown
Author

/reset

@tianming-1996

Copy link
Copy Markdown
Author

recheck

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: max-lvs, tianming-1996

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

@tianming-1996

Copy link
Copy Markdown
Author

/merge

@deepin-bot

deepin-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This pr cannot be merged! (status: unstable)

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

★ 总体评分:100分

■ 【总体评价】

代码仅修改了翻译文件中的产品名称显示字符串,无任何风险
逻辑正确且无任何安全漏洞,得满分

■ 【详细分析】

  • 1.语法逻辑(完全正确)✓

翻译文件 deepin-editor_zh_CN.ts 中仅修改了 XML 节点的文本内容,符合 Qt TS 翻译文件语法规范

  • 2.代码质量(优秀)✓

修改精准定位到对应 location 的 source 节点,未引入冗余代码或破坏文件结构

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

纯静态资源文本替换,不涉及运行时计算或系统调用,对性能无影响

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

漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个
纯文本翻译替换,不涉及变量解析、命令执行或内存操作,无攻击面

  • 建议:保持当前的翻译文件修改规范即可

■ 【改进建议代码示例】

diff --git a/translations/deepin-editor_zh_CN.ts b/translations/deepin-editor_zh_CN.ts
index 51aa88dd..1c013356 100644
--- a/translations/deepin-editor_zh_CN.ts
+++ b/translations/deepin-editor_zh_CN.ts
@@ -1029,7 +1029,7 @@
         <location filename="../src/editor/dtextedit.cpp" line="2868"/>
         <location filename="../src/editor/dtextedit.cpp" line="2870"/>
         <source>Please install UOS AI from the app store first.</source>
-        <translation>请前往应用商店安装“UOS AI”后再使用</translation>
+        <translation>请前往应用商店安装“小U同学”后再使用</translation>
     </message>
     <message>
         <location filename="../src/editor/dtextedit.cpp" line="292"/>

@tianming-1996

Copy link
Copy Markdown
Author

/merge

@deepin-bot

deepin-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This pr cannot be merged! (status: unstable)

@tianming-1996

Copy link
Copy Markdown
Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

This pr force merged! (status: unstable)

@deepin-bot
deepin-bot Bot merged commit 7458207 into linuxdeepin:release/eagle Aug 13, 2026
20 of 21 checks passed
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.

3 participants