Skip to content

Commit 7217d8c

Browse files
committed
Merge pull request scratchfoundation#192 from nathan/transate-self-mouse
Fixed translation of "edge", "myself", "Stage", and "mouse-pointer" in block inputs
2 parents 206d4df + e99e649 commit 7217d8c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/blocks/BlockIO.as

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
package blocks {
2828
import scratch.*;
2929
import util.*;
30+
import translation.*;
3031

3132
public class BlockIO {
3233

@@ -295,10 +296,10 @@ public class BlockIO {
295296
if ((b.args.length == 2) && (b.args[1] is BlockArg)) arg = b.args[1];
296297
if (arg) {
297298
var oldVal:String = arg.argValue;
298-
if ((oldVal == 'edge') || (oldVal == '_edge_')) arg.setArgValue('_edge_', 'edge');
299-
if ((oldVal == 'mouse') || (oldVal == '_mouse_')) arg.setArgValue('_mouse_', 'mouse-pointer');
300-
if (oldVal == '_myself_') arg.setArgValue('_myself_', 'myself');
301-
if (oldVal == '_stage_') arg.setArgValue('_stage_', 'Stage');
299+
if (oldVal == 'edge' || oldVal == '_edge_') arg.setArgValue('_edge_', Translator.map('edge'));
300+
if (oldVal == 'mouse' || oldVal == '_mouse_') arg.setArgValue('_mouse_', Translator.map('mouse-pointer'));
301+
if (oldVal == '_myself_') arg.setArgValue('_myself_', Translator.map('myself'));
302+
if (oldVal == '_stage_') arg.setArgValue('_stage_', Translator.map('Stage'));
302303
}
303304
}
304305

0 commit comments

Comments
 (0)