Skip to content

Commit 593d61e

Browse files
Lang: Isolate translatable code comment from start code. (#287)
1 parent 3512daa commit 593d61e

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

lang/en.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,7 @@ var language = {
7979
'download_py_multiple': 'This project contains multiple files that will not be saved using this format.\nWe recommend downloading the Hex file, which contains your entire project and can be loaded back into the editor.\n\n Are you sure you want to download the {{file_name}} file only?'
8080
},
8181
'code': {
82-
'start': "# Add your Python code here. E.g.\n" +
83-
"from microbit import *\n\n\n" +
84-
"while True:\n" +
85-
" display.scroll('Hello, World!')\n" +
86-
" display.show(Image.HEART)\n" +
87-
" sleep(2000)\n"
82+
'start': "Add your Python code here. E.g."
8883
},
8984
'webusb': {
9085
'err': {

lang/es.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var language = {
7979
"download_py_multiple": "Este proyecto contiene varios archivos que no se guardarán con este formato.\nRecomendamos descargar el archivo Hex, que contiene todo el proyecto y puede volver a cargarse en el editor.\n\n¿Estas seguro que quieres descargar el {{file_name}} archivo solo?"
8080
},
8181
"code": {
82-
"start": "# Añade tu código Python aquí. Por ejemplo,\n\n \n"
82+
"start": "Añade tu código Python aquí. Por ejemplo,"
8383
},
8484
"webusb": {
8585
"err": {
@@ -162,9 +162,9 @@ var language = {
162162
"title": "Conéctea al micro:bit",
163163
"label": "Conectar"
164164
},
165-
'command-connecting': {
166-
'title': 'Connecting to the micro:bit',
167-
'label': 'Connecting'
165+
"command-connecting": {
166+
"title": "Connecting to the micro:bit",
167+
"label": "Connecting"
168168
},
169169
"command-options": {
170170
"title": "Cambie la configuración del editor",

lang/pl.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ var language = {
7979
"download_py_multiple": "Ten projekt zawiera wiele plików, które nie zostaną zapisane w tym formacie. \nZalecamy pobranie pliku Hex zawierającego cały projekt i załadowanie go z powrotem do edytora. \n\n Czy na pewno chcesz pobrać {{file_name}}?"
8080
},
8181
"code": {
82-
"start": "# Dodaj twój python kod tutaj.from microbit import *\n\n\nwhile True:\n display.scroll('Hello, World!')\n display.show(Image.HEART)\n sleep(2000)\n"
82+
"start": "Dodaj twój python kod tutaj."
8383
},
8484
"webusb": {
8585
"err": {
@@ -162,9 +162,9 @@ var language = {
162162
"title": "Podłącz do swojego micro: bit",
163163
"label": "Podłącz"
164164
},
165-
'command-connecting': {
166-
'title': 'Connecting to the micro:bit',
167-
'label': 'Connecting'
165+
"command-connecting": {
166+
"title": "Łączenie z micro:bit",
167+
"label": "Łączenie"
168168
},
169169
"command-options": {
170170
"title": "Zmień opcje editora",
@@ -205,7 +205,7 @@ var language = {
205205
"on-enter": "Na Enter:",
206206
"partial-flashing": "Quick Flash",
207207
"lang-select": "Wybierz Język:",
208-
"add-language-link": "Add a language"
208+
"add-language-link": "Dodaj język"
209209
},
210210
"text-editor": {
211211
"aria-label": "Edytor tekstu"

python-main.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,14 @@ function web_editor(config) {
560560
EDITOR.focus();
561561
} else {
562562
// If there's no name, default to something sensible.
563-
setName("microbit program");
563+
setName('microbit program');
564564
// A sane default starting point for a new script.
565-
EDITOR.setCode(config.translate.code.start);
565+
EDITOR.setCode('# ' + config.translate.code.start + '\n' +
566+
'from microbit import *\n\n\n' +
567+
'while True:\n' +
568+
' display.scroll(\'Hello, World!\')\n' +
569+
' display.show(Image.HEART)\n' +
570+
' sleep(2000)\n');
566571
}
567572
window.setTimeout(function () {
568573
// What to do if the user changes the content of the editor.

0 commit comments

Comments
 (0)