Skip to content

Commit

Permalink
Merge pull request #343 from apple502j/add-blocks
Browse files Browse the repository at this point in the history
Add Scratch 3.0 extension support
  • Loading branch information
tjvr authored Jun 5, 2021
2 parents 99dada7 + 7d0b9d4 commit 042ad03
Show file tree
Hide file tree
Showing 122 changed files with 5,679 additions and 551 deletions.
7 changes: 7 additions & 0 deletions locales-src/build-locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ for (let code in localeNames) {
}

const soundEffects = ["SOUND_EFFECTS_PITCH", "SOUND_EFFECTS_PAN"]
const microbitWhen = [
"microbit.gesturesMenu.moved",
"microbit.gesturesMenu.shaken",
"microbit.gesturesMenu.jumped",
]
const osis = ["CONTROL_STOP_OTHER"]
const scratchSpecs = scratchCommands.map(block => block.spec)

Expand Down Expand Up @@ -137,6 +142,7 @@ const buildLocale = (code, rawLocale) => {
dropdowns: {},
ignorelt: [],
soundEffects: listFor(soundEffects),
microbitWhen: listFor(microbitWhen),
osis: listFor(osis),
definePrefix: /(.*)%1/
.exec(procDef)[1]
Expand All @@ -159,6 +165,7 @@ const buildLocale = (code, rawLocale) => {
if (!command.id) continue
if (/^sb2:/.test(command.id)) continue
if (/^scratchblocks:/.test(command.id)) continue
if (locale.commands.hasOwnProperty(command.spec)) continue
const result = translateKey(rawLocale, command.id)
if (!result) continue
locale.commands[command.spec] = result
Expand Down
4 changes: 2 additions & 2 deletions locales-src/extra_aliases.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ module.exports = {
einde: "end",
},

zh_CN: {
"zh-cn": {
// Chinese (simplified)
"左转 %1 度": "turn @turnLeft %1 degrees",
"右转 %1 度": "turn @turnRight %1 degrees",
点击绿旗时: "when @greenFlag clicked",
结束: "end",
},

zh_TW: {
"zh-tw": {
// Chinese (traditional)
"左轉 %1 度": "turn @turnLeft %1 degrees",
"右轉 %1 度": "turn @turnRight %1 degrees",
Expand Down
52 changes: 47 additions & 5 deletions locales/ab.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"next backdrop": "анаҩстәи аҿаԥшыра",
"switch backdrop to %1": "иԥсахтәуп аҿаԥшыра %1 ала",
"switch backdrop to %1 and wait": "иԥсахтәуп аҿаԥшыра %1 ала нас иԥштәуп",
"change %1 effect by %2": "иԥсахтәуп %1 аеффект %2 ала",
"set %1 effect to %2": "иқәыргылатәуп аеффект %1 %2 аҟны",
"change %1 effect by %2": "иԥсахтәуп аеффект %1 %2 ала",
"set %1 effect to %2": "иқәыргылатәуп аеффект %1 %2",
"clear graphic effects": "иқәгатәуп аграфикатә еффектқәа",
"change size by %1": "иԥсахтәуп ашәагаа %1 ала",
"set size to %1%": "иқәыргылатәуп ашәагаа %1 %",
Expand Down Expand Up @@ -116,7 +116,7 @@
"loudness": "абжьы адура",
"video %1 on %2": "авидео %1 %2 аҟны",
"timer": "атаимер",
"%1 of %2": "%1 %2",
"%1 of %2": "%1 %2 аҟынтәи",
"current %1": "уажәтәи %1",
"days since 2000": "амшқәа 2000 ш. инаркны",
"username": "ахархәаҩ ихьӡ",
Expand All @@ -133,7 +133,7 @@
"not %1": "%1 акәӡам",
"join %1 %2": "еиԥшьтәуп %1 %2",
"letter %1 of %2": "асимвол %1 %2 аҟны",
"length of %1": "асиа %1 аура",
"length of %1": "%1 аура",
"%1 mod %2": "%1 mod %2",
"round %1": "ихаргьежьтәуп %1",
"%1 contains %2?": "%1 иаҵанакуама %2?",
Expand All @@ -149,17 +149,59 @@
"set light color to %1": "иқәыргылатәуп арлашага аԥштәы %1",
"play note %1 for %2 seconds": "анота %1 ихәмартәуп %2 сек",
"when tilted %1": "%1 анырнаау",
"tilted %1?": "ирнааума %1?",
"tilt angle %1": "арнаара акәакь %1",
"else": "акәымзар",
"user id": "Ахархәаҩ ID",
"loud?": "абжьы дуума?"
"loud?": "абжьы дуума?",
"speak %1": "иҳәатәуп %1",
"set voice to %1": "иқәыргылатәуп абжьы %1",
"set language to %1": "иқәыргылатәуп абызшәа %1",
"translate %1 to %2": "еиҭагатәуп %1 %2 ахь",
"language": "абызшәа",
"when %1 pressed in order": "еишьҭаргыланы %1 ақәыӷәӷәараан",
"turn motor %1 for %2 seconds": "иаҿактәуп амотор %1 %2 секундк",
"turn motor %1 for %2 rotations": "иаҿактәуп амотор %1 %2-нтә аргьежьра ала",
"turn motor %1 on": "амотор %1 аҿактәуп",
"turn motor %1 off": "амотор %1 аҿыхтәуп",
"set motor %1 speed to %2%": "иқәыргылатәуп %1 аласра %2 % аҟны",
"set motor %1 direction %2": "иқәыргылатәуп амотор %1 ахырхарҭа %2 аҟны",
"motor %1 position": "амотор %1 апозициа",
"when %1 brick seen": "ақьырмыт %1 анаҳбо",
"seeing %1 brick?": "иаҳбома ақьырмыт %1?",
"motor %1 turn this way for %2 seconds": "амотор %1 ыргьежьтәуп арахь %2 сек",
"motor %1 turn that way for %2 seconds": "амотор %1 ыргьежьтәуп анахь %2 сек",
"motor %1 set power %2%": "амотор %1 иқәыргылатәуп амчра %2 %",
"when button %1 pressed": "акнопка %1 ианақәыӷәӷәоу",
"when distance < %1": "ирыбжьоу < %1 анакәу",
"when brightness < %1": "ажжара < %1 анакәу",
"button %1 pressed?": "акнопка %1 иақәыӷәӷәоума?",
"brightness": "ажжара",
"beep note %1 for %2 secs": "анота %1 ихәмартәуп %2 сек",
"when %1": "%1 анакәу",
"when force sensor %1": "амч ҳзырбо асенсор %1 анакәу",
"force": "амч",
"falling?": "икаҳауама?",
"spin speed %1": "аргьежьра аласра %1",
"acceleration %1": "аццакра %1",
"when %1 button pressed": "акнопка %1 ианақәыӷәӷәоу",
"%1 button pressed?": "акнопка %1 иақәыӷәӷәоума?",
"display %1": "иаарԥштәуп %1",
"display text %1": "иаарԥштәуп атекст %1",
"clear display": "ирыцқьатәуп аекран",
"when pin %1 connected": "апин %1 анаҿаку"
},
"dropdowns": {},
"ignorelt": [],
"soundEffects": [
"атемп",
"абжьгара армарахь/арӷьарахь"
],
"microbitWhen": [
"инаскьагоуп",
"идырҵысит",
"иԥеит"
],
"osis": [
"анагӡаҩ егьырҭ ипрограммақәа"
],
Expand Down
242 changes: 242 additions & 0 deletions locales/af.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
{
"commands": {
"move %1 steps": "beweeg %1 tree",
"turn @turnRight %1 degrees": "draai @turnRight %1 grade",
"turn @turnLeft %1 degrees": "draai @turnLeft %1 grade",
"point in direction %1": "wys na rigting %1",
"point towards %1": "wys na %1",
"go to x:%1 y:%2": "gaan na x: %1 y: %2",
"go to %1": "gaan na %1",
"glide %1 secs to x:%2 y:%3": "gly %1 sekondes na x: %2 y: %3",
"glide %1 secs to %2": "gly %1 sekondes na %2",
"change x by %1": "verander x met %1",
"set x to %1": "stel x op %1",
"change y by %1": "verander y met %1",
"set y to %1": "stel y op %1",
"set rotation style %1": "stel rotasiestyl %1",
"say %1 for %2 seconds": "sê %1 vir %2 sekondes",
"say %1": "sê %1",
"think %1 for %2 seconds": "dink %1 vir %2 sekondes",
"think %1": "dink %1",
"show": "vertoon",
"hide": "verberg",
"switch costume to %1": "ruil kostuum na %1",
"next costume": "volgende kostuum",
"next backdrop": "volgende agtergrond",
"switch backdrop to %1": "ruil agtergrond na %1",
"switch backdrop to %1 and wait": "ruil agtergrond na %1 en wag",
"change %1 effect by %2": "verander %1 effek met %2",
"set %1 effect to %2": "stel %1 effek op %2",
"clear graphic effects": "verwyder grafiese effekte",
"change size by %1": "verander grootte met %1",
"set size to %1%": "stel grootte op %1 %",
"go to %1 layer": "gaan na %1 laag",
"go %1 %2 layers": "gaan %1 %2 lae",
"start sound %1": "begin klank %1",
"clear sound effects": "verwyder klank effekte",
"play sound %1 until done": "speel klank %1 tot voltooi",
"stop all sounds": "stop alle klanke",
"play drum %1 for %2 beats": "speel drom %1 vir %2 slae",
"rest for %1 beats": "rus vir %1 slae",
"play note %1 for %2 beats": "speel noot %1 vir %2 slae",
"set instrument to %1": "stel instrument op %1",
"change volume by %1": "verander volume met %1",
"set volume to %1%": "stel volume op %1%",
"change tempo by %1": "verander tempo met %1",
"set tempo to %1": "stel tempo op %1",
"erase all": "vee alles uit",
"stamp": "stempel",
"pen down": "sit pen neer",
"pen up": "tel pen op",
"set pen color to %1": "stel pen kleur op %1",
"change pen color by %1": "verander pen kleur met %1",
"set pen %1 to %2": "stel pen %1 op %2",
"change pen %1 by %2": "verander pen %1 met %2",
"change pen shade by %1": "Verander pen skakering met %1",
"set pen shade to %1": "stel pen skakering op %1",
"change pen size by %1": "verander pen grootte met %1",
"set pen size to %1": "stel pen grootte op %1",
"when @greenFlag clicked": "wanneer @greenFlag gekliek is",
"when %1 key pressed": "wanneer %1 sleutel gedruk is",
"when this sprite clicked": "wanneer hierdie sprite gekliek is",
"when stage clicked": "wanneer verhoog gekliek is",
"when backdrop switches to %1": "wanneer agtergrond na %1 verander",
"when %1 > %2": "wanneer %1 > %2",
"when I receive %1": "wanneer ek %1 ontvang",
"broadcast %1": "saai %1 uit",
"broadcast %1 and wait": "saai %1 uit en wag",
"wait %1 seconds": "wag %1 sekondes",
"repeat %1": "herhaal %1 keer",
"forever": "vir ewig",
"if %1 then": "indien %1 dan",
"wait until %1": "wag totdat %1",
"repeat until %1": "herhaal totdat %1",
"stop %1": "stop %1",
"when I start as a clone": "wanneer ek as 'n kloon begin",
"create clone of %1": "skep kloon van %1",
"delete this clone": "skrap hierdie kloon",
"ask %1 and wait": "vra %1 en wag",
"turn video %1": "skakel video %1",
"set video transparency to %1%": "stel video deursigtigheid op %1",
"when video motion > %1": "wanneer video beweging > %1",
"reset timer": "herstel tydhouer",
"set %1 to %2": "stel %1 op %2",
"change %1 by %2": "verander %1 met %2",
"show variable %1": "vertoon veranderlike %1",
"hide variable %1": "verberg veranderlike %1",
"add %1 to %2": "voeg %1 by %2",
"delete %1 of %2": "skrap %1 van %2",
"delete all of %1": "skrap alles van %1",
"if on edge, bounce": "as rand bereik is, bons",
"insert %1 at %2 of %3": "voeg %1 in by %2 van %3",
"replace item %1 of %2 with %3": "vervang item %1 van %2 met %3",
"show list %1": "vertoon lys %1",
"hide list %1": "verberg lys %1",
"x position": "x posisie",
"y position": "y posisie",
"direction": "rigting",
"costume #": "kostuum #",
"costume %1": "kostuum %1",
"size": "grootte",
"backdrop name": "agtergrondnaam",
"backdrop %1": "agtergrond %1",
"backdrop #": "agtergrond #",
"volume": "volume",
"tempo": "tempo",
"touching %1?": "raak %1",
"touching color %1?": "raak kleur %1?",
"color %1 is touching %2?": "kleur %1 raak aan %2",
"distance to %1": "afstand na %1",
"answer": "antwoord",
"key %1 pressed?": "sleutel %1 gedruk?",
"mouse down?": "muis af?",
"mouse x": "muis x",
"mouse y": "muis y",
"set drag mode %1": "stel sleep modus %1",
"loudness": "luidheid",
"video %1 on %2": "video %1 op %2",
"timer": "tydhouer",
"%1 of %2": "%1 van %2",
"current %1": "huidige %1",
"days since 2000": "dae sedert 2000",
"username": "gebruikersnaam",
"%1 + %2": "%1 + %2",
"%1 - %2": "%1 - %2",
"%1 * %2": "%1 * %2",
"%1 / %2": "%1 / %2",
"pick random %1 to %2": "kies ewekansige %1 tot %2",
"%1 < %2": "%1 < %2",
"%1 = %2": "%1 = %2",
"%1 > %2": "%1 > %2",
"%1 and %2": "%1 en %2",
"%1 or %2": "%1 of %2",
"not %1": "nie %1",
"join %1 %2": "verbind %1 %2",
"letter %1 of %2": "letter %1 van %2",
"length of %1": "lengte van %1",
"%1 mod %2": "%1 mod %2",
"round %1": "rond %1 af",
"%1 contains %2?": "%1 bevat %2?",
"item %1 of %2": "item %1 van %2",
"item # of %1 in %2": "item # van %1 in %2",
"turn %1 on": "skakel %1 aan",
"turn %1 off": "skakel %1 af",
"set %1 power to %2": "stel %1 krag op %2",
"set %1 direction to %2": "stel %1 rigting op %2",
"when distance %1 %2": "wanneer afstand %1 %2",
"distance": "afstand",
"turn %1 on for %2 seconds": "skakel %1 aan vir %2 sekondes",
"set light color to %1": "stel ligkleur op %1",
"play note %1 for %2 seconds": "speel noot %1 vir %2 sekondes",
"when tilted %1": "wanneer gekantel %1",
"tilted %1?": "gekantel %1?",
"tilt angle %1": "kantel hoek %1",
"else": "anders",
"user id": "gebruikers id",
"loud?": "hard?",
"speak %1": "praat %1",
"set voice to %1": "stel stem op %1",
"set language to %1": "stel taal op %1",
"translate %1 to %2": "vertaal %1 na %2",
"language": "taal",
"when %1 pressed in order": "wanneer %1 in volgorde gedruk word",
"turn motor %1 for %2 seconds": "skakel motor %1 aan vir %2 sekondes",
"turn motor %1 for %2 rotations": "skakel motor %1 aan vir %2 rotasies",
"turn motor %1 on": "skakel motor %1 aan",
"turn motor %1 off": "skakel motor %1 af",
"set motor %1 speed to %2%": "stel motor %1 spoed na %2 %",
"set motor %1 direction %2": "stel motor %1 rigting %2",
"motor %1 position": "motor %1 posisie",
"when %1 brick seen": "wanneer %1 baksteen gesien word",
"seeing %1 brick?": "sien %1 baksteen?",
"motor %1 turn this way for %2 seconds": "motor %1 draai hierdie kant toe vir %2 sekondes",
"motor %1 turn that way for %2 seconds": "motor %1 draai soontoe vir %2 sekondes",
"motor %1 set power %2%": "motor %1 stel krag %2 %",
"when button %1 pressed": "wanneer knoppie %1 gedruk word",
"when distance < %1": "wanneer afstand < %1",
"when brightness < %1": "wanneer helderheid < %1",
"button %1 pressed?": "knoppie %1 gedruk?",
"brightness": "helderheid",
"beep note %1 for %2 secs": "biep noot %1 vir %2 sekondes",
"when %1": "wanneer %1",
"when force sensor %1": "wanneer krag sensor %1",
"force": "krag",
"falling?": "Besig om te val?",
"spin speed %1": "draai spoed %1",
"acceleration %1": "versnelling %1",
"when %1 button pressed": "wanneer %1 knoppie gedruk word",
"%1 button pressed?": "%1 knoppie gedruk?",
"display %1": "vertoon %1",
"display text %1": "vertoon teks %1",
"clear display": "verwyder vertooning",
"when pin %1 connected": "wanneer pin %1 verbind is"
},
"dropdowns": {},
"ignorelt": [],
"soundEffects": [
"toonhoogte",
"swenk links/regs"
],
"microbitWhen": [
"geskuif",
"geskud",
"gespring"
],
"osis": [
"ander skripte in sprite"
],
"definePrefix": [
"definieer"
],
"defineSuffix": [],
"palette": {
"Motion": "Beweging",
"Looks": "Voorkoms",
"Sound": "Klank",
"Events": "Gebeurtenisse",
"Control": "Beheer",
"Sensing": "Aanvoeling",
"Operators": "Operateurs",
"Variables": "Veranderlikes",
"My Blocks": "My Blokke"
},
"math": [
"abs",
"afrond",
"oprond",
"vierkantswortel",
"sin",
"cos",
"tan",
"asin",
"acos",
"atan",
"ln",
"log",
"e ^",
"10 ^"
],
"aliases": {},
"name": "Afrikaans",
"percentTranslated": 100
}
Loading

0 comments on commit 042ad03

Please sign in to comment.