Skip to content

Commit 54a3f8b

Browse files
Merge branch 'main' into beta-micropython
2 parents 8e948da + 2838da6 commit 54a3f8b

File tree

108 files changed

+4584
-781
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+4584
-781
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
VITE_VERSION=$npm_package_version
22
VITE_NAME=$npm_package_name
33
VITE_FULL_URL=/
4+
VITE_SANITY_PROJECT=ajwvhvgo
5+
VITE_SANITY_DATASET=apps
6+
VITE_SANITY_PREVIEW_DATASET=apps-preview

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ jobs:
2727

2828
steps:
2929
# Note: This workflow disables deployment steps and micro:bit branding installation on forks.
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3131
- name: Configure node
32-
uses: actions/setup-node@v3
32+
uses: actions/setup-node@v4
3333
with:
3434
node-version: 20.x
3535
cache: "npm"
3636
registry-url: "https://npm.pkg.github.com"
3737
- run: npm ci
3838
env:
3939
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
- run: npm install --no-save @microbit-foundation/python-editor-v3-microbit@0.2.0-dev.37 @microbit-foundation/website-deploy-aws@0.6.0 @microbit-foundation/website-deploy-aws-config@0.9.0 @microbit-foundation/circleci-npm-package-versioner@1
40+
- run: npm install --no-save @microbit-foundation/python-editor-v3-microbit@0.2.0-dev.43 @microbit-foundation/website-deploy-aws@0.6.0 @microbit-foundation/website-deploy-aws-config@0.9.0 @microbit-foundation/circleci-npm-package-versioner@1
4141
if: github.repository_owner == 'microbit-foundation'
4242
env:
4343
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

bin/update-translations.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ $# -eq 0 ]; then
1515
exit 1
1616
fi
1717

18-
languages="ca de fr es-ES ja ko nl zh-CN zh-TW"
18+
languages="ca de fr es-ES ja ko nl zh-CN zh-TW lol"
1919

2020
mkdir -p crowdin/translated
2121
for language in $languages; do

docs/tech-overview.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ To produce the correct data format to flash a micro:bit, we use the Foundation's
3232

3333
## The sidebar and educational content
3434

35-
The Reference and Ideas sidebar tabs show educational content that is managed in the Micro:bit Educational Foundation's content management system (CMS). The content is currently sourced live from the CMS. For non-localhost deploys this will require CORS configuration on our end. Please open an issue to discuss this.
35+
The Reference and Ideas sidebar tabs show educational content that is managed in the Micro:bit Educational Foundation's content management system (Sanity CMS). This content is not Open Source. The content is sourced live from the CMS APIs. It will work for local development but non-Foundation deployments will see CORS errors.
36+
37+
You can substitute your own content by setting `VITE_SANITY_PROJECT` and `VITE_SANITY_DATASET` environment variables, overriding the defaults in `.env`. The schemas we use for Sanity CMS are [packaged as a plugin in this GitHub project](https://github.com/microbit-foundation/sanity-plugin-python-editor-v3/).
38+
39+
We also plan to explore adding Markdown documentation support as an alternative to Sanity CMS. You can follow the discussion on [#1160](https://github.com/microbit-foundation/python-editor-v3/issues/1160).
3640

3741
The API tab shows detailed documentation of the MicroPython API for users who need more detail than the curated content in the Reference tab provides. The API tab content is generated at runtime from the bundled type stubs for MicroPython. We do this using an enhancement to the Foundation's fork of Pyright. For more details see [Python code intelligence](#python-code-intelligence).
3842

index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
window.dataLayer.push(arguments);
3636
};
3737
</script>
38+
<script type="text/javascript" id="crowdin-jipt-config">
39+
(function () {
40+
function escape() {
41+
window.location.href = "%VITE_FULL_URL";
42+
}
43+
window._jipt = [
44+
["project", "microbitorg"],
45+
["escape", escape],
46+
];
47+
})();
48+
</script>
3849
<% } %>
3950
<script type="module" src="/src/index.tsx"></script>
4051
</head>

lang/ui.ca.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,14 @@
742742
"defaultMessage": "Canviar mòduls de tercers pot significar que no funcionin com s'havia previst.",
743743
"description": "Checkbox setting label"
744744
},
745+
"setting-warn-on-v2-only-features": {
746+
"defaultMessage": "Show warnings about V2-only features",
747+
"description": "Checkbox setting label"
748+
},
749+
"setting-warn-on-v2-only-features-info": {
750+
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
751+
"description": "Checkbox setting label"
752+
},
745753
"settings": {
746754
"defaultMessage": "Configuració",
747755
"description": "Settings text"
@@ -1110,6 +1118,10 @@
11101118
"defaultMessage": "visita microbit.org (s'obre en una pestanya nova)",
11111119
"description": "alt text for logo link to .org"
11121120
},
1121+
"warn-on-v2-only-features-action": {
1122+
"defaultMessage": "Disable warnings about V2-only features",
1123+
"description": "Label for editor action"
1124+
},
11131125
"webusb-error-clear-connect-description-1": {
11141126
"defaultMessage": "Un altre procés està connectat a aquest dispositiu.",
11151127
"description": "Part of WebUSB error message"
@@ -1130,14 +1142,6 @@
11301142
"defaultMessage": "Torna a connectar la teva micro:bit i torna-ho a provar.",
11311143
"description": "Part of WebUSB error message"
11321144
},
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-
},
11411145
"webusb-not-supported": {
11421146
"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.",
11431147
"description": "Explantion shown when user's browser doesn't support WebUSB"
@@ -1158,6 +1162,10 @@
11581162
"defaultMessage": "Benvingut a l'Editor Python de la micro:bit",
11591163
"description": "Title for the welcome dialog"
11601164
},
1165+
"welcome-video-alt": {
1166+
"defaultMessage": "video introducing the Python Editor",
1167+
"description": "iframe title for the welcome video"
1168+
},
11611169
"zoom-in-action": {
11621170
"defaultMessage": "Amplia",
11631171
"description": "Text label for zoom in button"

lang/ui.de.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,14 @@
742742
"defaultMessage": "Wenn du Module von Drittanbietern änderst, kann es sein, dass sie nicht mehr wie vorgesehen funktionieren.",
743743
"description": "Checkbox setting label"
744744
},
745+
"setting-warn-on-v2-only-features": {
746+
"defaultMessage": "Show warnings about V2-only features",
747+
"description": "Checkbox setting label"
748+
},
749+
"setting-warn-on-v2-only-features-info": {
750+
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
751+
"description": "Checkbox setting label"
752+
},
745753
"settings": {
746754
"defaultMessage": "Einstellungen",
747755
"description": "Settings text"
@@ -1110,6 +1118,10 @@
11101118
"defaultMessage": "besuche microbit.org (öffnet in neuen Tab)",
11111119
"description": "alt text for logo link to .org"
11121120
},
1121+
"warn-on-v2-only-features-action": {
1122+
"defaultMessage": "Disable warnings about V2-only features",
1123+
"description": "Label for editor action"
1124+
},
11131125
"webusb-error-clear-connect-description-1": {
11141126
"defaultMessage": "Ein anderer Prozess ist mit diesem Gerät verbunden.",
11151127
"description": "Part of WebUSB error message"
@@ -1130,14 +1142,6 @@
11301142
"defaultMessage": "Bitte schließe deinen micro:bit erneut an und versuche es nochmal.",
11311143
"description": "Part of WebUSB error message"
11321144
},
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-
},
11411145
"webusb-not-supported": {
11421146
"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.",
11431147
"description": "Explantion shown when user's browser doesn't support WebUSB"
@@ -1158,6 +1162,10 @@
11581162
"defaultMessage": "Willkommen zum micro:bit Python-Editor",
11591163
"description": "Title for the welcome dialog"
11601164
},
1165+
"welcome-video-alt": {
1166+
"defaultMessage": "video introducing the Python Editor",
1167+
"description": "iframe title for the welcome video"
1168+
},
11611169
"zoom-in-action": {
11621170
"defaultMessage": "Vergrößern",
11631171
"description": "Text label for zoom in button"

lang/ui.en.json

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,14 @@
743743
"defaultMessage": "Changing third-party modules may mean they don’t work as intended.",
744744
"description": "Checkbox setting label"
745745
},
746+
"setting-warn-on-v2-only-features": {
747+
"defaultMessage": "Show warnings about V2-only features",
748+
"description": "Checkbox setting label"
749+
},
750+
"setting-warn-on-v2-only-features-info": {
751+
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
752+
"description": "Checkbox setting label"
753+
},
746754
"settings": {
747755
"defaultMessage": "Settings",
748756
"description": "Settings text"
@@ -1111,6 +1119,10 @@
11111119
"defaultMessage": "visit microbit.org (opens in a new tab)",
11121120
"description": "alt text for logo link to .org"
11131121
},
1122+
"warn-on-v2-only-features-action": {
1123+
"defaultMessage": "Disable warnings about V2-only features",
1124+
"description": "Label for editor action"
1125+
},
11141126
"webusb-error-clear-connect-description-1": {
11151127
"defaultMessage": "Another process is connected to this device.",
11161128
"description": "Part of WebUSB error message"
@@ -1120,25 +1132,17 @@
11201132
"description": "Part of WebUSB error message"
11211133
},
11221134
"webusb-error-clear-connect-title": {
1123-
"defaultMessage": "Unable to claim interface",
1135+
"defaultMessage": "Another page or browser tab is connected to this micro:bit",
11241136
"description": "Title of error for WebUsb connection"
11251137
},
11261138
"webusb-error-default-title": {
11271139
"defaultMessage": "WebUSB error",
11281140
"description": "Default title for error messages relating to WebUSB"
11291141
},
11301142
"webusb-error-reconnect-microbit-description": {
1131-
"defaultMessage": "Please reconnect your micro:bit and try again.",
1143+
"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>",
11321144
"description": "Part of WebUSB error message"
11331145
},
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-
},
11421146
"webusb-not-supported": {
11431147
"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.",
11441148
"description": "Explantion shown when user's browser doesn't support WebUSB"
@@ -1159,6 +1163,10 @@
11591163
"defaultMessage": "Welcome to the micro:bit Python Editor",
11601164
"description": "Title for the welcome dialog"
11611165
},
1166+
"welcome-video-alt": {
1167+
"defaultMessage": "video introducing the Python Editor",
1168+
"description": "iframe title for the welcome video"
1169+
},
11621170
"zoom-in-action": {
11631171
"defaultMessage": "Zoom in",
11641172
"description": "Text label for zoom in button"

lang/ui.es-es.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,14 @@
742742
"defaultMessage": "Cambiar los módulos de terceros puede provocar que no funcionen como deberían.",
743743
"description": "Checkbox setting label"
744744
},
745+
"setting-warn-on-v2-only-features": {
746+
"defaultMessage": "Show warnings about V2-only features",
747+
"description": "Checkbox setting label"
748+
},
749+
"setting-warn-on-v2-only-features-info": {
750+
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
751+
"description": "Checkbox setting label"
752+
},
745753
"settings": {
746754
"defaultMessage": "Configuración",
747755
"description": "Settings text"
@@ -1110,6 +1118,10 @@
11101118
"defaultMessage": "visitar microbit.org (abre en una nueva pestaña)",
11111119
"description": "alt text for logo link to .org"
11121120
},
1121+
"warn-on-v2-only-features-action": {
1122+
"defaultMessage": "Disable warnings about V2-only features",
1123+
"description": "Label for editor action"
1124+
},
11131125
"webusb-error-clear-connect-description-1": {
11141126
"defaultMessage": "Otro proceso está conectado a este dispositivo.",
11151127
"description": "Part of WebUSB error message"
@@ -1130,14 +1142,6 @@
11301142
"defaultMessage": "Por favor reconecta el micro:bit e intentalo de nuevo.",
11311143
"description": "Part of WebUSB error message"
11321144
},
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-
},
11411145
"webusb-not-supported": {
11421146
"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.",
11431147
"description": "Explantion shown when user's browser doesn't support WebUSB"
@@ -1158,6 +1162,10 @@
11581162
"defaultMessage": "Bienvenido al Editor de Python de micro:bit",
11591163
"description": "Title for the welcome dialog"
11601164
},
1165+
"welcome-video-alt": {
1166+
"defaultMessage": "video introducing the Python Editor",
1167+
"description": "iframe title for the welcome video"
1168+
},
11611169
"zoom-in-action": {
11621170
"defaultMessage": "Aumentar zoom",
11631171
"description": "Text label for zoom in button"

lang/ui.fr.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,14 @@
742742
"defaultMessage": "La modification de modules tiers peut empêcher leur bon fonctionnement.",
743743
"description": "Checkbox setting label"
744744
},
745+
"setting-warn-on-v2-only-features": {
746+
"defaultMessage": "Show warnings about V2-only features",
747+
"description": "Checkbox setting label"
748+
},
749+
"setting-warn-on-v2-only-features-info": {
750+
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
751+
"description": "Checkbox setting label"
752+
},
745753
"settings": {
746754
"defaultMessage": "Paramètres",
747755
"description": "Settings text"
@@ -1110,6 +1118,10 @@
11101118
"defaultMessage": "visiter microbit.org (s’ouvre dans un nouvel onglet)",
11111119
"description": "alt text for logo link to .org"
11121120
},
1121+
"warn-on-v2-only-features-action": {
1122+
"defaultMessage": "Disable warnings about V2-only features",
1123+
"description": "Label for editor action"
1124+
},
11131125
"webusb-error-clear-connect-description-1": {
11141126
"defaultMessage": "Un autre processus est connecté à cet appareil.",
11151127
"description": "Part of WebUSB error message"
@@ -1130,14 +1142,6 @@
11301142
"defaultMessage": "Veuillez reconnecter votre micro:bit et réessayer.",
11311143
"description": "Part of WebUSB error message"
11321144
},
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-
},
11411145
"webusb-not-supported": {
11421146
"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.",
11431147
"description": "Explantion shown when user's browser doesn't support WebUSB"
@@ -1158,6 +1162,10 @@
11581162
"defaultMessage": "Bienvenue dans l'éditeur Python micro:bit",
11591163
"description": "Title for the welcome dialog"
11601164
},
1165+
"welcome-video-alt": {
1166+
"defaultMessage": "video introducing the Python Editor",
1167+
"description": "iframe title for the welcome video"
1168+
},
11611169
"zoom-in-action": {
11621170
"defaultMessage": "Zoom avant",
11631171
"description": "Text label for zoom in button"

lang/ui.ja.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,14 @@
742742
"defaultMessage": "サードパーティ製モジュールを変更すると、意図した通りに動作しない可能性があります。",
743743
"description": "Checkbox setting label"
744744
},
745+
"setting-warn-on-v2-only-features": {
746+
"defaultMessage": "Show warnings about V2-only features",
747+
"description": "Checkbox setting label"
748+
},
749+
"setting-warn-on-v2-only-features-info": {
750+
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
751+
"description": "Checkbox setting label"
752+
},
745753
"settings": {
746754
"defaultMessage": "設定",
747755
"description": "Settings text"
@@ -1110,6 +1118,10 @@
11101118
"defaultMessage": "microbit.orgにアクセスします(新しいタブで開きます)",
11111119
"description": "alt text for logo link to .org"
11121120
},
1121+
"warn-on-v2-only-features-action": {
1122+
"defaultMessage": "Disable warnings about V2-only features",
1123+
"description": "Label for editor action"
1124+
},
11131125
"webusb-error-clear-connect-description-1": {
11141126
"defaultMessage": "別のプロセスがこのデバイスに接続されています。",
11151127
"description": "Part of WebUSB error message"
@@ -1130,14 +1142,6 @@
11301142
"defaultMessage": "micro:bitを再接続して、やり直してください。",
11311143
"description": "Part of WebUSB error message"
11321144
},
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-
},
11411145
"webusb-not-supported": {
11421146
"defaultMessage": "残念ながら、WebUSBはこのブラウザではサポートされていないので、代わりにプログラムをコンピュータに保存します。 次の画面の手順に従ってmicro:bitに転送してください。micro:bitと直接接続できるように、Google ChromeまたはMicrosoft Edgeをお勧めします。",
11431147
"description": "Explantion shown when user's browser doesn't support WebUSB"
@@ -1158,6 +1162,10 @@
11581162
"defaultMessage": "micro:bit Pythonエディターへようこそ",
11591163
"description": "Title for the welcome dialog"
11601164
},
1165+
"welcome-video-alt": {
1166+
"defaultMessage": "video introducing the Python Editor",
1167+
"description": "iframe title for the welcome video"
1168+
},
11611169
"zoom-in-action": {
11621170
"defaultMessage": "拡大",
11631171
"description": "Text label for zoom in button"

0 commit comments

Comments
 (0)