From 244b1f32622d6ff7e973719611943fda07fef32d Mon Sep 17 00:00:00 2001 From: Caisking Date: Wed, 25 Feb 2026 20:06:26 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E5=BF=83=E7=8E=87=E7=95=8C?= =?utf8?q?=E9=9D=A2=E7=9A=84=E8=8B=B1=E6=96=87=E6=98=BE=E7=A4=BA=E5=BC=82?= =?utf8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/heartrate/src/HeartChartView.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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", "--", -- 2.17.1