+ );
+}
diff --git a/src/i18n/en.ts b/src/i18n/en.ts
index 66e0a7d..badfef4 100644
--- a/src/i18n/en.ts
+++ b/src/i18n/en.ts
@@ -17,6 +17,18 @@ export const en = {
apply: "Apply",
delete: "Delete",
},
+ parts: {
+ summaries: {
+ AND: "ON only when both inputs are ON",
+ OR: "ON when at least one input is ON",
+ NOT: "Turns ON into OFF, and OFF into ON",
+ XOR: "ON when exactly one input is ON",
+ TRUE: "Always ON",
+ FALSE: "Always OFF",
+ },
+ about: (name: string) => `About ${name}`,
+ ofStage: "Parts you can use in this stage",
+ },
header: {
language: "Language",
modes: {
@@ -95,8 +107,6 @@ export const en = {
stages: "Stages",
parts: "Parts",
check: "Check",
- on: "on",
- off: "off",
passed: "Cleared! The circuit works for every combination of the inputs.",
next: "Next stage",
backToStages: "Back to the stages",
@@ -121,11 +131,11 @@ export const en = {
stageTexts: {
and: {
title: "Both switches",
- goal: "Make the lamp Out light up only when both switches A and B are on. Drag parts from the Parts list onto the editor, and drag from pin to pin to connect them. The play button at the bottom right lets you try the switches. When it works, press Check.",
+ goal: "Make the lamp Out light up only when both switches A and B are ON. Drag parts from the Parts list onto the editor, and drag from pin to pin to connect them. The play button at the bottom right lets you try the switches. When it works, press Check.",
},
xor: {
title: "Only one switch",
- goal: "Make the lamp Out light up when exactly one of the switches A and B is on. It stays off when both are on.",
+ goal: "Make the lamp Out light up when exactly one of the switches A and B is ON. It does not light up when both are ON.",
},
},
},
diff --git a/src/i18n/ja.ts b/src/i18n/ja.ts
index d0a09c7..2cdf418 100644
--- a/src/i18n/ja.ts
+++ b/src/i18n/ja.ts
@@ -13,6 +13,18 @@ export const ja: Messages = {
apply: "適用",
delete: "削除",
},
+ parts: {
+ summaries: {
+ AND: "両方が ON のときだけ ON",
+ OR: "少なくとも一方が ON なら ON",
+ NOT: "ON と OFF を逆にする",
+ XOR: "片方だけが ON のとき ON",
+ TRUE: "いつも ON",
+ FALSE: "いつも OFF",
+ },
+ about: (name) => `${name} について`,
+ ofStage: "この課題で使える部品",
+ },
header: {
language: "言語",
modes: {
@@ -90,8 +102,6 @@ export const ja: Messages = {
stages: "課題の一覧",
parts: "部品",
check: "確かめる",
- on: "オン",
- off: "オフ",
passed: "クリア!どの入力の組み合わせでも正しく動きます。",
next: "次の課題へ",
backToStages: "課題の一覧へ",
@@ -111,11 +121,11 @@ export const ja: Messages = {
stageTexts: {
and: {
title: "両方のスイッチ",
- goal: "スイッチ A と B が両方オンのときだけ、ランプ Out がつくようにしましょう。「部品」の一覧から部品をエディタにドラッグして置き、ピンからピンへドラッグしてつなぎます。右下の再生ボタンで、スイッチを切り替えて試せます。できたら「確かめる」を押してください。",
+ goal: "スイッチ A と B が両方 ON のときだけ、ランプ Out がつくようにしましょう。「部品」の一覧から部品をエディタにドラッグして置き、ピンからピンへドラッグしてつなぎます。右下の再生ボタンで、スイッチを切り替えて試せます。できたら「確かめる」を押してください。",
},
xor: {
title: "片方だけのスイッチ",
- goal: "スイッチ A と B のどちらか片方だけがオンのときに、ランプ Out がつくようにしましょう。両方オンのときはつきません。",
+ goal: "スイッチ A と B のどちらか片方だけが ON のときに、ランプ Out がつくようにしましょう。両方 ON のときはつきません。",
},
},
},
diff --git a/src/pages/edit/Editor/renderer/Node/components/Interface/Value/index.tsx b/src/pages/edit/Editor/renderer/Node/components/Interface/Value/index.tsx
index e9de385..2fac409 100644
--- a/src/pages/edit/Editor/renderer/Node/components/Interface/Value/index.tsx
+++ b/src/pages/edit/Editor/renderer/Node/components/Interface/Value/index.tsx
@@ -1,4 +1,5 @@
import clsx from "clsx";
+import { bitLabel } from "../../../../../../../../common/bitLabel";
import type { SimulationValue } from "../../../../../../../../store/simulation";
import { stringifySimulationValue } from "../../../../../store/slices/core";
import { CCComponentEditorRendererNodeInterfaceRendererValueEditButton } from "./EditButton";
@@ -45,7 +46,7 @@ export function CCComponentEditorRendererNodeInterfaceRendererValue({
>
{value.map((bit, index) => {
const className = clsx(styles.bit, bit && styles.on);
- const label = isSingleBit ? (bit ? "ON" : "OFF") : bit ? "1" : "0";
+ const label = isSingleBit ? bitLabel(bit) : bit ? "1" : "0";
return onChange ? (