From af5426856e9233f43a181c35b214918e43ad327c Mon Sep 17 00:00:00 2001 From: Hydrogenbear Date: Mon, 1 Apr 2024 12:35:17 +0800 Subject: [PATCH] Some updates, and fix. --- client/public/locales/zh/translation.json | 2 +- client/src/components/infoview/goals.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/public/locales/zh/translation.json b/client/public/locales/zh/translation.json index 50c9484..a2e54bf 100644 --- a/client/public/locales/zh/translation.json +++ b/client/public/locales/zh/translation.json @@ -41,7 +41,7 @@ "Show more help!": "显示更多帮助!", "Goal": "目标", "Current Goal": "当前目标", - "Objects": "Objects", + "Objects": "对象", "Assumptions": "假设", "Further Goals": "Further Goals", "No Goals": "无目标", diff --git a/client/src/components/infoview/goals.tsx b/client/src/components/infoview/goals.tsx index bbd7f29..41e79bf 100644 --- a/client/src/components/infoview/goals.tsx +++ b/client/src/components/infoview/goals.tsx @@ -140,6 +140,7 @@ interface GoalProps { * provided `filter`. */ export const Goal = React.memo((props: GoalProps) => { const { goal, filter, showHints, typewriter } = props + let { t } = useTranslation() // TODO: Apparently `goal` can be `undefined` if (!goal) {return <>} @@ -153,7 +154,7 @@ export const Goal = React.memo((props: GoalProps) => { undefined, [locs, goal.mvarId]) const goalLi =
-
Goal:
+
{t("Goal")}:
@@ -171,10 +172,10 @@ export const Goal = React.memo((props: GoalProps) => { {/* {goal.userName &&
case {goal.userName}
} */} {filter.reverse && goalLi} {! typewriter && objectHyps.length > 0 && -
Objects:
+
{t("Objects")}:
{objectHyps.map((h, i) => )}
} {!typewriter && assumptionHyps.length > 0 && -
Assumptions:
+
{t("Assumptions")}:
{assumptionHyps.map((h, i) => )}
} {!filter.reverse && goalLi} {/* {showHints && hints} */}