You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: js/README.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,7 +169,7 @@ The color of the block is defined by the palette used.
169
169
4. To designate a block for `beginnerMode`, add
170
170
`this.beginnerBlock(true);` to the constructor.
171
171
172
-
5. To add a help string, add `this.setHelpString([_('some block
172
+
5. To add a help string, add `this.setHelpString([t('some block
173
173
help'), 'documentation', null, 'macroname']);` to the constructor. The
174
174
first element in the list is the help string itself. The second
175
175
element is the subdirectory where the help artwork is found. The third
@@ -259,7 +259,7 @@ An arg block:
259
259
class TranspositionFactorBlock extends ValueBlock {
260
260
constructor() {
261
261
//.TRANS: musical transposition (adjustment of pitch up or down)
262
-
super('transpositionfactor', _('transposition'));
262
+
super('transpositionfactor', t('transposition'));
263
263
this.setPalette('pitch');
264
264
this.hidden = true;
265
265
}
@@ -307,7 +307,7 @@ class StartDrumBlock extends StartBlock {
307
307
super();
308
308
this.changeName('startdrum');
309
309
310
-
this.formBlock({ name: _('start drum') });
310
+
this.formBlock({ name: t('start drum') });
311
311
312
312
this.makeMacro((x, y) => [
313
313
[0, 'start', x, y, [null, 1, null]],
@@ -331,9 +331,9 @@ class StartDrumBlock extends StartBlock {
331
331
332
332
//.TRANS: dispatch an event to trigger a listener
333
333
this.formBlock({
334
-
name: _('broadcast'),
334
+
name: t('broadcast'),
335
335
args: 1,
336
-
defaults: [_('event')],
336
+
defaults: [t('event')],
337
337
argTypes: ['textin'],
338
338
});
339
339
}
@@ -362,7 +362,7 @@ class StartDrumBlock extends StartBlock {
362
362
this.setPalette('graphics');
363
363
364
364
this.formBlock({
365
-
name: this.lang === 'ja' ? _('x3') : _('x')
365
+
name: this.lang === 'ja' ? t('x3') : t('x')
366
366
});
367
367
}
368
368
@@ -391,7 +391,7 @@ class StartDrumBlock extends StartBlock {
391
391
392
392
`formBlock` is a method of `BaseBlock`. This function takes a JSON-like object describing the visual appearance of the block, its arguments etc. The format of that object is as follows:
393
393
394
-
1.`name` : This specifies the display name on the block. Typically it is of the format `_('...')`.
394
+
1.`name` : This specifies the display name on the block. Typically it is of the format `t('...')`.
395
395
396
396
Note: If the `name` is omitted or is set to an empty string, a second argument of `false` should be passed to `formBlock` or else it will resize the block to fit the non-existent text.
397
397
@@ -431,7 +431,7 @@ class MakeBlockBlock extends LeftBlock {
431
431
432
432
this.formBlock({
433
433
//.TRANS: Create a new block programmatically.
434
-
name: _('make block'),
434
+
name: t('make block'),
435
435
args: 1,
436
436
argTypes: ['anyin'],
437
437
outType: 'numberout',
@@ -440,7 +440,7 @@ class MakeBlockBlock extends LeftBlock {
440
440
types: ['anyin'],
441
441
labels: ['']
442
442
},
443
-
defaults: [_('note')]
443
+
defaults: [t('note')]
444
444
});
445
445
}
446
446
}
@@ -509,7 +509,7 @@ In order to set up a new synth effect:
_("This code stores data about the blocks in a project.")+
87
+
t("This code stores data about the blocks in a project.")+
88
88
' <a href="javascript:toggle();" id="showhide">'+
89
-
_("Show")+
89
+
t("Show")+
90
90
'</a></div> <div class="code">{{ data }}</div></div></div></div><script type="text/javascript">function toggle(){if (document.getElementsByClassName("code")[0].style.display=="none"){document.getElementsByClassName("code")[0].style.display="flex";document.getElementById("showhide").textContent = "'+
91
-
_("Hide")+
91
+
t("Hide")+
92
92
'";} else {document.getElementsByClassName("code")[0].style.display="none";document.getElementById("showhide").textContent = "Show";}} var name=decodeURIComponent(window.location.pathname.split("/").pop().slice(0, -5)); var prefix="'+
93
-
_("Music Blocks Project")+
93
+
t("Music Blocks Project")+
94
94
' - "; var title=prefix+name; document.querySelector('+
0 commit comments