Language translations for Scratch blocks #15

Open
khanning opened this Issue May 21, 2015 · 21 comments

Projects

None yet
@khanning
Owner

If anyone is interested in translating the Scratch blocks into another language please submit a pull request or just comment on this issue with your translation.

To submit a pull request:

  1. In the arduino_extension.js file, add a new key to the 'blocks' and 'menus' objects for the desired language. The key should be the languages two or three digit ISO 639 Language Code.

  2. Translate just the bolded text in the block and menu descriptors:

    var blocks = { 
      en: [
        ['h', 'when device is connected', 'whenConnected'],
        [' ', 'connect %m.hwOut to pin %n', 'connectHW', 'led A', 3], 
        [' ', 'connect %m.hwIn to analog %n', 'connectHW', 'rotation knob', 0], 
        ['-'],
        [' ', 'set %m.leds %m.outputs', 'digitalLED', 'led A', 'on'],
        [' ', 'set %m.leds brightness to %n%', 'setLED', 'led A', 100],
        [' ', 'change %m.leds brightness by %n%', 'changeLED', 'led A', 20],
        ['-'],
        [' ', 'rotate %m.servos to %n degrees', 'rotateServo', 'servo A', 180],
        [' ', 'rotate %m.servos by %n degrees', 'changeServo', 'servo A', 20],
        ['-'],
        ['h', 'when %m.buttons is %m.btnStates', 'whenButton', 'button A', 'pressed'],
        ['b', '%m.buttons pressed?', 'isButtonPressed', 'button A'],
        ['-'],
        ['h', 'when %m.hwIn %m.ops %n%', 'whenInput', 'rotation knob', '>', 50],
        ['r', 'read %m.hwIn', 'readInput', 'rotation knob'],
        ['-'],
        [' ', 'set pin %n %m.outputs', 'digitalWrite', 1, 'on'],
        [' ', 'set pin %n to %n%', 'analogWrite', 3, 100],
        ['-'],
        ['h', 'when pin %n is %m.outputs', 'whenDigitalRead', 1, 'on'],
        ['b', 'pin %n on?', 'digitalRead', 1], 
        ['-'],
        ['h', 'when analog %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
        ['r', 'read analog %n', 'analogRead', 0], 
        ['-'],
        ['r', 'map %n from %n %n to %n %n', 'mapValues', 50, 0, 100, -240, 240]
      ],
    };
    
    var menus = {
        en: {
          buttons: ['button A', 'button B', 'button C', 'button D'],
          btnStates: ['pressed', 'released'],
          hwIn: ['rotation knob', 'light sensor', 'temperature sensor'],
          hwOut: ['led A', 'led B', 'led C', 'led D', 'button A', 'button B', 'button C', 'button D', 'servo A', 'servo B', 'servo C', 'servo D'],
          leds: ['led A', 'led B', 'led C', 'led D'],
          outputs: ['on', 'off'],
          ops: ['>', '=', '<'],
          servos: ['servo A', 'servo B', 'servo C', 'servo D']
        }
    }; 
    
  3. Submit a pull request against the master branch.

Thank you!

@christianimmler

This is a german translation:

var descriptor = {
blocks: [
['h', 'Wenn Arduino verbunden ist', 'whenConnected'],
[' ', 'Verbinde %m.hwOut mit Pin %n', 'connectHW', 'led A', 3],
[' ', 'Verbinde %m.hwIn mit Analog %n', 'connectHW', 'rotation knob', 0],
['-'],
[' ', 'Schalte %m.leds %m.outputs', 'digitalLED', 'led A', 'on'],
[' ', 'Setze %m.leds Helligkeit auf %n%', 'setLED', 'led A', 100],
[' ', 'Ändere %m.leds Helligkeit um %n%', 'changeLED', 'led A', 20],
['-'],
[' ', 'Drehe %m.servos auf %n Grad', 'rotateServo', 'servo A', 180],
[' ', 'Drehe %m.servos um %n Grad', 'changeServo', 'servo A', 20],
['-'],
['h', 'Wenn %m.buttons ist %m.btnStates', 'whenButton', 'button A', 'pressed'],
['b', '%m.buttons gedrückt?', 'isButtonPressed', 'button A'],
['-'],
['h', 'Wenn %m.hwIn %m.ops %n%', 'whenInput', 'rotation knob', '>', 50],
['r', 'Wert von %m.hwIn', 'readInput', 'rotation knob'],
['-'],
[' ', 'Schalte Pin %n %m.outputs', 'digitalWrite', 1, 'on'],
[' ', 'Setze Pin %n auf %n%', 'analogWrite', 3, 100],
['-'],
['h', 'Wenn Pin %n ist %m.outputs', 'whenDigitalRead', 1, 'on'],
['b', 'Pin %n ein?', 'digitalRead', 1],
['-'],
['h', 'Wenn Analog %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
['r', 'Wert von Analog %n', 'analogRead', 0],
['-'],
['r', 'Setze %n von %n %n auf %n %n', 'mapValues', 50, 0, 100, -240, 240]
],

@khanning
Owner

@christianimmler thank you for the translation! I forgot to include the drop down menus in my initial comment. I've updated the first comment to include all the text that needs translation if you wouldn't mind translate the menu wording as well.

@christianimmler

Ok, here the missing part of the translation:

menus: {
buttons: ['Taste A', 'Taste B', 'Taste C', 'Taste D'],
btnStates: ['gedrückt', 'losgelassen'],
hwIn: ['Drehknopf', 'Lichtsensor', 'Temperatursensor'],
hwOut: ['LED A', 'LED B', 'LED C', 'LED D', 'Taste A', 'Taste B', 'Taste C', 'Taste D', 'Servo A', 'Servo B', 'Servo C', 'Servo D'],
leds: ['LED A', 'LED B', 'LED C', 'LED D'],
outputs: ['Ein', 'Aus'],
ops: ['>', '=', '<'],
servos: ['Servo A', 'Servo B', 'Servo C', 'Servo D']
},

@khanning khanning added a commit that referenced this issue May 26, 2015
@khanning Add option to load alternate language.
Check for a GET parameter, "lang", which specifies an ISO 639 Language
Code.

Submit language translations on issue #15
4d3aea4
@khanning khanning added a commit that referenced this issue May 26, 2015
@khanning Add option to load alternate language.
Check for a GET parameter, "lang", which specifies an ISO 639 Language
Code.

Submit language translations on issue #15
1aad3c5
@khanning
Owner

@christianimmler thank you for the translation! You can now load the blocks in German by adding lang=de to the ScratchX project URL.

e.g.
http://scratchx.org/?url=http://khanning.github.io/scratch-arduino-extension/arduino_extension.js&lang=de

@consolacion

Dutch!. Mind you though that the correctness depends on what the actual sentence in english is supposed to look like. It is hard to properly translate a few words here and there if one doesn't know what the full sentence would be or what the context is.

var blocks = {
en: [
['h', 'als het apparaat verbonden is', 'whenConnected'],
[' ', 'verbindt %m.hwOut met pin %n', 'connectHW', 'led A', 3],
[' ', 'verbindt %m.hwIn met analoog %n', 'connectHW', 'draaiknop', 0],
['-'],
[' ', 'schakel %m.leds %m.outputs', 'digitalLED', 'led A', 'on'],
[' ', 'schakel %m.leds helderheid tot %n%', 'setLED', 'led A', 100],
[' ', 'verander %m.leds helderheid met %n%', 'changeLED', 'led A', 20],
['-'],
[' ', 'draai %m.servos tot %n graden', 'rotateServo', 'servo A', 180],
[' ', 'draai %m.servos met %n graden', 'changeServo', 'servo A', 20],
['-'],
['h', 'wanneer %m.buttons is %m.btnStates', 'whenButton', 'knop A', 'in gedrukt'],
['b', '%m.knoppen in gedrukt?', 'isButtonPressed', 'knoppen A'],
['-'],
['h', 'wanneer%m.hwIn %m.ops %n%', 'whenInput', 'draaiknop', '>', 50],
['r', 'read %m.hwIn', 'readInput', 'draaiknop'],
['-'],
[' ', 'schakel pin %n %m.outputs', 'digitalWrite', 1, 'on'],
[' ', 'schakel pin %n tot %n%', 'analogWrite', 3, 100],
['-'],
['h', 'wanneer pin %n is %m.outputs', 'whenDigitalRead', 1, 'on'],
['b', 'pin %n aan?', 'digitalRead', 1],
['-'],
['h', 'wanneer analoge %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
['r', 'lees analoge %n', 'analogRead', 0],
['-'],
['r', 'zet %n van %n %n tot %n %n', 'mapValues', 50, 0, 100, -240, 240]
],
};

var menus = {
en: {
buttons: ['knop A', 'knop B', 'knop C', 'knop D'],
btnStates: ['ingedrukt', 'losgelaten'],
hwIn: ['draaiknop', 'licht sensor', 'temperatuur sensor'],
hwOut: ['led A', 'led B', 'led C', 'led D', 'knop A', 'knop B', 'knop C', 'knop D', 'servo A', 'servo B', 'servo C', 'servo D'],
leds: ['led A', 'led B', 'led C', 'led D'],
outputs: ['aan', 'uit'],
ops: ['>', '=', '<'],
servos: ['servo A', 'servo B', 'servo C', 'servo D']
}
};

@khanning
Owner

@consolacion thank you for the translation! You can load the Dutch blocks by adding lang=nl to the ScratchX URL.

e.g.
http://scratchx.org/?url=http://khanning.github.io/scratch-arduino-extension/arduino_extension.js&lang=nl

If any of the wording doesn't seem right once you start using the extension please feel free to submit a correction!

@wilsonjuniorr

Portuguese
var blocks = {
pt: [
['h', 'Quando dispositivo estiver conectado', 'whenConnected'],
[' ', 'conectar%m.hwOut para pino %n', 'connectHW', 'led A', 3],
[' ', 'conectar %m.hwIn para analogico %n', 'connectHW', 'potenciometro', 0],
['-'],
[' ', 'estado %m.leds %m.outputs', 'digitalLED', 'led A', 'ligado'],
[' ', 'estado %m.leds brilho to %n%', 'setLED', 'led A', 100],
[' ', 'mudar %m.leds brilho em %n%', 'changeLED', 'led A', 20],
['-'],
[' ', 'girar %m.servos para %n graus', 'rotateServo', 'servo A', 180],
[' ', 'girar %m.servos em %n graus', 'changeServo', 'servo A', 20],
['-'],
['h', 'quando %m.buttons is %m.btnStates', 'whenButton', 'botao A', 'pressionado'],
['b', '%m.buttons pressionado?', 'isButtonPressed', 'botao A'],
['-'],
['h', 'quando %m.hwIn %m.ops %n%', 'whenInput', 'potenciometro', '>', 50],
['r', 'read %m.hwIn', 'readInput', 'potenciometro'],
['-'],
[' ', 'estado digital pino %n %m.outputs', 'digitalWrite', 1, 'ligado'],
[' ', 'estado analogico pino %n to %n%', 'analogWrite', 3, 100],
['-'],
['h', 'quando pino %n is %m.outputs', 'whenDigitalRead', 1, 'ligado'],
['b', 'pino %n ligado?', 'digitalRead', 1],
['-'],
['h', 'quando valor analogico %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
['r', 'ler valor analogico %n', 'analogRead', 0],
['-'],
['r', 'mapear %n from %n %n to %n %n', 'mapValues', 50, 0, 100, -240, 240]
],
};

var menus = {
pt: {
buttons: ['botao A', 'botao B', 'botao C', 'botao D'],
btnStates: ['pressionado', 'solto'],
hwIn: ['potenciometro', 'sensor de luz', 'sensor de temperatura'],
hwOut: ['led A', 'led B', 'led C', 'led D', 'botao A', 'botao B', 'botao C', 'botao D', 'servo A', 'servo B', 'servo C', 'servo D'],
leds: ['led A', 'led B', 'led C', 'led D'],
outputs: ['ligado', 'desligado'],
ops: ['>', '=', '<'],
servos: ['servo A', 'servo B', 'servo C', 'servo D']
}
};

@tskauli
tskauli commented Jul 6, 2015

Hello, I am the maintainer of the Norwegian (Bokmal) translation of Scratch. I am very happy and grateful for the Arduino extension and expect it to be widely used. Here is a Norwegian translation:

var blocks = {
nb: [
['h', 'når enheten tilkobles', 'whenConnected'],
[' ', 'koble %m.hwOut til digital %n', 'connectHW', 'LED A', 3],
[' ', 'koble %m.hwIn til analog %n', 'connectHW', 'dreieknapp', 0],
['-'],
[' ', 'sett %m.leds %m.outputs', 'digitalLED', 'LED A', 'på'],
[' ', 'sett %m.leds styrke til %n%', 'setLED', 'LED A', 100],
[' ', 'endre %m.leds styrke med %n%', 'changeLED', 'LED A', 20],
['-'],
[' ', 'rotér %m.servos til %n grader', 'rotateServo', 'servo A', 180],
[' ', 'rotér %m.servos med %n grader', 'changeServo', 'servo A', 20],
['-'],
['h', 'når %m.buttons %m.btnStates', 'whenButton', 'knapp A', 'trykkes'],
['b', '%m.buttons trykket?', 'isButtonPressed', 'knapp A'],
['-'],
['h', 'når %m.hwIn %m.ops %n%', 'whenInput', 'dreieknapp', '>', 50],
['r', '%m.hwIn verdi', 'readInput', 'dreieknapp'],
['-'],
[' ', 'sett digital %n %m.outputs', 'digitalWrite', 1, 'på'],
[' ', 'set utgang %n til %n%', 'analogWrite', 3, 100],
['-'],
['h', 'når digital %n er %m.outputs', 'whenDigitalRead', 1, 'på'],
['b', 'digital %n på?', 'digitalRead', 1],
['-'],
['h', 'når analog %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
['r', 'analog %n verdi', 'analogRead', 0],
['-'],
['r', 'skalér %n fra %n %n til %n %n', 'mapValues', 50, 0, 100, -240, 240]
],
};

var menus = {
nb: {
buttons: ['knapp A', 'knapp B', 'knapp C', 'knapp D'],
btnStates: ['trykkes', 'slippes'],
hwIn: ['dreieknapp', 'lyssensor', 'temperatursensor'],
hwOut: ['LED A', 'LED B', 'LED C', 'LED D', 'knapp A', 'knapp B', 'knapp C', 'knapp D', 'servo A', 'servo B', 'servo C', 'servo D'],
leds: ['LED A', 'LED B', 'LED C', 'LED D'],
outputs: ['på', 'av'],
ops: ['>', '=', '<'],
servos: ['servo A', 'servo B', 'servo C', 'servo D']
}
};

@tskauli
tskauli commented Jul 6, 2015

While I am at it, I can also offer a couple of comments to the English blocks:

  • If we envisage a reader completely uninitiated to electronics then the meaning of "pin" may not be immediately obvious. A possible alternative is "digital 1" for digital I/O, "analog 1" for analog input and "output 1" for PWM output. It may or may not be better in English, but I went for this solution in the Norwegian translation here to sidestep the tricky translation of "pin".
  • It may be an improvement to change the value block "read rotation knob" into "rotation knob value". Likewise, "read analog 0" could be changed into "analog 0 value".

Other than that, I think the Arduino blocks pallette is good, and I particularly like the very concrete "connect led A to pin 3" as an alternative to the more generic "set pin 3 on".

Thanks again for the work on an Arduino extension. I look forward to seeing the released version in Scratch!

Best regards,

Torbjorn

@khanning
Owner

@wilsonjuniorr thank you for the Portuguese translation! It's been added to the extension.

@tskauli the Norwegian translation has been added. Thank you!
I agree with your block suggestions. I think replacing "pin" with "digital" might simply things a little bit. The "rotation knob value" wording sounds better also.

if (rotation knob value) > 75
sounds better than
if (read rotation knob) > 75

Thanks for the suggestions!

@damellis what do you think about these changes to the English blocks?

@damellis
Collaborator

Personally, I think it would be confusing to say "digital 1" instead of "pin 1". I know that "pin" is a confusing word, and maybe we can find a better one, but I think it's good to use a word that refers to the thing we're talking about (i.e. a noun like "pin") rather than a word that describes the type of that thing (i.e. an adjective like "digital"). I'm open to alternatives like "connection" or "connector" or "input" or "output" but I'm not sure that any of them are really right. What do you think?

(I'm less concerned about the difference between "rotation knob value" and "read rotation knob". Probably there it's best to use whatever seems closest to other Scratch blocks.)

@khanning
Owner

@damellis makes a good point about noun vs. adjective. I think I still prefer "pin" to some of the other noun alternatives. Perhaps this will just have to be a learning opportunity about the term "pin". We can add a description to the documentation that explains what "pin" is referring to.

Currently, the analog blocks are using an adjective "analog", while the digital blocks are using a noun "pin". Should we change this wording to use an adjective and a noun (analog pin)?
screenshot

@ktprezes

Hi everybody :)

this is polish translation:

var blocks = {
pl: [
['h', 'kiedy urządzenie jest podłączone', 'whenConnected'],
[' ', 'podłącz %m.hwOut do pinu %n', 'connectHW', 'led A', 3],
[' ', 'podłącz %m.hwIn do we analogowego %n', 'connectHW', 'pokrętło', 0],
['-'],
[' ', 'ustaw %m.leds na %m.outputs', 'digitalLED', 'led A', 'włączony'],
[' ', 'ustaw jasność %m.leds na %n%', 'setLED', 'led A', 100],
[' ', 'zmień jasność %m.leds o %n%', 'changeLED', 'led A', 20],
['-'],
[' ', 'obróć %m.servos w położenie %n degrees', 'rotateServo', 'serwo A', 180],
[' ', 'obróć %m.servos o %n degrees', 'changeServo', 'serwo A', 20],
['-'],
['h', 'kiedy %m.buttons jest %m.btnStates', 'whenButton', 'przycisk A', 'wciśnięty'],
['b', 'czy %m.buttons jest wciśnięty?', 'isButtonPressed', 'przycisk A'],
['-'],
['h', 'kiedy %m.hwIn jest w położeniu %m.ops %n%', 'whenInput', 'pokrętło', '>', 50],
['r', 'odczytaj ustawienie %m.hwIn', 'readInput', 'pokrętła'],
['-'],
[' ', 'ustaw pin %n jako %m.outputs', 'digitalWrite', 1, 'włączony'],
[' ', 'ustaw pin %n na %n%', 'analogWrite', 3, 100],
['-'],
['h', 'kiedy pin %n jest %m.outputs', 'whenDigitalRead', 1, 'włączony'],
['b', 'czy pin %n jest włączony?', 'digitalRead', 1],
['-'],
['h', 'kiedy we analogowe %n jest w położeniu %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
['r', 'odczytaj we analogowe %n', 'analogRead', 0],
['-'],
['r', 'przekształć wartość %n z zakresu %n %n na %n %n', 'mapValues', 50, 0, 100, -240, 240]
],
};

var menus = {
pl: {
buttons: ['przycisk A', 'przycisk B', 'przycisk C', 'przycisk D'],
btnStates: ['wciśnięty', 'zwolniony'],
hwIn: ['pokrętło', 'czujnik światła', 'czujnik temperatury'],
hwOut: ['led A', 'led B', 'led C', 'led D', 'przycisk A', 'przycisk B', 'przycisk C', 'przycisk D', 'serwo A', 'serwo B', 'serwo C', 'serwo D'],
leds: ['led A', 'led B', 'led C', 'led D'],
outputs: ['włączony', 'wyłączony'],
ops: ['>', '=', '<'],
servos: ['serwo A', 'serwo B', 'serwo C', 'serwo D']
}
};

@Anderson69s

Here is the French Translation as promise on Twitter 🎉

var blocks = { 
  fr: [
    ['h', 'Quand l'appareil est connecté', 'whenConnected'],
    [' ', 'Connecté %m.hwOut au pin %n', 'connectHW', 'LED A', 3], 
    [' ', 'Connecté %m.hwIn au pin analogue %n', 'connectHW', 'Potentiomètre', 0], 
    ['-'],
    [' ', 'Régler %m.la LED %m.en Sortie', 'digitalLED', 'LED A', 'on'],
    [' ', 'Régler %m.la Luminosité de la LED à %n%', 'setLED', 'LED A', 100],
    [' ', 'Changer %m.la Luminosité de la LED de %n%', 'changeLED', 'LED A', 20],
    ['-'],
    [' ', 'Tourner %m.le Servo Moteur à %n degrés', 'rotateServo', 'Servo Moteur A', 180],
    [' ', 'Tourner %m.le Servo Moteur de %n degrés', 'changeServo', 'Servo Moteur A', 20],
    ['-'],
    ['h', 'Quand %m.le Bouton est %m.btnStates', 'whenButton', 'Bouton A', 'Appuyé'],
    ['b', 'Le %m.Bouton est-il pressé?', 'isButtonPressed', 'Bouton A'],
    ['-'],
    ['h', 'Quand %m.hwIn %m.ops %n%', 'whenInput', 'Potentiomètre', '>', 50],
    ['r', 'Lire %m.hwIn', 'readInput', 'Potentiomètre'],
    ['-'],
    [' ', 'Régler le Pin %n %m.en Sortie', 'digitalWrite', 1, 'On'],
    [' ', 'Régler le Pin %n à %n%', 'analogWrite', 3, 100],
    ['-'],
    ['h', 'Quand le Pin %n est %m.en Sortie', 'whenDigitalRead', 1, 'On'],
    ['b', 'Le Pin %n est-il démarré?', 'digitalRead', 1], 
    ['-'],
    ['h', 'Quand le Pin analogique est %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
    ['r', 'Lire le Pin Analogique %n', 'analogRead', 0], 
    ['-'],
    ['r', 'Mapper %n de %n %n à %n %n', 'mapValues', 50, 0, 100, -240, 240]
  ],
};
var menus = {
    fr: {
      buttons: ['Bouton A', 'Bouton B', 'Bouton C', 'Bouton D'],
      btnStates: ['Appuyé', 'Relâché'],
      hwIn: ['Potentiomètre', 'Capteur de Lumière', 'Capteur de Temperature'],
      hwOut: ['LED A', 'LED B', 'LED C', 'LED D', 'Bouton A', 'Bouton B', 'Bouton C', 'Bouton D', 'Servo Moteur A', 'Servo Moteur B', 'Servo Moteur C', 'Servo Moteur D'],
      leds: ['LED A', 'LED B', 'LED C', 'LED D'],
      outputs: ['ON', 'OFF'],
      ops: ['>', '=', '<'],
      servos: ['Servo Moteur A', 'Servo Moteur B', 'Servo Moteur C', 'Servo Moteur D']
    }
}; 
@hackermesh

Here is the spanish translation:

var blocks = { 
  es: [
    ['h', 'al conectar el dispositivo', 'whenConnected'],
    [' ', 'conectar %m.hwOut al pin %n', 'connectHW', 'led A', 3], 
    [' ', 'conectar %m.hwIn al pin analógico %n', 'connectHW', 'potenciómetro', 0], 
    ['-'],
    [' ', 'fijar estado de %m.leds a %m.outputs', 'digitalLED', 'led A', 'on'],
    [' ', 'fijar brillo de %m.leds a %n%', 'setLED', 'led A', 100],
    [' ', 'cambiar brillo de %m.leds por %n%', 'changeLED', 'led A', 20],
    ['-'],
    [' ', 'apuntar %m.servos en dirección %n grados', 'rotateServo', 'servo A', 180],
    [' ', 'girar %m.servos %n grados', 'changeServo', 'servo A', 20],
    ['-'],
    ['h', 'cuando el %m.buttons esté %m.btnStates', 'whenButton', 'botón A', 'presionado'],
    ['b', '¿%m.buttons presionado?', 'isButtonPressed', 'botón A'],
    ['-'],
    ['h', 'cuando %m.hwIn %m.ops %n%', 'whenInput', 'potenciómetro', '>', 50],
    ['r', 'leer %m.hwIn', 'readInput', 'potenciómetro'],
    ['-'],
    [' ', 'fijar estado de pin %n a %m.outputs', 'digitalWrite', 1, 'on'],
    [' ', 'fijar pin analógico %n al %n%', 'analogWrite', 3, 100],
    ['-'],
    ['h', 'cuando el pin %n esté %m.outputs', 'whenDigitalRead', 1, 'on'],
    ['b', '¿pin %n on?', 'digitalRead', 1], 
    ['-'],
    ['h', 'cuando pin analógico %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
    ['r', 'leer analógico %n', 'analogRead', 0], 
    ['-'],
    ['r', 'convertir %n de %n %n a %n %n', 'mapValues', 50, 0, 100, -240, 240]
  ],
};

var menus = {
    es: {
      buttons: ['botón A', 'botón B', 'botón C', 'botón D'],
      btnStates: ['pulsado', 'liberado'],
      hwIn: ['potenciómetro', 'sensor de luz', 'sensor de temperatura'],
      hwOut: ['led A', 'led B', 'led C', 'led D', 'botón A', 'botón B', 'botón C', 'botón D', 'servo A', 'servo B', 'servo C', 'servo D'],
      leds: ['led A', 'led B', 'led C', 'led D'],
      outputs: ['on', 'off'],
      ops: ['>', '=', '<'],
      servos: ['servo A', 'servo B', 'servo C', 'servo D']
    }
}; 
@khanning
Owner

@hackermesh Thank you for the translation!

@Anderson69s

You're welcome!!!!

@frankshieh

Here is Traditional Chinese , Please note there are two types of Chinese, Traditional and Simplified which share the same code zh. But what's listed below is Traditional Chinese:
var blocks = {
zh: [
['h', '當裝置連接時', 'whenConnected'],
[' ', '連接 %m.hwOut 到腳位 %n', 'connectHW', '發光二極體 A', 3],
[' ', '連接 %m.hwIn 到類比 %n', 'connectHW', '旋鈕', 0],
['-'],
[' ', '設定 %m.leds %m.outputs', 'digitalLED', '發光二極體 A', 'on'],
[' ', '設定 %m.leds 亮度為 %n%', 'setLED', '發光二極體 A', 100],
[' ', '改變 %m.leds 亮度 %n%', 'changeLED', '發光二極體 A', 20],
['-'],
[' ', '旋轉 %m.servos 到 %n 度', 'rotateServo', '伺服馬達 A', 180],
[' ', '旋轉 %m.servos %n 度', 'changeServo', '伺服馬達 A', 20],
['-'],
['h', '當 %m.buttons 為 %m.btnStates', 'whenButton', '按鈕 A', '按下'],
['b', '%m.buttons 按下?', 'isButtonPressed', '按鈕 A'],
['-'],
['h', '當 %m.hwIn %m.ops %n%', 'whenInput', '旋鈕', '>', 50],
['r', '讀取 %m.hwIn', 'readInput', '旋鈕'],
['-'],
[' ', '設定腳位 %n %m.outputs', 'digitalWrite', 1, '開'],
[' ', '設定腳位 %n 為 %n%', 'analogWrite', 3, 100],
['-'],
['h', '當腳位 %n 為 %m.outputs', 'whenDigitalRead', 1, '開'],
['b', '腳位 %n 開?', 'digitalRead', 1],
['-'],
['h', '當類比 %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
['r', '讀取類比 %n', 'analogRead', 0],
['-'],
['r', '對應 %n 由 %n %n 為 %n %n', 'mapValues', 50, 0, 100, -240, 240]
],
};

var menus = {
zh: {
buttons: ['按鈕 A', '按鈕 B', '按鈕 C', '按鈕 D'],
btnStates: ['按下', '放開'],
hwIn: ['旋鈕', '光感應器', '溫度感應器'],
hwOut: ['發光二極體 A', '發光二極體 B', '發光二極體 C', '發光二極體 D', '按鈕 A', '按鈕 B', '按鈕 C', '按鈕 D', '伺服馬達 A', '伺服馬達 B', '伺服馬達 C', '伺服馬達 D'],
leds: ['發光二極體 A', '發光二極體 B', '發光二極體 C', '發光二極體 D'],
outputs: ['開', '關'],
ops: ['>', '=', '<'],
servos: ['伺服馬達 A', '伺服馬達 B', '伺服馬達 C', '伺服馬達 D']
}
};

@khanning
Owner
khanning commented Feb 2, 2016

Korean (ko), Polish (pl), French (fr), and Traditional Chinese (zh) is now supported.

Thank you @neosarchizo, @ktprezes, @Anderson69s, and @frankshieh!

@zharov
zharov commented Apr 6, 2016

Please add Russian translations. I have tried to test them in my fork, they have worked first time, then stopped to work for some unknown reason - but the translations themselves are correct.
var blocks={
ru: [
['h', 'когда устройство подключено', 'whenConnected'],
[' ', 'подключить %m.hwOut к выводу %n', 'connectHW', 'светодиод A', 3],
[' ', 'подключить %m.hwIn к ан. входу %n', 'connectHW', 'потенциометр', 0],
['-'],
[' ', 'установить %m.leds в %m.outputs', 'digitalLED', 'светодиод A', 'включен'],
[' ', 'установить яркость %m.leds в %n%', 'setLED', 'светодиод A', 100],
[' ', 'изменить яркость %m.leds на %n%', 'changeLED', 'светодиод A', 20],
['-'],
[' ', 'установить %m.servos в позицию %n °', 'rotateServo', 'серво A', 180],
[' ', 'повернуть %m.servos на %n °', 'changeServo', 'серво A', 20],
['-'],
['h', 'когда %m.buttons %m.btnStates', 'whenButton', 'кнопка A', 'нажата'],
['b', '%m.buttons нажата?', 'isButtonPressed', 'кнопка A'],
['-'],
['h', 'когда %m.hwIn %m.ops %n%', 'whenInput', 'потенциометр', '>', 50],
['r', 'значение %m.hwIn', 'readInput', 'потенциометр'],
['-'],
[' ', 'установить выход %n в %m.outputs', 'digitalWrite', 1, 'включен'],
[' ', 'установить ан. выход %n в %n%', 'analogWrite', 3, 100],
['-'],
['h', 'когда вход %n %m.outputs', 'whenDigitalRead', 1, 'включен'],
['b', 'вход %n вкл?', 'digitalRead', 1],
['-'],
['h', 'когда ан. вход %n %m.ops %n%', 'whenAnalogRead', 1, '>', 50],
['r', 'значение ан. входа %n', 'analogRead', 0],
['-'],
['r', 'отобразить %n из %n %n в %n %n', 'mapValues', 50, 0, 100, -240, 240]
]
};

var menus = {
ru: {
buttons: ['кнопка A', 'кнопка B', 'кнопка C', 'кнопка D'],
btnStates: ['нажата', 'отпущена'],
hwIn: ['потенциометр', 'датчик света', 'датчик температуры'],
hwOut: ['светодиод A', 'светодиод B', 'светодиод C', 'светодиод D', 'кнопка A', 'кнопка B', 'кнопка C', 'кнопка D', 'серво A', 'серво B', 'серво C', 'серво D'],
leds: ['светодиод A', 'светодиод B', 'светодиод C', 'светодиод D'],
outputs: ['включен', 'выключен'],
ops: ['>', '=', '<'],
servos: ['серво A', 'серво B', 'серво C', 'серво D']
}
};

@aytac
aytac commented Sep 15, 2016

Please add Turkish translate version of the blocks.

Thanks

tr: [
['h', 'Cihaz bağlandığında', 'whenConnected'],
[' ', '%m.hwOut yı pin %n e bağla', 'connectHW', 'led A', 3],
[' ', '%m.hwIn yi analog %n e bağla', 'connectHW', 'rotation knob', 0],
['-'],
[' ', '%m.leds yı %m.outputs olarak ayarla', 'digitalLED', 'led A', 'on'],
[' ', '%m.leds nın parlaklığını % %n olarak ayarla', 'setLED', 'led A', 100],
[' ', '%m.leds nın parlaklığını % %n değiştir', 'changeLED', 'led A', 20],
['-'],
[' ', '%m.servos yu %n dereceye çevir', 'rotateServo', 'servo A', 180],
[' ', '%m.servos yu %n derece değiştir', 'changeServo', 'servo A', 20],
['-'],
['h', '%m.buttons nın durumu %m.btnStates olduğunda', 'whenButton', 'button A', 'pressed'],
['b', '%m.buttons basılı ise', 'isButtonPressed', 'button A'],
['-'],
['h', '%m.hwIn %m.ops %n% olduğunda', 'whenInput', 'rotation knob', '>', 50],
['r', '%m.hwIn yı oku', 'readInput', 'rotation knob'],
['-'],
[' ', 'Pin %n nın değerini %m.outputs yap', 'digitalWrite', 1, 'on'],
[' ', 'Pin %n nın değerini %n% yap', 'analogWrite', 3, 100],
['-'],
['h', 'Pin %n in durumu %m.outputs olduğunda', 'whenDigitalRead', 1, 'on'],
['b', 'Pin %n in durumu açık ise', 'digitalRead', 1],
['-'],
['h', 'Analog %n in durumu %m.ops %n% olduğunda', 'whenAnalogRead', 1, '>', 50],
['r', 'analog %n i oku', 'analogRead', 0],
['-'],
['r', '%n değerini %n ile %n aralığından %n ile %n aralığına oranla', 'mapValues', 50, 0, 100, -240, 240]
],


tr: {
buttons: ['tuş A', 'tuş B', 'tuş C', 'tuş D'],
btnStates: ['basıldı', 'bırakıldı'],
hwIn: ['döndürme düğmesi', 'ışık sensörü', 'sıcaklık sensörü'],
hwOut: ['led A', 'led B', 'led C', 'led D', 'tuş A', 'tuş B', 'tuş C', 'tuş D', 'servo A', 'servo B', 'servo C', 'servo D'],
leds: ['led A', 'led B', 'led C', 'led D'],
outputs: ['açık', 'kapalı'],
ops: ['>', '=', '<'],
servos: ['servo A', 'servo B', 'servo C', 'servo D']
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment