Skip to content

Commit 9bfff59

Browse files
Improve error handling for WebUSB issues (#1164)
Use a dialog to show WebUSB errors with clearer action for the user.
1 parent 2126e74 commit 9bfff59

24 files changed

+208
-397
lines changed

lang/ui.ca.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "Torna a connectar la teva micro:bit i torna-ho a provar.",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "Has d'<link>actualitzar el microprogramari de la teva micro:bit </link> per fer ús d'aquesta característica.",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "Actualitza el microprogramari de la micro:bit ",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "Malauradament, WebUSB no és compatible amb aquest navegador i el teu programa es desarà al teu ordinador. Segueix els passos de la pantalla següent per transferir-lo ala teva micro:bit. Et recomanem Google Chrome o Microsoft Edge perquè et puguis connectar directament a la teva micro:bit.",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

lang/ui.de.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "Bitte schließe deinen micro:bit erneut an und versuche es nochmal.",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "Um diese Funktion nutzen zu können, musst du deine <link>micro:bit Firmware aktualisieren </link>.",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "Bitte aktualisiere die micro:bit Firmware",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "Leider wird WebUSB in diesem Browser nicht unterstützt und dein Programm wird stattdessen auf deinem Computer gespeichert. Folge den Schritten auf dem nächsten Bildschirm, um es auf deinen micro:bit zu übertragen. Wir empfehlen Google Chrome oder Microsoft Edge, damit du dich direkt mit deinem micro:bit verbinden kannst.",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

lang/ui.en.json

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,25 +1120,17 @@
11201120
"description": "Part of WebUSB error message"
11211121
},
11221122
"webusb-error-clear-connect-title": {
1123-
"defaultMessage": "Unable to claim interface",
1123+
"defaultMessage": "Another page or browser tab is connected to this micro:bit",
11241124
"description": "Title of error for WebUsb connection"
11251125
},
11261126
"webusb-error-default-title": {
11271127
"defaultMessage": "WebUSB error",
11281128
"description": "Default title for error messages relating to WebUSB"
11291129
},
11301130
"webusb-error-reconnect-microbit-description": {
1131-
"defaultMessage": "Please reconnect your micro:bit and try again.",
1131+
"defaultMessage": "<p>Please follow these steps, then try again:</p><ul><li>unplug the USB cable</li><li>unplug the battery pack if one is attached</li><li>reconnect the USB cable</li><li>reconnect the battery pack if one was attached</li></ul>",
11321132
"description": "Part of WebUSB error message"
11331133
},
1134-
"webusb-error-update-req-description": {
1135-
"defaultMessage": "You need to <link>update your micro:bit firmware</link> to make use of this feature.",
1136-
"description": "WebUSB error telling user to update firmware"
1137-
},
1138-
"webusb-error-update-req-title": {
1139-
"defaultMessage": "Please update the micro:bit firmware",
1140-
"description": "Error text telling user to update firmware"
1141-
},
11421134
"webusb-not-supported": {
11431135
"defaultMessage": "Unfortunately, WebUSB is not supported in this browser and your program will be saved to your computer instead. Follow the steps on the next screen to transfer it to your micro:bit. We recommend Google Chrome or Microsoft Edge so you can connect directly to your micro:bit.",
11441136
"description": "Explantion shown when user's browser doesn't support WebUSB"
@@ -1171,4 +1163,4 @@
11711163
"defaultMessage": "Zoom out",
11721164
"description": "Text label for zoom out button"
11731165
}
1174-
}
1166+
}

lang/ui.es-es.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "Por favor reconecta el micro:bit e intentalo de nuevo.",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "Necesitas <link>actualizar el firmware del micro:bit</link> para usar esta función.",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "Actualiza el firmware micro:bit",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "Desafortunadamente, este navegador no admite WebUSB, por lo que el programa se guardará en el ordenador. Sigue los pasos indicados en la siguiente pantalla para transferirlo al micro:bit. Recomendamos Google Chrome o Microsoft Edge para poder conectarte directamente al micro:bit.",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

lang/ui.fr.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "Veuillez reconnecter votre micro:bit et réessayer.",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "Vous devez <link>mettre à jour le micrologiciel de votre micro:bit</link> pour utiliser cette fonctionnalité.",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "Veuillez mettre à jour le micrologiciel de micro:bit",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "Malheureusement, WebUSB n'est pas pris en charge dans ce navigateur et votre programme sera sauvegardé sur votre ordinateur. Suivez les étapes sur l'écran suivant pour le transférer vers votre micro:bit. Nous vous recommandons Google Chrome ou Microsoft Edge afin que vous puissiez vous connecter directement à votre micro:bit.",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

lang/ui.ja.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "micro:bitを再接続して、やり直してください。",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "この機能を利用するには、<link>micro:bitファームウェアを更新</link>する必要があります。",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "micro:bit のファームウェアを更新してください。",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "残念ながら、WebUSBはこのブラウザではサポートされていないので、代わりにプログラムをコンピュータに保存します。 次の画面の手順に従ってmicro:bitに転送してください。micro:bitと直接接続できるように、Google ChromeまたはMicrosoft Edgeをお勧めします。",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

lang/ui.ko.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "micro:bit 연결을 확인한 후, 다시 시도해 보세요.",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "이 기능을 활용하려면 <link>micro:bit 펌웨어를 업데이트</link>해야 합니다.",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "micro:bit 펌웨어를 업데이트 하세요.",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "이 브라우저가 WebUSB를 지원하지 않아 프로그램이 컴퓨터에 저장됩니다. micro:bit로 전송하려면 다음 화면의 단계를 따르세요. micro:bit에 직접 연결할 수 있도록 Google Chrome 또는 Microsoft Edge 사용을 권장합니다.",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

lang/ui.nl.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "Verbind je micro:bit opnieuw en probeer het nog eens.",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "Je moet <link>je micro:bit firmware</link> updaten om deze functie te gebruiken.",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "Werk de firmware van de micro:bit bij",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "Helaas wordt WebUSB niet ondersteund in deze browser en zal je programma worden opgeslagen op je computer. Volg de stappen op het volgende scherm om het naar de micro:bit te verplaatsen. We raden Google Chrome of Microsoft Edge aan, zodat je direct verbinding kunt maken met je micro:bit.",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

lang/ui.zh-cn.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "请重新连接 micro:bit 然后再次尝试。",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "您需要 <link>update your micro:bit firmware</link> 才能使用此功能。",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "请更新 micro:bit 固件",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "很遗憾,此浏览器不支持 WebUSB,您的程序将被保存到您的计算机上。请按照下一个屏幕上的步骤将其传输到您的 micro:bit。我们建议您使用 Google Chrome 或 Microsoft Edge 浏览器,以便您可以直接连接到您的 micro:bit。",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

lang/ui.zh-tw.json

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,14 +1130,6 @@
11301130
"defaultMessage": "請重新連接你的 micro:bit 後再試一次。",
11311131
"description": "Part of WebUSB error message"
11321132
},
1133-
"webusb-error-update-req-description": {
1134-
"defaultMessage": "您需要<link>更新您的 micro:bit 韌體</link>,以使用此功能。",
1135-
"description": "WebUSB error telling user to update firmware"
1136-
},
1137-
"webusb-error-update-req-title": {
1138-
"defaultMessage": "請更新 micro:bit 韌體",
1139-
"description": "Error text telling user to update firmware"
1140-
},
11411133
"webusb-not-supported": {
11421134
"defaultMessage": "很抱歉,此瀏覽器不支援 WebUSB,您的程式將儲存至您的電腦。請依照下一個畫面上的步驟,將其傳輸至您的 micro:bit。我們建議您使用 Google Chrome 或 Microsoft Edge,以便能直接連線至您的 micro:bit。",
11431135
"description": "Explantion shown when user's browser doesn't support WebUSB"

src/messages/ui.ca.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2417,18 +2417,6 @@
24172417
"value": "Torna a connectar la teva micro:bit i torna-ho a provar."
24182418
}
24192419
],
2420-
"webusb-error-update-req-description": [
2421-
{
2422-
"type": 0,
2423-
"value": "Has d<link>actualitzar el microprogramari de la teva micro:bit </link> per fer ús daquesta característica."
2424-
}
2425-
],
2426-
"webusb-error-update-req-title": [
2427-
{
2428-
"type": 0,
2429-
"value": "Actualitza el microprogramari de la micro:bit "
2430-
}
2431-
],
24322420
"webusb-not-supported": [
24332421
{
24342422
"type": 0,

src/messages/ui.de.json

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2499,32 +2499,6 @@
24992499
"value": "Bitte schließe deinen micro:bit erneut an und versuche es nochmal."
25002500
}
25012501
],
2502-
"webusb-error-update-req-description": [
2503-
{
2504-
"type": 0,
2505-
"value": "Um diese Funktion nutzen zu können, musst du deine "
2506-
},
2507-
{
2508-
"children": [
2509-
{
2510-
"type": 0,
2511-
"value": "micro:bit Firmware aktualisieren "
2512-
}
2513-
],
2514-
"type": 8,
2515-
"value": "link"
2516-
},
2517-
{
2518-
"type": 0,
2519-
"value": "."
2520-
}
2521-
],
2522-
"webusb-error-update-req-title": [
2523-
{
2524-
"type": 0,
2525-
"value": "Bitte aktualisiere die micro:bit Firmware"
2526-
}
2527-
],
25282502
"webusb-not-supported": [
25292503
{
25302504
"type": 0,

src/messages/ui.en.json

Lines changed: 48 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2430,13 +2430,13 @@
24302430
"webusb-error-clear-connect-description-2": [
24312431
{
24322432
"type": 0,
2433-
"value": "Close any other tabs that may be using WebUSB (e.g. MakeCode, Python Editor), or unplug and replug the micro:bit before trying again."
2433+
"value": "Close any other pages or tabs that may be using WebUSB (e.g. MakeCode, Python Editor), or unplug and replug the micro:bit before trying again."
24342434
}
24352435
],
24362436
"webusb-error-clear-connect-title": [
24372437
{
24382438
"type": 0,
2439-
"value": "Unable to claim interface"
2439+
"value": "Another page or browser tab is connected to this micro:bit"
24402440
}
24412441
],
24422442
"webusb-error-default-title": [
@@ -2446,35 +2446,61 @@
24462446
}
24472447
],
24482448
"webusb-error-reconnect-microbit-description": [
2449-
{
2450-
"type": 0,
2451-
"value": "Please reconnect your micro:bit and try again."
2452-
}
2453-
],
2454-
"webusb-error-update-req-description": [
2455-
{
2456-
"type": 0,
2457-
"value": "You need to "
2458-
},
24592449
{
24602450
"children": [
24612451
{
24622452
"type": 0,
2463-
"value": "update your micro:bit firmware"
2453+
"value": "Please follow these steps, then try again:"
24642454
}
24652455
],
24662456
"type": 8,
2467-
"value": "link"
2457+
"value": "p"
24682458
},
24692459
{
2470-
"type": 0,
2471-
"value": " to make use of this feature."
2472-
}
2473-
],
2474-
"webusb-error-update-req-title": [
2475-
{
2476-
"type": 0,
2477-
"value": "Please update the micro:bit firmware"
2460+
"children": [
2461+
{
2462+
"children": [
2463+
{
2464+
"type": 0,
2465+
"value": "unplug the USB cable"
2466+
}
2467+
],
2468+
"type": 8,
2469+
"value": "li"
2470+
},
2471+
{
2472+
"children": [
2473+
{
2474+
"type": 0,
2475+
"value": "unplug the battery pack if one is attached"
2476+
}
2477+
],
2478+
"type": 8,
2479+
"value": "li"
2480+
},
2481+
{
2482+
"children": [
2483+
{
2484+
"type": 0,
2485+
"value": "reconnect the USB cable"
2486+
}
2487+
],
2488+
"type": 8,
2489+
"value": "li"
2490+
},
2491+
{
2492+
"children": [
2493+
{
2494+
"type": 0,
2495+
"value": "reconnect the battery pack if one was attached"
2496+
}
2497+
],
2498+
"type": 8,
2499+
"value": "li"
2500+
}
2501+
],
2502+
"type": 8,
2503+
"value": "ul"
24782504
}
24792505
],
24802506
"webusb-not-supported": [

src/messages/ui.es-es.json

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,32 +2443,6 @@
24432443
"value": "Por favor reconecta el micro:bit e intentalo de nuevo."
24442444
}
24452445
],
2446-
"webusb-error-update-req-description": [
2447-
{
2448-
"type": 0,
2449-
"value": "Necesitas "
2450-
},
2451-
{
2452-
"children": [
2453-
{
2454-
"type": 0,
2455-
"value": "actualizar el firmware del micro:bit"
2456-
}
2457-
],
2458-
"type": 8,
2459-
"value": "link"
2460-
},
2461-
{
2462-
"type": 0,
2463-
"value": " para usar esta función."
2464-
}
2465-
],
2466-
"webusb-error-update-req-title": [
2467-
{
2468-
"type": 0,
2469-
"value": "Actualiza el firmware micro:bit"
2470-
}
2471-
],
24722446
"webusb-not-supported": [
24732447
{
24742448
"type": 0,

src/messages/ui.fr.json

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2443,32 +2443,6 @@
24432443
"value": "Veuillez reconnecter votre micro:bit et réessayer."
24442444
}
24452445
],
2446-
"webusb-error-update-req-description": [
2447-
{
2448-
"type": 0,
2449-
"value": "Vous devez "
2450-
},
2451-
{
2452-
"children": [
2453-
{
2454-
"type": 0,
2455-
"value": "mettre à jour le micrologiciel de votre micro:bit"
2456-
}
2457-
],
2458-
"type": 8,
2459-
"value": "link"
2460-
},
2461-
{
2462-
"type": 0,
2463-
"value": " pour utiliser cette fonctionnalité."
2464-
}
2465-
],
2466-
"webusb-error-update-req-title": [
2467-
{
2468-
"type": 0,
2469-
"value": "Veuillez mettre à jour le micrologiciel de micro:bit"
2470-
}
2471-
],
24722446
"webusb-not-supported": [
24732447
{
24742448
"type": 0,

0 commit comments

Comments
 (0)