Skip to content

Commit c579714

Browse files
committed
Move side content to separate namespace
1 parent 95f6be7 commit c579714

File tree

7 files changed

+35
-35
lines changed

7 files changed

+35
-35
lines changed

src/commons/sideContent/content/SideContentSubstVisualizer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import { beginAlertSideContent } from '../SideContentActions';
4545
import { SideContentLocation, SideContentType } from '../SideContentTypes';
4646

4747
const SubstDefaultText = () => {
48-
const { t } = useTranslation('translation', { keyPrefix: 'substVisualizer' });
48+
const { t } = useTranslation('sideContent', { keyPrefix: 'substVisualizer' });
4949
return (
5050
<div>
5151
<div id="substituter-default-text" className={Classes.RUNNING_TEXT}>

src/i18n/locales/en/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import grading from './grading.json';
33
import login from './login.json';
44
import sessionManagement from './sessionManagement.json';
55
import sicp from './sicp.json';
6+
import substVisualizer from './sideContent/substVisualizer.json';
67
import sourcecast from './sourcecast.json';
78
import sourceRecorder from './sourceRecorder.json';
89
import stories from './stories.json';
9-
import substVisualizer from './substVisualizer.json';
1010
import welcome from './welcome.json';
1111

1212
export default {
@@ -19,7 +19,9 @@ export default {
1919
...sourcecast,
2020
...sourceRecorder,
2121
...stories,
22-
...substVisualizer,
2322
...welcome
23+
},
24+
sideContent: {
25+
substVisualizer
2426
}
2527
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"welcome": "Welcome to the Stepper!",
3+
"instructions": "On this tab, the REPL will be hidden from view, so do check that your code has no errors before running the stepper. You may use this tool by writing your program on the left, then dragging the slider above to see its evaluation.",
4+
"evaluationSteps": "On even-numbered steps, the part of the program that will be evaluated next is highlighted in yellow. On odd-numbered steps, the result of the evaluation is highlighted in green. You can change the maximum steps limit (500-5000, default 1000) in the control bar.",
5+
"shortcutsTitle": "Some useful keyboard shortcuts:",
6+
"shortcuts": {
7+
"a": "a: Move to the first step",
8+
"e": "e: Move to the last step",
9+
"f": "f: Move to the next step",
10+
"b": "b: Move to the previous step"
11+
},
12+
"shortcutsNote": "Note that these shortcuts are only active when the browser focus is on this tab (click on or above the explanation text)."
13+
}

src/i18n/locales/en/substVisualizer.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/i18n/locales/zh-SG/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import grading from './grading.json';
33
import login from './login.json';
44
import sessionManagement from './sessionManagement.json';
55
import sicp from './sicp.json';
6+
import substVisualizer from './sideContent/substVisualizer.json';
67
import sourcecast from './sourcecast.json';
78
import sourceRecorder from './sourceRecorder.json';
89
import stories from './stories.json';
9-
import substVisualizer from './substVisualizer.json';
1010
import welcome from './welcome.json';
1111

1212
export default {
@@ -19,7 +19,9 @@ export default {
1919
...sourcecast,
2020
...sourceRecorder,
2121
...stories,
22-
...substVisualizer,
2322
...welcome
23+
},
24+
sideContent: {
25+
substVisualizer
2426
}
2527
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"welcome": "欢迎来到步骤器!",
3+
"instructions": "在此标签页中,REPL 将被隐藏,因此请确保您的代码在运行步骤器之前没有错误。您可以通过在左侧编写程序,然后拖动上方的滑块来查看其评估过程。",
4+
"evaluationSteps": "在偶数步骤中,将要评估的程序部分会以黄色突出显示。在奇数步骤中,评估结果会以绿色突出显示。您可以在控制栏中更改最大步骤限制(500-5000,默认值为1000)。",
5+
"shortcutsTitle": "一些有用的键盘快捷键:",
6+
"shortcuts": {
7+
"a": "a: 跳到第一步",
8+
"e": "e: 跳到最后一步",
9+
"f": "f: 跳到下一步",
10+
"b": "b: 跳到上一步"
11+
},
12+
"shortcutsNote": "请注意,这些快捷键仅在浏览器焦点位于此标签页时有效(点击说明文字或其上方区域)。"
13+
}

src/i18n/locales/zh-SG/substVisualizer.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)