Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
170 changes: 170 additions & 0 deletions application/translations/deepin-diskmanager_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,176 @@ will format it and remove its password.</source>
<source>Export failed</source>
<translation>导出失败</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Critical Warning</source>
<translation>严重警告</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Available Spare</source>
<translation>可用余量</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Available Spare Threshold</source>
<translation>可用余量阈值</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Percentage Used</source>
<translation>已用百分比</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Data Units Read</source>
<translation>读取数据量</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Data Units Written</source>
<translation>写入数据量</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Host Read Commands</source>
<translation>主机读取命令数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Host Write Commands</source>
<translation>主机写入命令数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Controller Busy Time</source>
<translation>控制器繁忙时间</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Power Cycles</source>
<translation>电源循环次数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Power On Hours</source>
<translation>通电时间</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Unsafe Shutdowns</source>
<translation>不安全关机次数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Media and Data Integrity Errors</source>
<translation>介质与数据完整性错误</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Error Information Log Entries</source>
<translation>错误信息日志条目数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Warning Comp. Temperature Time</source>
<translation>警告组件温度时间</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Critical Comp. Temperature Time</source>
<translation>临界组件温度时间</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Raw_Read_Error_Rate</source>
<translation>底层读取错误率</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Spin_Up_Time</source>
<translation>主轴起转时间</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Start_Stop_Count</source>
<translation>启停次数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Reallocated_Sector_Ct</source>
<translation>重映射扇区计数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Seek_Error_Rate</source>
<translation>寻道错误率</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Spin_Retry_Count</source>
<translation>主轴重试次数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Power_Cycle_Count</source>
<translation>电源循环次数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Temperature_Celsius</source>
<translation>温度</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Airflow_Temperature_Cel</source>
<translation>气流温度</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Reallocated_Event_Count</source>
<translation>重映射事件计数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Offline_Uncorrectable</source>
<translation>离线不可纠正</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>UDMA_CRC_Error_Count</source>
<translation>UDMA CRC错误计数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Reported_Uncorrect</source>
<translation>报告的不可纠正错误</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Hardware_ECC_Recovered</source>
<translation>硬件ECC恢复</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>G-Sense_Error_Rate</source>
<translation>重力感应错误率</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Power-Off_Retract_Count</source>
<translation>断电磁头缩回次数</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>End-to-End_Error</source>
<translation>端到端错误</translation>
</message>
<message>
<location filename="../widgets/diskhealthdetectiondialog.cpp" line="46"/>
<source>Unknown_Attribute</source>
<translation>未知属性</translation>
</message>
</context>
<context>
<name>DiskInfoDisplayDialog</name>
Expand Down
79 changes: 78 additions & 1 deletion application/widgets/diskhealthdetectiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,83 @@ DiskHealthDetectionDialog::~DiskHealthDetectionDialog()
delete m_diskHealthDetectionDelegate;
}

static QString translateAttributeName(const QString &attributeName)
{
// NVMe SMART attributes
if (attributeName == "Critical Warning")
return DiskHealthDetectionDialog::tr("Critical Warning");
if (attributeName == "Temperature")
return DiskHealthDetectionDialog::tr("Temperature");
if (attributeName == "Available Spare")
return DiskHealthDetectionDialog::tr("Available Spare");
if (attributeName == "Available Spare Threshold")
return DiskHealthDetectionDialog::tr("Available Spare Threshold");
if (attributeName == "Percentage Used")
return DiskHealthDetectionDialog::tr("Percentage Used");
if (attributeName == "Data Units Read")
return DiskHealthDetectionDialog::tr("Data Units Read");
if (attributeName == "Data Units Written")
return DiskHealthDetectionDialog::tr("Data Units Written");
if (attributeName == "Host Read Commands")
return DiskHealthDetectionDialog::tr("Host Read Commands");
if (attributeName == "Host Write Commands")
return DiskHealthDetectionDialog::tr("Host Write Commands");
if (attributeName == "Controller Busy Time")
return DiskHealthDetectionDialog::tr("Controller Busy Time");
if (attributeName == "Power Cycles")
return DiskHealthDetectionDialog::tr("Power Cycles");
if (attributeName == "Power On Hours")
return DiskHealthDetectionDialog::tr("Power On Hours");
if (attributeName == "Unsafe Shutdowns")
return DiskHealthDetectionDialog::tr("Unsafe Shutdowns");
if (attributeName == "Media and Data Integrity Errors")
return DiskHealthDetectionDialog::tr("Media and Data Integrity Errors");
if (attributeName == "Error Information Log Entries")
return DiskHealthDetectionDialog::tr("Error Information Log Entries");
if (attributeName == "Warning Comp. Temperature Time")
return DiskHealthDetectionDialog::tr("Warning Comp. Temperature Time");
if (attributeName == "Critical Comp. Temperature Time")
return DiskHealthDetectionDialog::tr("Critical Comp. Temperature Time");
// Common SATA SMART attributes
if (attributeName == "Raw_Read_Error_Rate")
return DiskHealthDetectionDialog::tr("Raw_Read_Error_Rate");
if (attributeName == "Spin_Up_Time")
return DiskHealthDetectionDialog::tr("Spin_Up_Time");
if (attributeName == "Start_Stop_Count")
return DiskHealthDetectionDialog::tr("Start_Stop_Count");
if (attributeName == "Reallocated_Sector_Ct")
return DiskHealthDetectionDialog::tr("Reallocated_Sector_Ct");
if (attributeName == "Seek_Error_Rate")
return DiskHealthDetectionDialog::tr("Seek_Error_Rate");
if (attributeName == "Spin_Retry_Count")
return DiskHealthDetectionDialog::tr("Spin_Retry_Count");
if (attributeName == "Power_Cycle_Count")
return DiskHealthDetectionDialog::tr("Power_Cycle_Count");
if (attributeName == "Temperature_Celsius")
return DiskHealthDetectionDialog::tr("Temperature_Celsius");
if (attributeName == "Airflow_Temperature_Cel")
return DiskHealthDetectionDialog::tr("Airflow_Temperature_Cel");
if (attributeName == "Reallocated_Event_Count")
return DiskHealthDetectionDialog::tr("Reallocated_Event_Count");
if (attributeName == "Offline_Uncorrectable")
return DiskHealthDetectionDialog::tr("Offline_Uncorrectable");
if (attributeName == "UDMA_CRC_Error_Count")
return DiskHealthDetectionDialog::tr("UDMA_CRC_Error_Count");
if (attributeName == "Reported_Uncorrect")
return DiskHealthDetectionDialog::tr("Reported_Uncorrect");
if (attributeName == "Hardware_ECC_Recovered")
return DiskHealthDetectionDialog::tr("Hardware_ECC_Recovered");
if (attributeName == "G-Sense_Error_Rate")
return DiskHealthDetectionDialog::tr("G-Sense_Error_Rate");
if (attributeName == "Power-Off_Retract_Count")
return DiskHealthDetectionDialog::tr("Power-Off_Retract_Count");
if (attributeName == "End-to-End_Error")
return DiskHealthDetectionDialog::tr("End-to-End_Error");
if (attributeName == "Unknown_Attribute")
return DiskHealthDetectionDialog::tr("Unknown_Attribute");
return attributeName;
}

void DiskHealthDetectionDialog::initUI()
{
qCDebug(appLog) << "Initializing DiskHealthDetectionDialog UI";
Expand Down Expand Up @@ -293,7 +370,7 @@ void DiskHealthDetectionDialog::initUI()
}

if (!hardDiskStatusInfo.m_attributeName.isEmpty()) {
itemList << new QStandardItem(hardDiskStatusInfo.m_attributeName);
itemList << new QStandardItem(translateAttributeName(hardDiskStatusInfo.m_attributeName));
} else {
// qCDebug(appLog) << "Hard disk status attributeName is empty, adding empty attributeName item.";
itemList << new QStandardItem("-");
Expand Down
Loading