fix: fix wired connection name showing English on Chinese locale#552
Conversation
2075947 to
135ecf9
Compare
1. Add installSystemTranslator() to read system locale from /etc/locale.conf or /etc/deepin-installer/deepin-installer.conf when user account locale is unavailable via D-Bus 2. Add fallback in addFirstConnection(WiredDevice*) to install system translator when m_initilized is false, covering the onWiredDevicePropertyChanged signal path that bypasses the m_initilized guard in onInitDeviceConnection/onDeviceAdded 3. Add fallback in 3s timer to try system translator before creating connections with default English names 4. Only install QTranslator when qm file loads successfully 5. Update D-Bus service names to match v25 interfaces (org.deepin.dde.LockService1, org.deepin.dde.Accounts1) Log: Wired connection name displays in system language (e.g. "有线连接") instead of default English "Wired Connection" when system locale is Chinese Influence: 1. Set system language to Simplified Chinese, reboot and check control center -> Network -> Wired, verify connection name is "有线连接" not "Wired Connection" 2. Set system language to other locales, verify wired connection name displays in the corresponding language fix: 修复系统语言为中文时有线网络名称显示为英文的问题 1. 新增 installSystemTranslator() 从 /etc/locale.conf 或 /etc/deepin-installer/deepin-installer.conf 读取系统语言, 在无法通过 D-Bus 获取用户账户语言时作为回退 2. 在 addFirstConnection(WiredDevice*) 中增加回退逻辑, 当 m_initilized 为 false 时安装系统翻译器,覆盖 onWiredDevicePropertyChanged 信号路径绕过 onInitDeviceConnection/onDeviceAdded 中 m_initilized 守卫的情况 3. 在 3 秒定时器中增加系统翻译器回退,在以默认英文 创建连接之前尝试安装系统语言 4. 仅在 qm 文件加载成功时才安装 QTranslator 5. 更新 D-Bus 服务名以匹配 v25 接口 (org.deepin.dde.LockService1, org.deepin.dde.Accounts1) Log: 有线网络名称将显示为系统语言(如"有线连接")而非 默认英文 "Wired Connection" Influence: 1. 系统语言设置为简体中文,重启后进入控制中心-网络-有线网络, 验证连接名称为"有线连接"而非"Wired Connection" 2. 切换为其他语言,验证有线网络名称显示对应语言 PMS: BUG-359529
deepin pr auto review你好!我是CodeGeeX。我已仔细审查了你提供的Git Diff。本次修改主要涉及:重构拼写错误( 整体来看,代码质量有了显著提升,逻辑更加严谨。但仍有一些在语法逻辑、代码质量、性能和安全方面可以进一步优化的地方。以下是详细的审查意见: 1. 语法与逻辑
2. 代码性能
3. 代码安全
4. 代码质量与可读性
总结你的改进使得网络初始化模块在处理多语言和用户切换时更加健壮,尤其是引入了系统级语言回退机制,解决了用户服务未启动时无语言环境的问题。针对上述意见,优先建议修复 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23, xionglinlin The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Log: Wired connection name displays in system language (e.g. "有线连接") instead of default English "Wired Connection" when system locale is Chinese
Influence:
fix: 修复系统语言为中文时有线网络名称显示为英文的问题
Log: 有线网络名称将显示为系统语言(如"有线连接")而非
默认英文 "Wired Connection"
Influence:
PMS: BUG-359529