From d456621875b24f379c3a836026b6302721aa3d99 Mon Sep 17 00:00:00 2001 From: Jon Eugster Date: Tue, 9 Apr 2024 09:47:05 +0200 Subject: [PATCH] apply suggestions from PR #206 manually --- client/public/locales/zh/translation.json | 8 ++++---- client/src/components/infoview/goals.tsx | 7 ++++--- client/src/components/level.tsx | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/client/public/locales/zh/translation.json b/client/public/locales/zh/translation.json index fe33128..296c575 100644 --- a/client/public/locales/zh/translation.json +++ b/client/public/locales/zh/translation.json @@ -7,7 +7,7 @@ "tactics": "策略", "regular": "标准", "relaxed": "休闲", - "none": "无", + "none": "自由", "Rules": "规则", "Intro": "介绍", "Game Introduction": "游戏介绍", @@ -15,11 +15,11 @@ "Start": "开始", "Inventory": "定理清单", "next level": "下一关", - "Next": "下一步", + "Next": "下一关", "back to world selection": "返回世界选择", "Leave World": "离开世界", "previous level": "上一关", - "Previous": "上一步", + "Previous": "上一关", "Editor mode is enforced!": "编辑器模式开启!", "Editor mode": "编辑器模式", "Typewriter mode": "打字机模式", @@ -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} */} diff --git a/client/src/components/level.tsx b/client/src/components/level.tsx index d459743..8d06b9e 100644 --- a/client/src/components/level.tsx +++ b/client/src/components/level.tsx @@ -469,7 +469,7 @@ function IntroductionPanel({gameInfo}) { {gameInfo.data?.worldSize[worldId] == 0 ? : }