Skip to content

Commit 291cd02

Browse files
committed
Added strings for mrc_jump_to_step blocks to i18n.
1 parent 7ef7583 commit 291cd02

File tree

5 files changed

+15
-2
lines changed

5 files changed

+15
-2
lines changed

src/blocks/mrc_jump_to_step.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,17 @@ const JUMP_TO_STEP_BLOCK = {
4747
*/
4848
init: function (this: JumpToStepBlock): void {
4949
this.appendDummyInput()
50-
.appendField('Jump to')
50+
.appendField(Blockly.Msg.JUMP_TO)
5151
.appendField(createFieldNonEditableText(''), FIELD_STEP_NAME);
5252
this.setPreviousStatement(true, null);
5353
this.setInputsInline(true);
5454
this.setStyle(MRC_STYLE_VARIABLES);
55-
this.setTooltip('Jump to the specified step.');
55+
this.setTooltip(() => {
56+
const stepName = this.getFieldValue(FIELD_STEP_NAME);
57+
let tooltip = Blockly.Msg.JUMP_TO_STEP_TOOLTIP;
58+
tooltip = tooltip.replace('{{stepName}}', stepName);
59+
return tooltip;
60+
});
5661
},
5762
/**
5863
* mrcOnMove is called when an EventBlock is moved.

src/blocks/tokens.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ export function customTokens(t: (key: string) => string): typeof Blockly.Msg {
131131
COMMENT_DEFAULT_TEXT: t('BLOCKLY.COMMENT_DEFAULT_TEXT'),
132132
STEPS: t('BLOCKLY.STEPS'),
133133
REPEAT_UNTIL: t('BLOCKLY.REPEAT_UNTIL'),
134+
JUMP_TO: t('BLOCKLY.JUMP_TO'),
135+
JUMP_TO_STEP_TOOLTIP: t('BLOCKLY.TOOLTIP.JUMP_TO_STEP'),
134136
JUMP_CAN_ONLY_GO_IN_THEIR_STEPS_BLOCK: t('BLOCKLY.JUMP_CAN_ONLY_GO_IN_THEIR_STEPS_BLOCK'),
135137
}
136138
};

src/i18n/locales/en/translation.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"TO": "to",
151151
"STEPS": "steps",
152152
"REPEAT_UNTIL": "repeat until",
153+
"JUMP_TO": "jump to",
153154
"CUSTOM_EVENTS_LABEL": "Custom Events",
154155
"CUSTOM_METHODS_LABEL": "Custom Methods",
155156
"MORE_ROBOT_METHODS_LABEL": "More Robot Methods",
@@ -165,6 +166,7 @@
165166
"OPMODE_GROUP": "An optional group to group OpModes on Driver Station",
166167
"COMPONENTS": "These components are visible in this mechanism, the robot, and all opmodes.",
167168
"PRIVATE_COMPONENTS": "These components will not be visible in the robot or opmodes. They are only accessible within this mechanism.",
169+
"JUMP_TO_STEP": "Jump to the step named {{stepName}}.",
168170
"CALL_BUILTIN_FUNCTION": "Calls the builtin function {{functionName}}.",
169171
"CALL_MODULE_FUNCTION": "Calls the module function {{moduleName}}.{{functionName}}.",
170172
"CALL_STATIC_METHOD": "Calls the static method {{className}}.{{functionName}}.",

src/i18n/locales/es/translation.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
"TO": "a",
152152
"STEPS": "pasos",
153153
"REPEAT_UNTIL": "repetir hasta",
154+
"JUMP_TO": "saltar a",
154155
"CUSTOM_EVENTS_LABEL": "Eventos Personalizados",
155156
"CUSTOM_METHODS_LABEL": "Métodos Personalizados",
156157
"MORE_ROBOT_METHODS_LABEL": "Más Métodos del Robot",
@@ -166,6 +167,7 @@
166167
"OPMODE_GROUP": "Un grupo opcional para agrupar OpModes en la Estación del Conductor",
167168
"COMPONENTS": "Estos componentes son visibles en este mecanismo, el robot y todos los opmodes.",
168169
"PRIVATE_COMPONENTS": "Estos componentes no serán visibles en el robot o en los opmodes. Solo son accesibles dentro de este mecanismo.",
170+
"JUMP_TO_STEP": "Saltar al paso llamado {{stepName}}.",
169171
"CALL_BUILTIN_FUNCTION": "Llama a la función incorporada {{functionName}}.",
170172
"CALL_MODULE_FUNCTION": "Llama a la función del módulo {{moduleName}}.{{functionName}}.",
171173
"CALL_STATIC_METHOD": "Llama al método estático {{className}}.{{functionName}}.",

src/i18n/locales/he/translation.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
"TO": "ל",
151151
"STEPS": "צעדים",
152152
"REPEAT_UNTIL": "לחזור על כך עד",
153+
"JUMP_TO": "לקפוץ אל",
153154
"CUSTOM_EVENTS_LABEL": "אירועים מותאמים אישית",
154155
"CUSTOM_METHODS_LABEL": "מתודות מותאמות אישית",
155156
"MORE_ROBOT_METHODS_LABEL": "מתודות נוספות לרובוט",
@@ -165,6 +166,7 @@
165166
"OPMODE_GROUP": "קבוצה אופציונלית לארגון אופמודים באפליקציית ה־Driver Station",
166167
"COMPONENTS": "הרכיבים האלה גלויים במנגנון הזה, ברובוט ובכל האופמודים.",
167168
"PRIVATE_COMPONENTS": "הרכיבים האלה לא יהיו גלויים ברובוט או באופמודים. הם נגישים רק בתוך המנגנון הזה.",
169+
"JUMP_TO_STEP": "קפוץ לשלב בשם {{stepName}}.",
168170
"CALL_BUILTIN_FUNCTION": "קורא לפונקציה מובנית בשם {{functionName}}.",
169171
"CALL_MODULE_FUNCTION": "קורא לפונקציה {{functionName}} במודול {{moduleName}}.",
170172
"CALL_STATIC_METHOD": "קורא למתודה סטטית {{className}}.{{functionName}}.",

0 commit comments

Comments
 (0)