From a4e211b860dda5294f3fc4170427c3a7782ece04 Mon Sep 17 00:00:00 2001 From: Michael Bonani Date: Thu, 16 Jun 2022 14:25:59 +0200 Subject: [PATCH] filter languages for launching blockly --- aseba/launcher/src/qml/Applications.qml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/aseba/launcher/src/qml/Applications.qml b/aseba/launcher/src/qml/Applications.qml index eb7307134..8d34d2fab 100644 --- a/aseba/launcher/src/qml/Applications.qml +++ b/aseba/launcher/src/qml/Applications.qml @@ -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) {