scratchfoundation / scratch-blocks

Scratch Blocks is a library for building creative computing interfaces.
https://scratch.mit.edu/developers
Apache License 2.0
2.58k stars 1.38k forks source link

Localization: "stop" block doesn't allow SOV languages #1579

Open apple502j opened 6 years ago

apple502j commented 6 years ago

Expected Behavior

In Japanese, stop block should be translated as "XXXを止める" (Same for all languages using SOV such as Germany, Korean, Dutch, and more!)

Actual Behavior

According to the code it seems to be "を止めるXXX"

Steps to Reproduce

See the code

    this.appendDummyInput()
        .appendField('stop')
.appendField(stopDropdown, 'STOP_OPTION');

https://github.com/LLK/scratch-blocks/blob/develop/blocks_vertical/control.js#L206

Operating System and Browser

Windows 7 Home Premium 64bit SP1 Firefox 60.0.2

thisandagain commented 6 years ago

/cc @chrisgarrity

chrisgarrity commented 6 years ago

@thisandagain it appears the stop block isn't using Blockly.Msg, so it's not getting translated at all. The ordering issue should probably get taken care of at the same time, so I'm switching it to this month.

chrisgarrity commented 6 years ago

@thisandagain I took the June milestone off so it can get re-triaged. I did figure out how to localize what we have currently.

chrisgarrity commented 5 years ago

Note: the stop block has to be handled specially because it changes shape depending on which option is selected. stop all cannot have any blocks connected below it. We should probably revisit this issue when control blocks are converted to an extension.

apple502j commented 5 years ago

How about making a sandwich? (translation string 1) (option) (translation string 2) In English, 1 is stop and 2 is null. In Japanese, 1 is null and 2 is を止める.