1
- import ScratchBlocks from 'scratch-blocks' ;
1
+ import { ScratchBlocks } from 'scratch-blocks' ;
2
2
import { defaultColors } from './themes' ;
3
3
4
4
const categorySeparator = '<sep gap="36"/>' ;
@@ -13,7 +13,7 @@ const motion = function (isInitialSetup, isStage, targetId, colors) {
13
13
) ;
14
14
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
15
15
return `
16
- <category name="%{BKY_CATEGORY_MOTION }" id="motion" colour="${ colors . primary } " secondaryColour="${ colors . tertiary } ">
16
+ <category name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_MOTION' , 'Motion' ) } " id="motion" colour="${ colors . primary } " secondaryColour="${ colors . tertiary } ">
17
17
${ isStage ? `
18
18
<label text="${ stageSelected } "></label>
19
19
` : `
@@ -158,7 +158,7 @@ const looks = function (isInitialSetup, isStage, targetId, costumeName, backdrop
158
158
const hmm = ScratchBlocks . ScratchMsgs . translate ( 'LOOKS_HMM' , 'Hmm...' ) ;
159
159
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
160
160
return `
161
- <category name="%{BKY_CATEGORY_LOOKS }" id="looks" colour="${ colors . primary } " secondaryColour="${ colors . tertiary } ">
161
+ <category name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_LOOKS' , 'Looks' ) } " id="looks" colour="${ colors . primary } " secondaryColour="${ colors . tertiary } ">
162
162
${ isStage ? '' : `
163
163
<block type="looks_sayforsecs">
164
164
<value name="MESSAGE">
@@ -294,7 +294,7 @@ const looks = function (isInitialSetup, isStage, targetId, costumeName, backdrop
294
294
const sound = function ( isInitialSetup , isStage , targetId , soundName , colors ) {
295
295
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
296
296
return `
297
- <category name="%{BKY_CATEGORY_SOUND }" id="sound" colour="${ colors . primary } " secondaryColour="${ colors . tertiary } ">
297
+ <category name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_SOUND' , 'Sound' ) } " id="sound" colour="${ colors . primary } " secondaryColour="${ colors . tertiary } ">
298
298
<block id="${ targetId } _sound_playuntildone" type="sound_playuntildone">
299
299
<value name="SOUND_MENU">
300
300
<shadow type="sound_sounds_menu">
@@ -350,7 +350,7 @@ const sound = function (isInitialSetup, isStage, targetId, soundName, colors) {
350
350
const events = function ( isInitialSetup , isStage , targetId , colors ) {
351
351
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
352
352
return `
353
- <category name="%{BKY_CATEGORY_EVENTS }" id="events" colour="${ colors . primary } " secondaryColour="${ colors . tertiary } ">
353
+ <category name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_EVENTS' , 'Events' ) } " id="events" colour="${ colors . primary } " secondaryColour="${ colors . tertiary } ">
354
354
<block type="event_whenflagclicked"/>
355
355
<block type="event_whenkeypressed">
356
356
</block>
@@ -391,7 +391,7 @@ const control = function (isInitialSetup, isStage, targetId, colors) {
391
391
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
392
392
return `
393
393
<category
394
- name="%{BKY_CATEGORY_CONTROL }"
394
+ name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_CONTROL' , 'Control' ) } "
395
395
id="control"
396
396
colour="${ colors . primary } "
397
397
secondaryColour="${ colors . tertiary } ">
@@ -444,7 +444,7 @@ const sensing = function (isInitialSetup, isStage, targetId, colors) {
444
444
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
445
445
return `
446
446
<category
447
- name="%{BKY_CATEGORY_SENSING }"
447
+ name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_SENSING' , 'Sensing' ) } "
448
448
id="sensing"
449
449
colour="${ colors . primary } "
450
450
secondaryColour="${ colors . tertiary } ">
@@ -526,7 +526,7 @@ const operators = function (isInitialSetup, isStage, targetId, colors) {
526
526
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
527
527
return `
528
528
<category
529
- name="%{BKY_CATEGORY_OPERATORS }"
529
+ name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_OPERATORS' , 'Operators' ) } "
530
530
id="operators"
531
531
colour="${ colors . primary } "
532
532
secondaryColour="${ colors . tertiary } ">
@@ -715,7 +715,7 @@ const variables = function (isInitialSetup, isStage, targetId, colors) {
715
715
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
716
716
return `
717
717
<category
718
- name="%{BKY_CATEGORY_VARIABLES }"
718
+ name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_VARIABLES' , 'Variables' ) } "
719
719
id="variables"
720
720
colour="${ colors . primary } "
721
721
secondaryColour="${ colors . tertiary } "
@@ -728,7 +728,7 @@ const myBlocks = function (isInitialSetup, isStage, targetId, colors) {
728
728
// Note: the category's secondaryColour matches up with the blocks' tertiary color, both used for border color.
729
729
return `
730
730
<category
731
- name="%{BKY_CATEGORY_MYBLOCKS }"
731
+ name="${ ScratchBlocks . ScratchMsgs . translate ( 'CATEGORY_MYBLOCKS' , 'My Blocks' ) } "
732
732
id="myBlocks"
733
733
colour="${ colors . primary } "
734
734
secondaryColour="${ colors . tertiary } "
0 commit comments