Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat(热点): 热点事件折线图国际化处理
gaoSir9b844979bc03
diff --git a/src/app/[lng]/hotContent/components/HotEvent/echart/drawHotEventEchartLine.ts b/src/app/[lng]/hotContent/components/HotEvent/echart/drawHotEventEchartLine.tsindex 9cbe784a..62942344 100644--- a/src/app/[lng]/hotContent/components/HotEvent/echart/drawHotEventEchartLine.ts+++ b/src/app/[lng]/hotContent/components/HotEvent/echart/drawHotEventEchartLine.ts@@ -1,6 +1,7 @@import * as echarts from "echarts";import { HotValueHistory } from "@/api/types/hotTopic";import { describeNumber } from "@/utils";+import { directTrans } from "@/app/i18n/client";type EChartsOption = echarts.EChartsOption;@@ -44,7 +45,7 @@ export default function drawHotEventEchartLine(show: true,formatter: (params: any) => {const item = params[0];- return `${item.axisValue}<br/>热度值: ${describeNumber(item.data)}`;+ return `${item.axisValue}<br/>${directTrans("hot-content", "hotValue")}: ${describeNumber(item.data)}`;},},xAxis: {