Repository navigation
fix: translate SMART attribute names in health check dialog - #255
Draft
wangrong1069 wants to merge 1 commit into
Draft
wangrong1069 wants to merge 1 commit into
wangrong1069 wants to merge 1 commit into
Conversation
wangrong1069
marked this pull request as draft
November 6, 2026 11:30
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wangrong1069 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 |
Reviewer's GuideUITranslate recognized NVMe and SATA SMART attribute names in the health dialog, while retaining the original value for unknown names, and add the corresponding Simplified Chinese translations.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1. SMART attribute names displayed as English raw values because QStandardItem was created with m_attributeName without tr() 2. Add translateAttributeName() to map NVMe and common SATA SMART attribute names through tr() with fallback to original English 3. Update zh_CN translation file with 34 new translation entries Log: Health check dialog now shows SMART attribute names in Chinese instead of English raw values Influence: 1. Verify NVMe SSD health check shows Chinese attribute names 2. Verify SATA SSD health check shows Chinese for common attributes 3. Verify unknown attribute names fall back to English without crash fix: 修复健康检测对话框中SMART属性名未翻译的问题 1. 健康检测对话框中SMART属性名以英文原值显示,因为创建 QStandardItem时直接使用m_attributeName未经过tr()翻译 2. 新增translateAttributeName()函数,将NVMe和常见SATA的SMART 属性英文名通过tr()映射为中文,未知属性名回退为原始英文 3. 更新zh_CN翻译文件,新增34条翻译条目 Log: 健康检测对话框中SMART属性名现在显示为中文而非英文原值 Influence: 1. 验证NVMe固态硬盘健康检测显示中文属性名 2. 验证SATA固态硬盘健康检测常见属性显示中文 3. 验证未知属性名回退为英文不会导致崩溃 PMS: BUG-360005
wangrong1069
force-pushed
the
agent/agent/4d35c4f5e0fe
branch
from
November 13, 2026 08:11
9701ad1 to
fdc8b4d
Compare
Contributor
|
TAG Bot New tag: 6.0.29 |
Contributor
|
TAG Bot New tag: 6.0.30 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: SMART attribute names not translated in health check dialog
Problem
In the disk health detection dialog, SMART attribute names (e.g., "Critical Warning", "Temperature", "Available Spare") are displayed as English raw values without translation, while all other UI elements are properly localized to Chinese.
Root Cause
diskhealthdetectiondialog.cppline 296 createsQStandardItem(hardDiskStatusInfo.m_attributeName)without callingtr(). The attribute names come fromsmartctl -Aoutput and are passed through the data layer without any translation.Fix
translateAttributeName()that maps NVMe and common SATA SMART attribute names throughDiskHealthDetectionDialog::tr()for localizationdeepin-diskmanager_zh_CN.tswith 34 new translation entriesFiles Changed
application/widgets/diskhealthdetectiondialog.cpp— added translation mapping function + call siteapplication/translations/deepin-diskmanager_zh_CN.ts— added 34 translation entriesSafety
m_attributeName == "Temperature"check at line 216 remains unchanged (compares against English original)PMS: BUG-360005
Summary by Sourcery
Localize SMART attribute names displayed by the disk health check dialog.
Bug Fixes:
Chores: