Skip to content

Commit

Permalink
filter languages for launching blockly
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Bonani committed Jun 17, 2022
1 parent 760192b commit a4e211b
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions aseba/launcher/src/qml/Applications.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@ ListModel {
if(!baseurl) {
return false;
}
const url = "%1/thymio_blockly.%2.html#device=%3&ws=%4&pass=%5"
.arg(baseurl)
.arg(language)
.arg(device.id)
.arg(device.websocketEndpoint())
.arg(device.password())
return Utils.openUrl(url)
if ((language=="de")||(language=="en")||(language=="es")||(language=="fr")||(language=="it")||(language=="pl")||(language=="zh-cn")){
const url = "%1/thymio_blockly.%2.html#device=%3&ws=%4&pass=%5"
.arg(baseurl)
.arg(language)
.arg(device.id)
.arg(device.websocketEndpoint())
.arg(device.password())
return Utils.openUrl(url);
} else {
const url = "%1/thymio_blockly.en.html#device=%2&ws=%3&pass=%4"
.arg(baseurl)
.arg(device.id)
.arg(device.websocketEndpoint())
.arg(device.password())
return Utils.openUrl(url);
}
}

function launch_scratch(device) {
Expand Down

0 comments on commit a4e211b

Please sign in to comment.