@@ -29,7 +29,7 @@ Blockly.Blocks['sphero_sprk_plus_start'] = {
29
29
this . setColour ( 65 ) ;
30
30
this . appendDummyInput ( )
31
31
. appendField ( Blockly . BlocksTemplate . runningMan ( ) )
32
- . appendField ( i18t ( 'Programm Start ' ) ) ;
32
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__START ' ) ) ;
33
33
this . setNextStatement ( true ) ;
34
34
this . setTooltip ( i18t ( 'Defines the start of the program' ) ) ;
35
35
} ,
@@ -45,8 +45,9 @@ Blockly.Blocks['sphero_sprk_plus_roll'] = {
45
45
this . setColour ( 260 ) ;
46
46
this . appendValueInput ( 'speed' ) . setCheck ( 'Number' )
47
47
. appendField ( Blockly . BlocksTemplate . point ( ) )
48
- . appendField ( i18t ( 'roll speed(' ) ) ;
49
- this . appendDummyInput ( ) . appendField ( ')' ) ;
48
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__ROLL_WITH' ) ) ;
49
+ this . appendDummyInput ( )
50
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SPEED' ) ) ;
50
51
this . setPreviousStatement ( true ) ;
51
52
this . setNextStatement ( true ) ;
52
53
this . setTooltip ( i18t ( 'Move the Sphero in a direction' ) ) ;
@@ -63,11 +64,12 @@ Blockly.Blocks['sphero_sprk_plus_roll_step'] = {
63
64
this . setColour ( 260 ) ;
64
65
this . appendValueInput ( 'speed' ) . setCheck ( 'Number' )
65
66
. appendField ( Blockly . BlocksTemplate . point ( ) )
66
- . appendField ( i18t ( 'roll with ' ) ) ;
67
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__ROLL_WITH ' ) ) ;
67
68
this . appendValueInput ( 'heading' )
68
- . appendField ( i18t ( 'speed and' ) ) ;
69
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SPEED' ) )
70
+ . appendField ( i18t ( '@@BLOCKS__AND' ) ) ;
69
71
this . appendDummyInput ( )
70
- . appendField ( i18t ( 'heading ' ) ) ;
72
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__HEADING ' ) ) ;
71
73
this . setPreviousStatement ( true ) ;
72
74
this . setNextStatement ( true ) ;
73
75
this . setTooltip ( i18t ( 'Move the Sphero in a direction' ) ) ;
@@ -84,13 +86,15 @@ Blockly.Blocks['sphero_sprk_plus_roll_time'] = {
84
86
this . setColour ( 260 ) ;
85
87
this . appendValueInput ( 'time' ) . setCheck ( 'Number' )
86
88
. appendField ( Blockly . BlocksTemplate . point ( ) )
87
- . appendField ( i18t ( 'roll for ' ) ) ;
89
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__ROLL_FOR ' ) ) ;
88
90
this . appendValueInput ( 'speed' ) . setCheck ( 'Number' )
89
- . appendField ( i18t ( 'sec with' ) ) ;
91
+ . appendField ( i18t ( '@@BLOCKS__SEC' ) )
92
+ . appendField ( i18t ( '@@BLOCKS__WITH' ) ) ;
90
93
this . appendValueInput ( 'heading' )
91
- . appendField ( i18t ( 'speed and' ) ) ;
94
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SPEED' ) )
95
+ . appendField ( i18t ( '@@BLOCKS__AND' ) ) ;
92
96
this . appendDummyInput ( )
93
- . appendField ( i18t ( 'heading ' ) ) ;
97
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__HEADING ' ) ) ;
94
98
this . setPreviousStatement ( true ) ;
95
99
this . setNextStatement ( true ) ;
96
100
this . setTooltip (
@@ -108,11 +112,11 @@ Blockly.Blocks['sphero_sprk_plus_rotate_time'] = {
108
112
this . setColour ( 260 ) ;
109
113
this . appendDummyInput ( )
110
114
. appendField ( Blockly . BlocksTemplate . point ( ) )
111
- . appendField ( i18t ( 'rotate ' ) )
115
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__ROTATE ' ) )
112
116
. appendField ( new Blockly . FieldAngle ( 0 ) , 'heading' )
113
- . appendField ( i18t ( 'for ' ) ) ;
117
+ . appendField ( i18t ( '@@BLOCKS__FOR ' ) ) ;
114
118
this . appendValueInput ( 'time' ) . setCheck ( 'Number' )
115
- . appendField ( i18t ( 'sec ' ) ) ;
119
+ . appendField ( i18t ( '@@BLOCKS__SEC ' ) ) ;
116
120
this . setPreviousStatement ( true ) ;
117
121
this . setNextStatement ( true ) ;
118
122
this . setTooltip (
@@ -154,10 +158,10 @@ Blockly.Blocks['sphero_sprk_plus_stabilization'] = {
154
158
this . setColour ( 260 ) ;
155
159
this . appendDummyInput ( )
156
160
. appendField ( Blockly . BlocksTemplate . point ( ) )
157
- . appendField ( i18t ( 'set stabilization( ' ) )
161
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SET_STABILIZATION ' ) )
158
162
. appendField ( new Blockly . FieldDropdown ( [
159
- [ i18t ( 'enable ' ) , 'enable' ] ,
160
- [ i18t ( 'disable ' ) , 'disable' ] ,
163
+ [ i18t ( '@@BLOCKS__ENABLE ' ) , 'enable' ] ,
164
+ [ i18t ( '@@BLOCKS__DISABLE ' ) , 'disable' ] ,
161
165
] ) , 'enable' )
162
166
. appendField ( ')' ) ;
163
167
this . setPreviousStatement ( true ) ;
@@ -177,9 +181,7 @@ Blockly.Blocks['sphero_sprk_plus_heading'] = {
177
181
this . appendValueInput ( 'heading' )
178
182
. setCheck ( 'Number' )
179
183
. appendField ( Blockly . BlocksTemplate . point ( ) )
180
- . appendField ( i18t ( 'set heading(' ) ) ;
181
- this . appendDummyInput ( )
182
- . appendField ( ')' ) ;
184
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SET_HEADING' ) ) ;
183
185
this . setPreviousStatement ( true ) ;
184
186
this . setNextStatement ( true ) ;
185
187
this . setTooltip ( i18t ( 'Sets Sphero heading.' ) ) ;
@@ -197,9 +199,8 @@ Blockly.Blocks['sphero_sprk_plus_speed'] = {
197
199
this . appendValueInput ( 'speed' )
198
200
. setCheck ( 'Number' )
199
201
. appendField ( Blockly . BlocksTemplate . point ( ) )
200
- . appendField ( i18t ( 'set speed(' ) )
201
- . appendField ( new Blockly . FieldAngle ( 0 ) , 'speed' )
202
- . appendField ( ')' ) ;
202
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SET_SPEED' ) )
203
+ . appendField ( new Blockly . FieldAngle ( 0 ) , 'speed' ) ;
203
204
this . setPreviousStatement ( true ) ;
204
205
this . setNextStatement ( true ) ;
205
206
this . setTooltip ( i18t ( 'Sets Sphero speed.' ) ) ;
@@ -216,8 +217,7 @@ Blockly.Blocks['sphero_sprk_plus_rgb'] = {
216
217
this . setColour ( 260 ) ;
217
218
this . appendValueInput ( 'colour' )
218
219
. appendField ( Blockly . BlocksTemplate . point ( ) )
219
- . appendField ( i18t ( 'set color (' ) ) ;
220
- this . appendDummyInput ( ) . appendField ( ')' ) ;
220
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SET_COLOR' ) ) ;
221
221
this . setPreviousStatement ( true ) ;
222
222
this . setNextStatement ( true ) ;
223
223
this . setTooltip ( i18t ( 'Sets the leds on the Sphero ball.' ) ) ;
@@ -234,8 +234,7 @@ Blockly.Blocks['sphero_sprk_plus_blink'] = {
234
234
this . setColour ( 260 ) ;
235
235
this . appendValueInput ( 'colour' )
236
236
. appendField ( Blockly . BlocksTemplate . point ( ) )
237
- . appendField ( i18t ( 'set color blink (' ) ) ;
238
- this . appendDummyInput ( ) . appendField ( ')' ) ;
237
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SET_BLINK' ) ) ;
239
238
this . setPreviousStatement ( true ) ;
240
239
this . setNextStatement ( true ) ;
241
240
this . setTooltip ( i18t ( 'Sets the leds on the Sphero ball.' ) ) ;
@@ -252,10 +251,9 @@ Blockly.Blocks['sphero_sprk_plus_backlight'] = {
252
251
this . setColour ( 260 ) ;
253
252
this . appendDummyInput ( )
254
253
. appendField ( Blockly . BlocksTemplate . point ( ) )
255
- . appendField ( i18t ( 'set backlight ( ' ) )
254
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__SET_BACKLIGHT ' ) )
256
255
. appendField ( new Blockly . FieldTextInput ( '254' ) , 'brightness' )
257
- . appendField ( '(0 - 254)' )
258
- . appendField ( ')' ) ;
256
+ . appendField ( '(0 - 254)' ) ;
259
257
this . setPreviousStatement ( true ) ;
260
258
this . setNextStatement ( true ) ;
261
259
this . setTooltip ( i18t ( 'Sets the back-light on the Sphero ball.' ) ) ;
@@ -272,10 +270,10 @@ Blockly.Blocks['sphero_sprk_plus_stop'] = {
272
270
this . setColour ( 260 ) ;
273
271
this . appendDummyInput ( )
274
272
. appendField ( Blockly . BlocksTemplate . point ( ) )
275
- . appendField ( i18t ( 'stop motors( ' ) )
273
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__STOP_MOTORS ' ) )
276
274
. appendField ( new Blockly . FieldDropdown ( [
277
- [ i18t ( 'when finished ' ) , 'when finished' ] ,
278
- [ i18t ( 'immediately ' ) , 'immediately' ] ,
275
+ [ i18t ( '@@BLOCKS__IMMEDIATELY ' ) , 'when finished' ] ,
276
+ [ i18t ( '@@BLOCKS__WHEN_FINISHED ' ) , 'immediately' ] ,
279
277
] ) , 'immediately' )
280
278
. appendField ( ')' ) ;
281
279
this . setPreviousStatement ( true ) ;
@@ -294,7 +292,7 @@ Blockly.Blocks['sphero_sprk_plus_reset'] = {
294
292
this . setColour ( 150 ) ;
295
293
this . appendDummyInput ( )
296
294
. appendField ( Blockly . BlocksTemplate . addCircle ( ) )
297
- . appendField ( i18t ( 'reset device ' ) ) ;
295
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__RESET_ROBOT ' ) ) ;
298
296
this . setPreviousStatement ( true ) ;
299
297
this . setNextStatement ( true ) ;
300
298
this . setTooltip ( '' ) ;
@@ -312,7 +310,7 @@ Blockly.Blocks['sphero_sprk_plus_collision'] = {
312
310
this . setColour ( 260 ) ;
313
311
this . appendDummyInput ( )
314
312
. appendField ( Blockly . BlocksTemplate . point ( ) )
315
- . appendField ( i18t ( 'on collision ' ) ) ;
313
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__ON_COLLISION ' ) ) ;
316
314
this . appendStatementInput ( 'CODE' )
317
315
. appendField ( i18t ( '@@BLOCKS__DO' ) )
318
316
. setAlign ( Blockly . ALIGN_CENTRE ) ;
@@ -332,7 +330,7 @@ Blockly.Blocks['sphero_sprk_plus_position_change'] = {
332
330
this . setColour ( 260 ) ;
333
331
this . appendDummyInput ( )
334
332
. appendField ( Blockly . BlocksTemplate . point ( ) )
335
- . appendField ( i18t ( 'on position change ' ) ) ;
333
+ . appendField ( i18t ( '@@BLOCKS_ROBOT__ON_POSITION_CHANGE ' ) ) ;
336
334
this . appendStatementInput ( 'CODE' )
337
335
. appendField ( i18t ( '@@BLOCKS__DO' ) )
338
336
. setAlign ( Blockly . ALIGN_CENTRE ) ;
@@ -341,4 +339,3 @@ Blockly.Blocks['sphero_sprk_plus_position_change'] = {
341
339
this . setTooltip ( i18t ( 'Detect position change.' ) ) ;
342
340
} ,
343
341
} ;
344
-
0 commit comments