7.0 KiB
@extends
#promo
~ hint
Help translate
Looking to help translate the site for microbit.org? Try http://translate.microbit.org/ to help the Microbit Foundation!
~
#target-files
When you select your language from the MakeCode project home page, you'll find all of the localization files for MakeCode shown in a folder tree. The strings to translate for the @boardname@ are found in the files under the microbit folder for the current language.
Localization files are present in two different forms, JSON and markdown. The JSON files (those you see with the .json ending in their names) contain localizable strings related to both the editor UI and the text shown on the programming code blocks. All of the markdown files (those with .md at the end of their names) are documents for reference, projects, tutorials, help information, etc.
The files listed in the following sections provide a guide to how each of the translation files and folders relate to the MakeCode for @boardname@ editor. The links here are to the English source files just to show you the location of the files in the folder structure. Of course, you will translate in your selected language instead.
Editor
There a a few files that are specific to the MakeCode editor itself. These contain strings for the editor UI and the simulator. They are essential to translate and should be prioritized before the other files.
File | Description |
---|---|
strings.json | Common strings that shared by all MakeCode editors. Note: This file is located at the MakeCode project's root folder rather than under microbit |
target-strings.json | Strings custom to the @boardname@ editor interface |
sim-strings.json | Strings for the @boardname@ simulator |
This is an example of the editor with it's interface elements localized:
Blocks
The strings for the programming code blocks all have names in the form of 'name-strings.json' and 'name-jsdoc-strings.json'. The name part of the filename often refers to which set of blocks or the extension tht the blocks come from.
File | Description |
---|---|
core-jsdoc-strings.json | Description text for code elements of the basic and core blocks. Note: this file contains strings for the fundamental set of coding blocks and should be prioritized over the other strings files for blocks |
core-strings.json | Display text for the basic and core blocks. Note: this file contains strings for the fundamental set of coding blocks and should be prioritized over the other strings files for blocks |
radio-jsdoc-strings.json | Description text for code elements of the radio blocks |
radio-strings.json | Display text for the radio blocks |
radio-broadcast-jsdoc-strings.json | Description text for code elements of the radio broadcast blocks |
radio-broadcast-strings.json | Display text for the radio broadcast blocks |
servo-jsdoc-strings.json | Description text for code elements of the servo blocks |
servo-strings.json | Display text for the servo blocks |
bluetooth-jsdoc-strings.json | Description text for code elements of the bluetooth blocks |
bluetooth-strings.json | Display text for the bluetooth blocks |
devices-jsdoc-strings.json | Description text for code elements of the connected devices blocks |
devices-strings.json | Display text for the connected devices blocks |
flashlog-jsdoc-strings.json | Description text for code elements of the flashlog blocks |
flashlog-strings.json | Display text for the flashlog blocks |
datalogger-jsdoc-strings.json | Description text for code elements of the datalogger blocks |
datalogger-strings.json | Display text for the datalogger blocks |
jacdac-jsdoc-strings.json | Description text for code elements of the jacdac blocks |
jacdac-strings.json | Display text for the jacdac blocks |
color-jsdoc-strings.json | Description text for code elements of the color blocks |
color-strings.json | Display text for the color blocks |
microphone-jsdoc-strings.json | Description text for code elements of the microphone blocks |
microphone-strings.json | Display text for the microphone blocks |
settings-jsdoc-strings.json | Description text for code elements of the settings blocks |
settings-strings.json | Display text for the settings blocks |
Here are some examples of translated blocks:
Document pages
Document pages contain the text for any markdown page available on the MakeCode editor site. These include code block reference, projects, tutorials, how to information, etc.
File | Description |
---|---|
docs | Documentation pages for projects, courses, lessons, and code block reference |
libs | Documentation pages for code block reference and other information related to built-in extensions like servo and datalogger |
Here's an example of a translated document page for a course lesson: