From: Caisking Date: Wed, 25 Feb 2026 12:06:26 +0000 (+0800) Subject: 修复心率界面的英文显示异常 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=244b1f32622d6ff7e973719611943fda07fef32d;p=mirrors%2FFD230.git 修复心率界面的英文显示异常 --- diff --git a/code/sdk/application/wearable/fd272/nativeapp/nativeui/heartrate/src/HeartChartView.cpp b/code/sdk/application/wearable/fd272/nativeapp/nativeui/heartrate/src/HeartChartView.cpp index 699bd6877..52ac29a4c 100644 --- a/code/sdk/application/wearable/fd272/nativeapp/nativeui/heartrate/src/HeartChartView.cpp +++ b/code/sdk/application/wearable/fd272/nativeapp/nativeui/heartrate/src/HeartChartView.cpp @@ -21,6 +21,8 @@ #include "ui_resource_string.h" #include "uicomponents/UIComponents.h" #include "wearable_log.h" +#include "ConfigModel.h" +#include "languagecode/LanguageInit.h" namespace OHOS { static HeartChartView *g_pHeartCheckView = nullptr; @@ -433,8 +435,13 @@ void HeartChartView::InitChartLabel() { InitLabel(displayheart_, 133, 32, 200, 100, "label", "--", GILROY_BOLD_FONT, 65); // 单位 - InitRollLabel(uheart_, 283, 52, 100, 60, "label", STR_TIMES_PER_MIN, - DEFAULT_VECTOR_FONT_FILENAME, 30); + InitRollLabel(uheart_, 283, 52, 100, 60, "label", STR_TIMES_PER_MIN, DEFAULT_VECTOR_FONT_FILENAME, 30); + //英文有问题 需要修改为bpm + if(ConfigModel::GetInstance()->GetLanguage() == ZH_CN) { + uheart_->SetText("次/分"); + } else { + uheart_->SetText("bpm"); + } uheart_->SetTextColor(Color::GetColorFromRGBA(0x99, 0x99, 0x99, 0xff)); //上一次检测信息 InitLabel(lastheart_, 53, 130, 360, 35, "label", "--",