From fd02bd94071800e2a0b6043906fe16b8fe415d0b Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 1 Jun 2016 07:42:03 -0700 Subject: [PATCH] updated docs menu --- docs/getting-started.md | 13 ++++++------- docs/packages.md | 29 ++++++++++++++++++++++++++++- pxtarget.json | 8 ++++++-- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 3ba449c2..099c3e65 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -2,10 +2,6 @@ Are you ready to build cool BBC micro:bit programs? For each challenge, reorder the blocks to recreate the program. -## Open [https://m.pxt.io](/) and create a new **Blocks Editor** project - -## Basic - ### Show leds Use the blocks below to draw a figure on the screen. You can redo the smiley face or try something else! @@ -22,7 +18,7 @@ basic.showLeds(` To transfer your code to the BBC micro:bit, * connect your micro:bit to the computer using the USB cable -* click on **Download** +* click on **Compile** * drag&drop the **.hex** file into the **MICROBIT** drive * wait till the yellow light is done blinking! @@ -47,6 +43,11 @@ Show one image after the other to create an animation by snapping them together. `) ``` +To transfer your code to the BBC micro:bit, +* connect your micro:bit to the computer using the USB cable +* click on **Compile** +* drag&drop the **.hex** file into the **MICROBIT** drive +* wait till the yellow light is done blinking! ### Repeat forever @@ -77,8 +78,6 @@ basic.forever(() => { Use the blocks ``show leds`` and ``forever`` to create your own custom awesome animation! -## Inputs - ### Button A and B Unshuffle the blocks so that the micro:bit shows "YES" when button A is pressed, and "NO" when B is pressed. diff --git a/docs/packages.md b/docs/packages.md index 4217e3fa..f1521f8e 100644 --- a/docs/packages.md +++ b/docs/packages.md @@ -18,4 +18,31 @@ To remove a package, click on the garbage button in the file list next to the pa ## Publishing libraries -Packages can be published from the pxt command line. We are still sorting out the details. \ No newline at end of file +Packages can be published from the pxt command line. We are still sorting out the details. + +## Localizing libraries + +It is possible to package localization strings for the **jsDoc** description associated to the API in the package. + +When compiling a package, the PXT compiler generates a `strings.json` file under the `_locales/` folder. +This file contains a map from the symbol name to the en + +``` +{ + ... + "basic": "Provides access to basic micro:bit functionality.", + ... +} +``` + +``` +{ + "basic.clearScreen": "Eteint toutes les diodes." +} +``` + +``` +_locales/ +_locales/fr/strings.json +_locales/pt-BR/strings.json +``` diff --git a/pxtarget.json b/pxtarget.json index 81471718..659adfea 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -94,13 +94,17 @@ "path": "/about" }, { - "name": "Lessons", - "path": "/lessons" + "name": "Getting Started", + "path": "/getting-started" }, { "name": "Reference", "path": "/reference" }, + { + "name": "Lessons", + "path": "/lessons" + }, { "name": "Device", "path": "/device"