修复心率界面的英文显示异常
authorCaisking <Casiking@zhihuishixun.com>
Wed, 25 Feb 2026 12:06:26 +0000 (20:06 +0800)
committerCaisking <Casiking@zhihuishixun.com>
Wed, 25 Feb 2026 12:06:26 +0000 (20:06 +0800)
code/sdk/application/wearable/fd272/nativeapp/nativeui/heartrate/src/HeartChartView.cpp

index 699bd68..52ac29a 100644 (file)
@@ -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", "--",