Files
PolyWeather/frontend/components/dashboard/scan-terminal/decision-copy.ts
T
2569718930@qq.com f9d0ea31bc 证据面板新增 AI 预测最高温 vs DEB 双锚对比卡片
在 AI 机场报文解读面板顶部加入双卡片布局:左侧展示 AI 预测最高温
(含置信区间和置信度),右侧展示 DEB 融合值,形成可对比的"双锚"
视图。同时更新加载态文案为"AI 正在基于最新报文预测今日最高温"。
2026-05-06 15:48:27 +08:00

68 lines
2.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export type DecisionCopyLocale = "zh-CN" | "en-US";
function isEnglishLocale(localeOrIsEn: DecisionCopyLocale | string | boolean) {
return localeOrIsEn === true || localeOrIsEn === "en-US";
}
export function getAiReadCopy({
isEn,
isHkoObservation,
}: {
isEn: boolean;
isHkoObservation: boolean;
}) {
return {
complete: isEn
? isHkoObservation
? "AI HKO observation read is complete."
: "AI airport bulletin read is complete."
: isHkoObservation
? "AI 香港天文台观测解读已完成"
: "AI 机场报文解读已完成",
inProgress: isEn
? isHkoObservation
? "Fast read is ready; AI is predicting today's high from the HKO observation..."
: "Fast read is ready; AI is predicting today's high from the airport bulletin..."
: isHkoObservation
? "快速判断已完成,AI 正在基于最新观测预测今日最高温…"
: "快速判断已完成,AI 正在基于最新报文预测今日最高温…",
ruleEvidence: isEn
? "AI read did not return completely; rule evidence is being used."
: "AI 解读未完整返回,当前使用规则证据",
};
}
export function getCityLoadingCopy({
isEn,
isHkoObservation,
}: {
isEn: boolean;
isHkoObservation: boolean;
}) {
return {
description: isEn
? isHkoObservation
? "Hydrating todays model stack, HKO observation context and market layer."
: "Hydrating todays model stack, METAR context and market layer."
: isHkoObservation
? "正在补全今日模型、香港天文台观测和市场价格层。"
: "正在补全今日模型、机场报文和市场价格层。",
title: isEn ? "Loading city decision data" : "正在加载城市决策数据",
};
}
export function getMobileDecisionCopy(localeOrIsEn: DecisionCopyLocale | string | boolean) {
const isEn = isEnglishLocale(localeOrIsEn);
return {
aiDetails: isEn ? "AI read" : "AI 解读",
chart: isEn ? "Light trend chart" : "轻量走势图",
currentTemp: isEn ? "Observed" : "当前温度",
expectedHigh: isEn ? "Expected high" : "预测高点",
marketPrice: isEn ? "Market price" : "市场价格",
modelEvidence: isEn ? "Model evidence" : "模型证据",
peakWindow: isEn ? "Peak window" : "峰值窗口",
refresh: isEn ? "Refresh" : "刷新",
remove: isEn ? "Remove" : "移除",
};
}