File tree Expand file tree Collapse file tree 5 files changed +19
-4
lines changed Expand file tree Collapse file tree 5 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ const EVENT_HANDLER = {
215215 }
216216 }
217217 if ( ! foundRobotEvent ) {
218- warnings . push ( 'This block is an event handler for an event that no longer exists.' ) ;
218+ warnings . push ( Blockly . Msg . EVENT_HANDLER_ROBOT_EVENT_NOT_FOUND ) ;
219219 }
220220 }
221221
@@ -266,15 +266,15 @@ const EVENT_HANDLER = {
266266 }
267267 }
268268 if ( ! foundMechanismEvent ) {
269- warnings . push ( 'This block is an event handler for an event that no longer exists.' ) ;
269+ warnings . push ( Blockly . Msg . EVENT_HANDLER_MECHANISM_EVENT_NOT_FOUND ) ;
270270 }
271271
272272 // Since we found the mechanism, we can break out of the loop.
273273 break ;
274274 }
275275 }
276276 if ( ! foundMechanism ) {
277- warnings . push ( 'This block is an event handler for an event in a mechanism that no longer exists.' ) ;
277+ warnings . push ( Blockly . Msg . EVENT_HANDLER_MECHANISM_NOT_FOUND ) ;
278278 }
279279 }
280280 }
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ export function customTokens(t: (key: string) => string): typeof Blockly.Msg {
3737 t ( 'BLOCKLY.PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK' ) ,
3838 EVENT_HANDLER_ALREADY_ON_WORKSPACE :
3939 t ( 'BLOCKLY.EVENT_HANDLER_ALREADY_ON_WORKSPACE' ) ,
40+ EVENT_HANDLER_ROBOT_EVENT_NOT_FOUND :
41+ t ( 'BLOCKLY.EVENT_HANDLER_ROBOT_EVENT_NOT_FOUND' ) ,
42+ EVENT_HANDLER_MECHANISM_EVENT_NOT_FOUND :
43+ t ( 'BLOCKLY.EVENT_HANDLER_MECHANISM_EVENT_NOT_FOUND' ) ,
44+ EVENT_HANDLER_MECHANISM_NOT_FOUND :
45+ t ( 'BLOCKLY.EVENT_HANDLER_MECHANISM_NOT_FOUND' ) ,
4046 MECHANISMS : t ( 'MECHANISMS' ) ,
4147 OPMODES : t ( 'OPMODES' ) ,
4248 COMPONENTS : t ( 'BLOCKLY.COMPONENTS' ) ,
@@ -103,4 +109,4 @@ export function customTokens(t: (key: string) => string): typeof Blockly.Msg {
103109 MRC_CATEGORY_TEST : t ( 'BLOCKLY.CATEGORY.TEST' ) ,
104110 MRC_PRINT : t ( 'BLOCKLY.PRINT' ) ,
105111 }
106- } ;
112+ } ;
Original file line number Diff line number Diff line change 7878 "PARAMETER" : " parameter" ,
7979 "PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK" : " Parameters can only go in their method's block" ,
8080 "EVENT_HANDLER_ALREADY_ON_WORKSPACE" : " This event handler is already on the workspace." ,
81+ "EVENT_HANDLER_ROBOT_EVENT_NOT_FOUND" : " This block is an event handler for an event that no longer exists." ,
82+ "EVENT_HANDLER_MECHANISM_EVENT_NOT_FOUND" : " This block is an event handler for an event that no longer exists." ,
83+ "EVENT_HANDLER_MECHANISM_NOT_FOUND" : " This block is an event handler for an event in a mechanism that no longer exists." ,
8184 "COMPONENTS" : " Components" ,
8285 "PRIVATE_COMPONENTS" : " Private Components" ,
8386 "EVENTS" : " Events" ,
Original file line number Diff line number Diff line change 7979 "PARAMETER" : " parámetro" ,
8080 "PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK" : " Los parámetros solo pueden ir en el bloque de su método" ,
8181 "EVENT_HANDLER_ALREADY_ON_WORKSPACE" : " Este controlador de eventos ya está en el área de trabajo." ,
82+ "EVENT_HANDLER_ROBOT_EVENT_NOT_FOUND" : " Este bloque es un controlador de eventos para un evento que ya no existe." ,
83+ "EVENT_HANDLER_MECHANISM_EVENT_NOT_FOUND" : " Este bloque es un controlador de eventos para un evento que ya no existe." ,
84+ "EVENT_HANDLER_MECHANISM_NOT_FOUND" : " Este bloque es un controlador de eventos para un evento en un mecanismo que ya no existe." ,
8285 "COMPONENTS" : " Componentes" ,
8386 "PRIVATE_COMPONENTS" : " Componentes Privados" ,
8487 "EVENTS" : " Eventos" ,
Original file line number Diff line number Diff line change 7878 "PARAMETER" : " פרמטר" ,
7979 "PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK" : " פרמטרים יכולים להופיע רק בתוך הבלוק של המתודה שלהם." ,
8080 "EVENT_HANDLER_ALREADY_ON_WORKSPACE" : " מנהל האירועים הזה כבר נמצא בסביבת העבודה." ,
81+ "EVENT_HANDLER_ROBOT_EVENT_NOT_FOUND" : " הבלוק הזה הוא מנהל אירועים לאירוע שכבר לא קיים." ,
82+ "EVENT_HANDLER_MECHANISM_EVENT_NOT_FOUND" : " הבלוק הזה הוא מנהל אירועים לאירוע שכבר לא קיים." ,
83+ "EVENT_HANDLER_MECHANISM_NOT_FOUND" : " הבלוק הזה הוא מנהל אירועים לאירוע במנגנון שכבר לא קיים." ,
8184 "COMPONENTS" : " רכיבים" ,
8285 "PRIVATE_COMPONENTS" : " רכיבים פרטיים" ,
8386 "EVENTS" : " אירועים" ,
You can’t perform that action at this time.
0 commit comments