Skip to content

Commit

Permalink
Merge branch 'main' into beta-micropython
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-matt-hillsdon committed May 23, 2024
2 parents 8e948da + 2838da6 commit 54a3f8b
Show file tree
Hide file tree
Showing 108 changed files with 4,584 additions and 781 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
VITE_VERSION=$npm_package_version
VITE_NAME=$npm_package_name
VITE_FULL_URL=/
VITE_SANITY_PROJECT=ajwvhvgo
VITE_SANITY_DATASET=apps
VITE_SANITY_PREVIEW_DATASET=apps-preview
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ jobs:

steps:
# Note: This workflow disables deployment steps and micro:bit branding installation on forks.
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Configure node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
registry-url: "https://npm.pkg.github.com"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm install --no-save @microbit-foundation/[email protected].37 @microbit-foundation/[email protected] @microbit-foundation/[email protected] @microbit-foundation/circleci-npm-package-versioner@1
- run: npm install --no-save @microbit-foundation/[email protected].43 @microbit-foundation/[email protected] @microbit-foundation/[email protected] @microbit-foundation/circleci-npm-package-versioner@1
if: github.repository_owner == 'microbit-foundation'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion bin/update-translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ $# -eq 0 ]; then
exit 1
fi

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

mkdir -p crowdin/translated
for language in $languages; do
Expand Down
6 changes: 5 additions & 1 deletion docs/tech-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ To produce the correct data format to flash a micro:bit, we use the Foundation's

## The sidebar and educational content

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.
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.

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/).

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).

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).

Expand Down
11 changes: 11 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@
window.dataLayer.push(arguments);
};
</script>
<script type="text/javascript" id="crowdin-jipt-config">
(function () {
function escape() {
window.location.href = "%VITE_FULL_URL";
}
window._jipt = [
["project", "microbitorg"],
["escape", escape],
];
})();
</script>
<% } %>
<script type="module" src="/src/index.tsx"></script>
</head>
Expand Down
24 changes: 16 additions & 8 deletions lang/ui.ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,14 @@
"defaultMessage": "Canviar mòduls de tercers pot significar que no funcionin com s'havia previst.",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features": {
"defaultMessage": "Show warnings about V2-only features",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features-info": {
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
"description": "Checkbox setting label"
},
"settings": {
"defaultMessage": "Configuració",
"description": "Settings text"
Expand Down Expand Up @@ -1110,6 +1118,10 @@
"defaultMessage": "visita microbit.org (s'obre en una pestanya nova)",
"description": "alt text for logo link to .org"
},
"warn-on-v2-only-features-action": {
"defaultMessage": "Disable warnings about V2-only features",
"description": "Label for editor action"
},
"webusb-error-clear-connect-description-1": {
"defaultMessage": "Un altre procés està connectat a aquest dispositiu.",
"description": "Part of WebUSB error message"
Expand All @@ -1130,14 +1142,6 @@
"defaultMessage": "Torna a connectar la teva micro:bit i torna-ho a provar.",
"description": "Part of WebUSB error message"
},
"webusb-error-update-req-description": {
"defaultMessage": "Has d'<link>actualitzar el microprogramari de la teva micro:bit </link> per fer ús d'aquesta característica.",
"description": "WebUSB error telling user to update firmware"
},
"webusb-error-update-req-title": {
"defaultMessage": "Actualitza el microprogramari de la micro:bit ",
"description": "Error text telling user to update firmware"
},
"webusb-not-supported": {
"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.",
"description": "Explantion shown when user's browser doesn't support WebUSB"
Expand All @@ -1158,6 +1162,10 @@
"defaultMessage": "Benvingut a l'Editor Python de la micro:bit",
"description": "Title for the welcome dialog"
},
"welcome-video-alt": {
"defaultMessage": "video introducing the Python Editor",
"description": "iframe title for the welcome video"
},
"zoom-in-action": {
"defaultMessage": "Amplia",
"description": "Text label for zoom in button"
Expand Down
24 changes: 16 additions & 8 deletions lang/ui.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,14 @@
"defaultMessage": "Wenn du Module von Drittanbietern änderst, kann es sein, dass sie nicht mehr wie vorgesehen funktionieren.",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features": {
"defaultMessage": "Show warnings about V2-only features",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features-info": {
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
"description": "Checkbox setting label"
},
"settings": {
"defaultMessage": "Einstellungen",
"description": "Settings text"
Expand Down Expand Up @@ -1110,6 +1118,10 @@
"defaultMessage": "besuche microbit.org (öffnet in neuen Tab)",
"description": "alt text for logo link to .org"
},
"warn-on-v2-only-features-action": {
"defaultMessage": "Disable warnings about V2-only features",
"description": "Label for editor action"
},
"webusb-error-clear-connect-description-1": {
"defaultMessage": "Ein anderer Prozess ist mit diesem Gerät verbunden.",
"description": "Part of WebUSB error message"
Expand All @@ -1130,14 +1142,6 @@
"defaultMessage": "Bitte schließe deinen micro:bit erneut an und versuche es nochmal.",
"description": "Part of WebUSB error message"
},
"webusb-error-update-req-description": {
"defaultMessage": "Um diese Funktion nutzen zu können, musst du deine <link>micro:bit Firmware aktualisieren </link>.",
"description": "WebUSB error telling user to update firmware"
},
"webusb-error-update-req-title": {
"defaultMessage": "Bitte aktualisiere die micro:bit Firmware",
"description": "Error text telling user to update firmware"
},
"webusb-not-supported": {
"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.",
"description": "Explantion shown when user's browser doesn't support WebUSB"
Expand All @@ -1158,6 +1162,10 @@
"defaultMessage": "Willkommen zum micro:bit Python-Editor",
"description": "Title for the welcome dialog"
},
"welcome-video-alt": {
"defaultMessage": "video introducing the Python Editor",
"description": "iframe title for the welcome video"
},
"zoom-in-action": {
"defaultMessage": "Vergrößern",
"description": "Text label for zoom in button"
Expand Down
28 changes: 18 additions & 10 deletions lang/ui.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,14 @@
"defaultMessage": "Changing third-party modules may mean they don’t work as intended.",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features": {
"defaultMessage": "Show warnings about V2-only features",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features-info": {
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
"description": "Checkbox setting label"
},
"settings": {
"defaultMessage": "Settings",
"description": "Settings text"
Expand Down Expand Up @@ -1111,6 +1119,10 @@
"defaultMessage": "visit microbit.org (opens in a new tab)",
"description": "alt text for logo link to .org"
},
"warn-on-v2-only-features-action": {
"defaultMessage": "Disable warnings about V2-only features",
"description": "Label for editor action"
},
"webusb-error-clear-connect-description-1": {
"defaultMessage": "Another process is connected to this device.",
"description": "Part of WebUSB error message"
Expand All @@ -1120,25 +1132,17 @@
"description": "Part of WebUSB error message"
},
"webusb-error-clear-connect-title": {
"defaultMessage": "Unable to claim interface",
"defaultMessage": "Another page or browser tab is connected to this micro:bit",
"description": "Title of error for WebUsb connection"
},
"webusb-error-default-title": {
"defaultMessage": "WebUSB error",
"description": "Default title for error messages relating to WebUSB"
},
"webusb-error-reconnect-microbit-description": {
"defaultMessage": "Please reconnect your micro:bit and try again.",
"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>",
"description": "Part of WebUSB error message"
},
"webusb-error-update-req-description": {
"defaultMessage": "You need to <link>update your micro:bit firmware</link> to make use of this feature.",
"description": "WebUSB error telling user to update firmware"
},
"webusb-error-update-req-title": {
"defaultMessage": "Please update the micro:bit firmware",
"description": "Error text telling user to update firmware"
},
"webusb-not-supported": {
"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.",
"description": "Explantion shown when user's browser doesn't support WebUSB"
Expand All @@ -1159,6 +1163,10 @@
"defaultMessage": "Welcome to the micro:bit Python Editor",
"description": "Title for the welcome dialog"
},
"welcome-video-alt": {
"defaultMessage": "video introducing the Python Editor",
"description": "iframe title for the welcome video"
},
"zoom-in-action": {
"defaultMessage": "Zoom in",
"description": "Text label for zoom in button"
Expand Down
24 changes: 16 additions & 8 deletions lang/ui.es-es.json
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,14 @@
"defaultMessage": "Cambiar los módulos de terceros puede provocar que no funcionen como deberían.",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features": {
"defaultMessage": "Show warnings about V2-only features",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features-info": {
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
"description": "Checkbox setting label"
},
"settings": {
"defaultMessage": "Configuración",
"description": "Settings text"
Expand Down Expand Up @@ -1110,6 +1118,10 @@
"defaultMessage": "visitar microbit.org (abre en una nueva pestaña)",
"description": "alt text for logo link to .org"
},
"warn-on-v2-only-features-action": {
"defaultMessage": "Disable warnings about V2-only features",
"description": "Label for editor action"
},
"webusb-error-clear-connect-description-1": {
"defaultMessage": "Otro proceso está conectado a este dispositivo.",
"description": "Part of WebUSB error message"
Expand All @@ -1130,14 +1142,6 @@
"defaultMessage": "Por favor reconecta el micro:bit e intentalo de nuevo.",
"description": "Part of WebUSB error message"
},
"webusb-error-update-req-description": {
"defaultMessage": "Necesitas <link>actualizar el firmware del micro:bit</link> para usar esta función.",
"description": "WebUSB error telling user to update firmware"
},
"webusb-error-update-req-title": {
"defaultMessage": "Actualiza el firmware micro:bit",
"description": "Error text telling user to update firmware"
},
"webusb-not-supported": {
"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.",
"description": "Explantion shown when user's browser doesn't support WebUSB"
Expand All @@ -1158,6 +1162,10 @@
"defaultMessage": "Bienvenido al Editor de Python de micro:bit",
"description": "Title for the welcome dialog"
},
"welcome-video-alt": {
"defaultMessage": "video introducing the Python Editor",
"description": "iframe title for the welcome video"
},
"zoom-in-action": {
"defaultMessage": "Aumentar zoom",
"description": "Text label for zoom in button"
Expand Down
24 changes: 16 additions & 8 deletions lang/ui.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,14 @@
"defaultMessage": "La modification de modules tiers peut empêcher leur bon fonctionnement.",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features": {
"defaultMessage": "Show warnings about V2-only features",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features-info": {
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
"description": "Checkbox setting label"
},
"settings": {
"defaultMessage": "Paramètres",
"description": "Settings text"
Expand Down Expand Up @@ -1110,6 +1118,10 @@
"defaultMessage": "visiter microbit.org (s’ouvre dans un nouvel onglet)",
"description": "alt text for logo link to .org"
},
"warn-on-v2-only-features-action": {
"defaultMessage": "Disable warnings about V2-only features",
"description": "Label for editor action"
},
"webusb-error-clear-connect-description-1": {
"defaultMessage": "Un autre processus est connecté à cet appareil.",
"description": "Part of WebUSB error message"
Expand All @@ -1130,14 +1142,6 @@
"defaultMessage": "Veuillez reconnecter votre micro:bit et réessayer.",
"description": "Part of WebUSB error message"
},
"webusb-error-update-req-description": {
"defaultMessage": "Vous devez <link>mettre à jour le micrologiciel de votre micro:bit</link> pour utiliser cette fonctionnalité.",
"description": "WebUSB error telling user to update firmware"
},
"webusb-error-update-req-title": {
"defaultMessage": "Veuillez mettre à jour le micrologiciel de micro:bit",
"description": "Error text telling user to update firmware"
},
"webusb-not-supported": {
"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.",
"description": "Explantion shown when user's browser doesn't support WebUSB"
Expand All @@ -1158,6 +1162,10 @@
"defaultMessage": "Bienvenue dans l'éditeur Python micro:bit",
"description": "Title for the welcome dialog"
},
"welcome-video-alt": {
"defaultMessage": "video introducing the Python Editor",
"description": "iframe title for the welcome video"
},
"zoom-in-action": {
"defaultMessage": "Zoom avant",
"description": "Text label for zoom in button"
Expand Down
24 changes: 16 additions & 8 deletions lang/ui.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,14 @@
"defaultMessage": "サードパーティ製モジュールを変更すると、意図した通りに動作しない可能性があります。",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features": {
"defaultMessage": "Show warnings about V2-only features",
"description": "Checkbox setting label"
},
"setting-warn-on-v2-only-features-info": {
"defaultMessage": "Warnings are shown in the editor when a micro:bit V1 is connected",
"description": "Checkbox setting label"
},
"settings": {
"defaultMessage": "設定",
"description": "Settings text"
Expand Down Expand Up @@ -1110,6 +1118,10 @@
"defaultMessage": "microbit.orgにアクセスします(新しいタブで開きます)",
"description": "alt text for logo link to .org"
},
"warn-on-v2-only-features-action": {
"defaultMessage": "Disable warnings about V2-only features",
"description": "Label for editor action"
},
"webusb-error-clear-connect-description-1": {
"defaultMessage": "別のプロセスがこのデバイスに接続されています。",
"description": "Part of WebUSB error message"
Expand All @@ -1130,14 +1142,6 @@
"defaultMessage": "micro:bitを再接続して、やり直してください。",
"description": "Part of WebUSB error message"
},
"webusb-error-update-req-description": {
"defaultMessage": "この機能を利用するには、<link>micro:bitファームウェアを更新</link>する必要があります。",
"description": "WebUSB error telling user to update firmware"
},
"webusb-error-update-req-title": {
"defaultMessage": "micro:bit のファームウェアを更新してください。",
"description": "Error text telling user to update firmware"
},
"webusb-not-supported": {
"defaultMessage": "残念ながら、WebUSBはこのブラウザではサポートされていないので、代わりにプログラムをコンピュータに保存します。 次の画面の手順に従ってmicro:bitに転送してください。micro:bitと直接接続できるように、Google ChromeまたはMicrosoft Edgeをお勧めします。",
"description": "Explantion shown when user's browser doesn't support WebUSB"
Expand All @@ -1158,6 +1162,10 @@
"defaultMessage": "micro:bit Pythonエディターへようこそ",
"description": "Title for the welcome dialog"
},
"welcome-video-alt": {
"defaultMessage": "video introducing the Python Editor",
"description": "iframe title for the welcome video"
},
"zoom-in-action": {
"defaultMessage": "拡大",
"description": "Text label for zoom in button"
Expand Down
Loading

0 comments on commit 54a3f8b

Please sign in to comment.