diff --git a/extensions/-SIPC-/consoles.js b/extensions/-SIPC-/consoles.js index 032af4ddd4..5c7b2a1ace 100644 --- a/extensions/-SIPC-/consoles.js +++ b/extensions/-SIPC-/consoles.js @@ -35,7 +35,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("log"), + defaultValue: Scratch.translate({ + default: "Log", + description: "Default value", + }), }, }, }, @@ -46,7 +49,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("Information"), + defaultValue: Scratch.translate({ + default: "Information", + description: "Default value", + }), }, }, }, @@ -57,7 +63,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("Warning"), + defaultValue: Scratch.translate({ + default: "Warning", + description: "Default value", + }), }, }, }, @@ -68,7 +77,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("Error"), + defaultValue: Scratch.translate({ + default: "Error", + description: "Default value", + }), }, }, }, @@ -79,7 +91,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("Debug"), + defaultValue: Scratch.translate({ + default: "Debug", + description: "Default value", + }), }, }, }, @@ -92,7 +107,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("group"), + defaultValue: Scratch.translate({ + default: "Group", + description: "Default value", + }), }, }, }, @@ -105,7 +123,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("group"), + defaultValue: Scratch.translate({ + default: "Group", + description: "Default value", + }), }, }, }, @@ -123,7 +144,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("Time"), + defaultValue: Scratch.translate({ + default: "Time", + description: "Default value", + }), }, }, }, @@ -134,7 +158,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("Time"), + defaultValue: Scratch.translate({ + default: "Time", + description: "Default value", + }), }, }, }, @@ -147,7 +174,10 @@ arguments: { string: { type: Scratch.ArgumentType.STRING, - defaultValue: Scratch.translate("Time"), + defaultValue: Scratch.translate({ + default: "Time", + description: "Default value", + }), }, }, }, diff --git a/extensions/-SIPC-/recording.js b/extensions/-SIPC-/recording.js index b4bc74f081..82d2bebb55 100644 --- a/extensions/-SIPC-/recording.js +++ b/extensions/-SIPC-/recording.js @@ -18,14 +18,14 @@ { opcode: "startRecording", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Start recording"), + text: Scratch.translate("start recording"), blockIconURI: icon, arguments: {}, }, { opcode: "stopRecording", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Stop recording"), + text: Scratch.translate("stop recording"), blockIconURI: icon, arguments: {}, }, @@ -33,7 +33,7 @@ opcode: "stopRecordingAndDownload", blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Stop recording and download with [name] as filename" + "stop recording and download with [name] as filename" ), blockIconURI: icon, arguments: { @@ -50,7 +50,7 @@ { opcode: "isRecording", blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Recording?"), + text: Scratch.translate("recording?"), blockIconURI: icon, arguments: {}, }, diff --git a/extensions/-SIPC-/time.js b/extensions/-SIPC-/time.js index 97ae135b5e..e23c3e95ea 100644 --- a/extensions/-SIPC-/time.js +++ b/extensions/-SIPC-/time.js @@ -50,7 +50,7 @@ { opcode: "Timedata", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("get [Timedata] from [timestamp]"), + text: Scratch.translate("[Timedata] from [timestamp]"), arguments: { timestamp: { type: Scratch.ArgumentType.NUMBER, diff --git a/extensions/0832/rxFS.js b/extensions/0832/rxFS.js index ad0969d447..4191496066 100644 --- a/extensions/0832/rxFS.js +++ b/extensions/0832/rxFS.js @@ -30,7 +30,7 @@ blockIconURI: wenj, opcode: "start", blockType: Scratch.BlockType.COMMAND, - text: "New [STR] ", + text: Scratch.translate("new [STR]"), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -42,7 +42,7 @@ blockIconURI: wenj, opcode: "file", blockType: Scratch.BlockType.COMMAND, - text: "Set [STR] to [STR2] ", + text: Scratch.translate("set [STR] to [STR2]"), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -50,7 +50,7 @@ }, STR2: { type: Scratch.ArgumentType.STRING, - defaultValue: "rxFS is good!", + defaultValue: Scratch.translate("rxFS is good!"), }, }, }, @@ -58,7 +58,7 @@ blockIconURI: wenj, opcode: "sync", blockType: Scratch.BlockType.COMMAND, - text: "Change the location of [STR] to [STR2] ", + text: Scratch.translate("change the location of [STR] to [STR2]"), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -74,7 +74,7 @@ blockIconURI: wenj, opcode: "del", blockType: Scratch.BlockType.COMMAND, - text: "Delete [STR] ", + text: Scratch.translate("delete [STR]"), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -86,7 +86,7 @@ blockIconURI: wenj, opcode: "webin", blockType: Scratch.BlockType.REPORTER, - text: "Load [STR] from the network", + text: Scratch.translate("load [STR] from the network"), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -98,7 +98,7 @@ blockIconURI: wenj, opcode: "open", blockType: Scratch.BlockType.REPORTER, - text: "Open [STR]", + text: Scratch.translate("open [STR]"), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -110,14 +110,14 @@ blockIconURI: file, opcode: "clean", blockType: Scratch.BlockType.COMMAND, - text: "Clear file system", + text: Scratch.translate("clear file system"), arguments: {}, }, { blockIconURI: file, opcode: "in", blockType: Scratch.BlockType.COMMAND, - text: "Import file system from [STR]", + text: Scratch.translate("import file system from [STR]"), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -129,14 +129,16 @@ blockIconURI: file, opcode: "out", blockType: Scratch.BlockType.REPORTER, - text: "Export file system", + text: Scratch.translate("export file system"), arguments: {}, }, { blockIconURI: file, opcode: "list", blockType: Scratch.BlockType.REPORTER, - text: "List the contents under the same folder [STR]", + text: Scratch.translate( + "list the contents under the same folder [STR]" + ), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -148,7 +150,7 @@ blockIconURI: file, opcode: "search", blockType: Scratch.BlockType.REPORTER, - text: "Search [STR]", + text: Scratch.translate("search [STR]"), arguments: { STR: { type: Scratch.ArgumentType.STRING, diff --git a/extensions/0832/rxFS2.js b/extensions/0832/rxFS2.js index d321fa9ac8..4e631709b9 100644 --- a/extensions/0832/rxFS2.js +++ b/extensions/0832/rxFS2.js @@ -38,7 +38,7 @@ blockIconURI: file, opcode: "start", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate({ id: "start", default: "Create [STR]" }), + text: Scratch.translate({ id: "start", default: "create [STR]" }), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -52,7 +52,7 @@ blockType: Scratch.BlockType.COMMAND, text: Scratch.translate({ id: "folder", - default: "Set [STR] to [STR2]", + default: "set [STR] to [STR2]", }), arguments: { STR: { @@ -74,7 +74,7 @@ blockType: Scratch.BlockType.COMMAND, text: Scratch.translate({ id: "sync", - default: "Change the location of [STR] to [STR2]", + default: "change the location of [STR] to [STR2]", }), arguments: { STR: { @@ -91,7 +91,7 @@ blockIconURI: file, opcode: "del", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate({ id: "del", default: "Delete [STR]" }), + text: Scratch.translate({ id: "del", default: "delete [STR]" }), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -105,7 +105,7 @@ blockType: Scratch.BlockType.REPORTER, text: Scratch.translate({ id: "webin", - default: "Load [STR] from the web", + default: "load [STR] from the web", }), arguments: { STR: { @@ -118,7 +118,7 @@ blockIconURI: file, opcode: "open", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate({ id: "open", default: "Open [STR]" }), + text: Scratch.translate({ id: "open", default: "open [STR]" }), arguments: { STR: { type: Scratch.ArgumentType.STRING, @@ -133,7 +133,7 @@ blockType: Scratch.BlockType.COMMAND, text: Scratch.translate({ id: "clean", - default: "Clear the file system", + default: "clear the file system", }), arguments: {}, }, @@ -143,7 +143,7 @@ blockType: Scratch.BlockType.COMMAND, text: Scratch.translate({ id: "in", - default: "Import file system from [STR]", + default: "import file system from [STR]", }), arguments: { STR: { @@ -158,7 +158,7 @@ blockType: Scratch.BlockType.REPORTER, text: Scratch.translate({ id: "out", - default: "Export file system", + default: "export file system", }), arguments: {}, }, @@ -168,7 +168,7 @@ blockType: Scratch.BlockType.REPORTER, text: Scratch.translate({ id: "list", - default: "List all files under [STR]", + default: "list all files under [STR]", }), arguments: { STR: { @@ -181,7 +181,7 @@ blockIconURI: folder, opcode: "search", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate({ id: "search", default: "Search [STR]" }), + text: Scratch.translate({ id: "search", default: "search [STR]" }), arguments: { STR: { type: Scratch.ArgumentType.STRING, diff --git a/extensions/Lily/AllMenus.js b/extensions/Lily/AllMenus.js index 8f3bde3ab0..d51f05ba0c 100644 --- a/extensions/Lily/AllMenus.js +++ b/extensions/Lily/AllMenus.js @@ -65,7 +65,7 @@ getInfo() { return { id: "lmsAllMenus", - name: "All Menus", + name: Scratch.translate("All Menus"), blocks: [ { blockType: Scratch.BlockType.XML, diff --git a/extensions/Lily/CommentBlocks.js b/extensions/Lily/CommentBlocks.js index ca79522211..bd478afdfd 100644 --- a/extensions/Lily/CommentBlocks.js +++ b/extensions/Lily/CommentBlocks.js @@ -9,9 +9,13 @@ class CommentBlocks { getInfo() { + const defaultValue = Scratch.translate({ + default: "comment", + description: "Default comment value", + }); return { id: "lmscomments", - name: "Comment Blocks", + name: Scratch.translate("Comment Blocks"), color1: "#e4db8c", color2: "#c6be79", color3: "#a8a167", @@ -24,7 +28,7 @@ arguments: { COMMENT: { type: Scratch.ArgumentType.STRING, - defaultValue: "comment", + defaultValue: defaultValue, }, }, }, @@ -35,7 +39,7 @@ arguments: { COMMENT: { type: Scratch.ArgumentType.STRING, - defaultValue: "comment", + defaultValue: defaultValue, }, }, }, @@ -46,7 +50,7 @@ arguments: { COMMENT: { type: Scratch.ArgumentType.STRING, - defaultValue: "comment", + defaultValue: defaultValue, }, }, }, @@ -58,7 +62,7 @@ arguments: { COMMENT: { type: Scratch.ArgumentType.STRING, - defaultValue: "comment", + defaultValue: defaultValue, }, INPUT: { type: Scratch.ArgumentType.STRING, @@ -73,7 +77,7 @@ arguments: { COMMENT: { type: Scratch.ArgumentType.STRING, - defaultValue: "comment", + defaultValue: defaultValue, }, INPUT: { type: Scratch.ArgumentType.BOOLEAN, diff --git a/extensions/Lily/HackedBlocks.js b/extensions/Lily/HackedBlocks.js index 876a04744f..950bc20b7a 100644 --- a/extensions/Lily/HackedBlocks.js +++ b/extensions/Lily/HackedBlocks.js @@ -12,7 +12,7 @@ getInfo() { return { id: "lmsHackedBlocks", - name: "Hidden Blocks", + name: Scratch.translate("Hidden Blocks"), docsURI: "https://en.scratch-wiki.info/wiki/Hidden_Blocks#Events", blocks: [ // Use the sensing_touchingobjectmenu instead of event_ to also list sprites, since the block supports it diff --git a/extensions/Lily/ListTools.js b/extensions/Lily/ListTools.js index d66836de5b..e97c64488a 100644 --- a/extensions/Lily/ListTools.js +++ b/extensions/Lily/ListTools.js @@ -113,7 +113,7 @@ { opcode: "getListJoin", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("get list [LIST] joined by [STRING]"), + text: Scratch.translate("list [LIST] joined by [STRING]"), disableMonitor: true, arguments: { LIST: { diff --git a/extensions/Lily/McUtils.js b/extensions/Lily/McUtils.js index 7241c5a1e6..f85ad2f14f 100644 --- a/extensions/Lily/McUtils.js +++ b/extensions/Lily/McUtils.js @@ -23,7 +23,11 @@ { opcode: "managerReporter", blockType: Scratch.BlockType.REPORTER, - text: "if [INPUTA] is manager then [INPUTB] else [INPUTC]", + text: Scratch.translate({ + default: "if [INPUTA] is manager then [INPUTB] else [INPUTC]", + description: + "This is a joke block equivalent to 'if [INPUTA] then [INPUTB] else [INPUTC]", + }), arguments: { INPUTA: { type: Scratch.ArgumentType.BOOLEAN, @@ -39,7 +43,11 @@ { opcode: "icecreammachine", blockType: Scratch.BlockType.BOOLEAN, - text: "is ice cream machine [INPUT]", + text: Scratch.translate({ + default: "is ice cream machine [INPUT]", + description: + "This is a joke block. [INPUT] can be 'working' (reports false) and 'broken' (reports true) because the machine is always broken.", + }), arguments: { INPUT: { type: Scratch.ArgumentType.STRING, @@ -50,7 +58,11 @@ { opcode: "talkToManager", blockType: Scratch.BlockType.BOOLEAN, - text: "talk to manager [INPUT]", + text: Scratch.translate({ + default: "talk to manager [INPUT]", + description: + "This is a joke block that just reports whatever you put into it.", + }), arguments: { INPUT: { type: Scratch.ArgumentType.STRING, @@ -60,7 +72,11 @@ { opcode: "placeOrder", blockType: Scratch.BlockType.REPORTER, - text: "place order [INPUT]", + text: Scratch.translate({ + default: "place order [INPUT]", + description: + "This is a joke block that just reports whatever yout put into it, except if it contains 'ice cream', then false because the machine is always broken.", + }), arguments: { INPUT: { type: Scratch.ArgumentType.STRING, @@ -80,11 +96,19 @@ acceptReporters: true, items: [ { - text: "working", + text: Scratch.translate({ + default: "working", + description: + "Used in context 'is ice cream machine [working]?', a joke block", + }), value: "working", }, { - text: "broken", + text: Scratch.translate({ + default: "broken", + description: + "Used in context 'is ice cream machine [broken]?', a joke block", + }), value: "broken", }, ], diff --git a/extensions/Lily/lmsutils.js b/extensions/Lily/lmsutils.js index c92adbf925..db895742fe 100644 --- a/extensions/Lily/lmsutils.js +++ b/extensions/Lily/lmsutils.js @@ -837,7 +837,7 @@ { opcode: "osBrowserDetails", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("get [DROPDOWN] of user"), + text: Scratch.translate("[DROPDOWN] of user"), disableMonitor: true, arguments: { DROPDOWN: { diff --git a/extensions/Longboost/color_channels.js b/extensions/Longboost/color_channels.js index e0302090e1..6feedcd876 100644 --- a/extensions/Longboost/color_channels.js +++ b/extensions/Longboost/color_channels.js @@ -54,18 +54,18 @@ { opcode: "drawSelected", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("set colors red:[R]green:[G]blue:[B]"), + text: Scratch.translate("set colors red:[R] green:[G] blue:[B]"), arguments: { R: { - type: Scratch.ArgumentType.MENU, + type: Scratch.ArgumentType.STRING, menu: "ENABLED_MENU", }, G: { - type: Scratch.ArgumentType.MENU, + type: Scratch.ArgumentType.STRING, menu: "ENABLED_MENU", }, B: { - type: Scratch.ArgumentType.MENU, + type: Scratch.ArgumentType.STRING, menu: "ENABLED_MENU", }, }, @@ -73,7 +73,7 @@ { opcode: "draw", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("only draw colors:[R]green:[G]blue:[B]"), + text: Scratch.translate("only draw colors:[R] green:[G] blue:[B]"), hideFromPalette: true, arguments: { R: { @@ -101,7 +101,7 @@ { opcode: "drawDepth", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("enable depth mask?[DRAW]"), + text: Scratch.translate("enable depth mask? [DRAW]"), hideFromPalette: true, arguments: { DRAW: { diff --git a/extensions/Medericoder/textcase.js b/extensions/Medericoder/textcase.js index c08c3577be..deb526b857 100644 --- a/extensions/Medericoder/textcase.js +++ b/extensions/Medericoder/textcase.js @@ -239,7 +239,7 @@ getInfo() { return { id: "medericodertextcase", - name: "Text Case", + name: Scratch.translate("Text Case"), blocks: [ { opcode: "strictlyequal", @@ -248,11 +248,11 @@ arguments: { TEXT1: { type: Scratch.ArgumentType.STRING, - defaultValue: "Hello", + defaultValue: Scratch.translate("Hello"), }, TEXT2: { type: Scratch.ArgumentType.STRING, - defaultValue: "hello", + defaultValue: Scratch.translate("hello"), }, }, }, @@ -263,11 +263,11 @@ arguments: { TEXT1: { type: Scratch.ArgumentType.STRING, - defaultValue: "Hello", + defaultValue: Scratch.translate("Hello"), }, TEXT2: { type: Scratch.ArgumentType.STRING, - defaultValue: "hello", + defaultValue: Scratch.translate("hello"), }, }, }, @@ -275,11 +275,13 @@ { opcode: "changecase", blockType: Scratch.BlockType.REPORTER, - text: "convert [TEXT] to case [FORMAT]", + text: Scratch.translate("convert [TEXT] to case [FORMAT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "Where is the apple? It is here!", + defaultValue: Scratch.translate( + "Where is the apple? It is here!" + ), }, FORMAT: { type: Scratch.ArgumentType.STRING, @@ -290,22 +292,22 @@ { opcode: "getcase", blockType: Scratch.BlockType.REPORTER, - text: "get case from [TEXT]", + text: Scratch.translate("case from [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "hello world", + defaultValue: Scratch.translate("hello world"), }, }, }, { opcode: "iscase", blockType: Scratch.BlockType.BOOLEAN, - text: "is [TEXT] [FORMAT]", + text: Scratch.translate("is [TEXT] [FORMAT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "hello world", + defaultValue: Scratch.translate("hello world"), }, FORMAT: { type: Scratch.ArgumentType.STRING, @@ -317,11 +319,11 @@ { opcode: "glitch", blockType: Scratch.BlockType.REPORTER, - text: "glitch [TEXT] level [PROBA]%", + text: Scratch.translate("glitch [TEXT] level [PROBA]%"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "Hello", + defaultValue: Scratch.translate("Hello"), }, PROBA: { type: Scratch.ArgumentType.NUMBER, @@ -334,21 +336,36 @@ FORMAT_MENU: { acceptReporters: true, items: [ - "uppercase", - "lowercase", - "invert", - "begin", - "begin words", - "begin sentences", - "begin only", - "begin words only", - "begin sentences only", - "1/2 up", - "1/2 low", - "1/2 up letters only", - "1/2 low letters only", - "random", - "identity", + { text: Scratch.translate("uppercase"), value: "uppercase" }, + { text: Scratch.translate("lowercase"), value: "lowercase" }, + { text: Scratch.translate("invert"), value: "invert" }, + { text: Scratch.translate("begin"), value: "begin" }, + { text: Scratch.translate("begin words"), value: "begin words" }, + { + text: Scratch.translate("begin sentences"), + value: "begin sentences", + }, + { text: Scratch.translate("begin only"), value: "begin only" }, + { + text: Scratch.translate("begin words only"), + value: "begin words only", + }, + { + text: Scratch.translate("begin sentences only"), + value: "begin sentences only", + }, + { text: Scratch.translate("1/2 up"), value: "1/2 up" }, + { text: Scratch.translate("1/2 low"), value: "1/2 low" }, + { + text: Scratch.translate("1/2 up letters only"), + value: "1/2 up letters only", + }, + { + text: Scratch.translate("1/2 low letters only"), + value: "1/2 low letters only", + }, + { text: Scratch.translate("random"), value: "random" }, + { text: Scratch.translate("identity"), value: "identity" }, ], }, }, diff --git a/extensions/NOname-awa/global-coordinate.js b/extensions/NOname-awa/global-coordinate.js index 3613073ce8..3c3a4b77df 100644 --- a/extensions/NOname-awa/global-coordinate.js +++ b/extensions/NOname-awa/global-coordinate.js @@ -17,14 +17,16 @@ id: "globalCoordinate", color1: "#2ea4a4", menuIconURI: icon, - name: "Global Coordinate", + name: Scratch.translate("Global Coordinate"), blocks: [ { opcode: "SET", filter: [Scratch.TargetType.SPRITE], blockType: Scratch.BlockType.COMMAND, blockIconURI: icon, - text: "go to x: [x] y: [y] direction [r] size [s] - use screens [screen]", + text: Scratch.translate( + "go to x: [x] y: [y] direction [r] size [s] - use screens [screen]" + ), arguments: { x: { type: Scratch.ArgumentType.NUMBER, @@ -52,7 +54,9 @@ opcode: "rotation_mode", filter: [Scratch.TargetType.SPRITE], blockType: Scratch.BlockType.COMMAND, - text: "set screens [screen] 's rotation mode to [m]", + text: Scratch.translate( + "set screens [screen]'s rotation mode to [m]" + ), arguments: { screen: { type: Scratch.ArgumentType.NUMBER, @@ -67,7 +71,9 @@ { opcode: "set", blockType: Scratch.BlockType.COMMAND, - text: "set screens [screen] 's x: [x] y: [y] direction: [r] size: [s]", + text: Scratch.translate( + "set screens [screen] 's x: [x] y: [y] direction: [r] size: [s]" + ), arguments: { x: { type: Scratch.ArgumentType.NUMBER, @@ -95,7 +101,7 @@ { opcode: "Set_Co", blockType: Scratch.BlockType.COMMAND, - text: "set screens [screen] 's x [x] y: [y]", + text: Scratch.translate("set screens [screen] 's x [x] y: [y]"), arguments: { x: { type: Scratch.ArgumentType.NUMBER, @@ -114,7 +120,7 @@ { opcode: "Set_GX", blockType: Scratch.BlockType.COMMAND, - text: "set screens [screen] 's x to [x]", + text: Scratch.translate("set screens [screen] 's x to [x]"), arguments: { x: { type: Scratch.ArgumentType.NUMBER, @@ -129,7 +135,7 @@ { opcode: "Set_GY", blockType: Scratch.BlockType.COMMAND, - text: "set screens [screen] 's y to: [y]", + text: Scratch.translate("set screens [screen] 's y to: [y]"), arguments: { y: { type: Scratch.ArgumentType.NUMBER, @@ -145,7 +151,7 @@ { opcode: "CX", blockType: Scratch.BlockType.COMMAND, - text: "change screens [screen] 's x by [x]", + text: Scratch.translate("change screens [screen] 's x by [x]"), arguments: { x: { type: Scratch.ArgumentType.NUMBER, @@ -160,7 +166,7 @@ { opcode: "CY", blockType: Scratch.BlockType.COMMAND, - text: "change screens [screen] 's y by [y]", + text: Scratch.translate("change screens [screen] 's y by [y]"), arguments: { y: { type: Scratch.ArgumentType.NUMBER, @@ -176,7 +182,7 @@ { opcode: "Set_GR", blockType: Scratch.BlockType.COMMAND, - text: "set screens [screen] 's direction [r]", + text: Scratch.translate("set screens [screen] 's direction [r]"), arguments: { r: { type: Scratch.ArgumentType.NUMBER, @@ -191,7 +197,9 @@ { opcode: "TR", blockType: Scratch.BlockType.COMMAND, - text: "turn [tr_icon] [r] degrees - screens [screen]", + text: Scratch.translate( + "turn [tr_icon] [r] degrees - screens [screen]" + ), arguments: { r: { type: Scratch.ArgumentType.NUMBER, @@ -210,7 +218,9 @@ { opcode: "TL", blockType: Scratch.BlockType.COMMAND, - text: "turn [tr_icon] [r] degrees - screens [screen]", + text: Scratch.translate( + "turn [tr_icon] [r] degrees - screens [screen]" + ), arguments: { r: { type: Scratch.ArgumentType.NUMBER, @@ -230,7 +240,7 @@ { opcode: "Set_si", blockType: Scratch.BlockType.COMMAND, - text: "set screens [screen] 's size [s]", + text: Scratch.translate("set screens [screen] 's size [s]"), arguments: { s: { type: Scratch.ArgumentType.NUMBER, @@ -245,7 +255,7 @@ { opcode: "CS", blockType: Scratch.BlockType.COMMAND, - text: "change screens [screen] 's size by [s]", + text: Scratch.translate("change screens [screen] 's size by [s]"), arguments: { s: { type: Scratch.ArgumentType.NUMBER, @@ -261,7 +271,7 @@ { opcode: "x", blockType: Scratch.BlockType.REPORTER, - text: "screens [screen] x", + text: Scratch.translate("screens [screen] x"), arguments: { screen: { type: Scratch.ArgumentType.NUMBER, @@ -272,7 +282,7 @@ { opcode: "y", blockType: Scratch.BlockType.REPORTER, - text: "screens [screen] y", + text: Scratch.translate("screens [screen] y"), arguments: { screen: { type: Scratch.ArgumentType.NUMBER, @@ -283,7 +293,7 @@ { opcode: "r", blockType: Scratch.BlockType.REPORTER, - text: "screens [screen] direction", + text: Scratch.translate("screens [screen] direction"), arguments: { screen: { type: Scratch.ArgumentType.NUMBER, @@ -294,7 +304,7 @@ { opcode: "s", blockType: Scratch.BlockType.REPORTER, - text: "screens [screen] size", + text: Scratch.translate("screens [screen] size"), arguments: { screen: { type: Scratch.ArgumentType.NUMBER, @@ -305,7 +315,9 @@ { opcode: "rm", blockType: Scratch.BlockType.BOOLEAN, - text: "screens [screen] rotation mode is screen?", + text: Scratch.translate( + "screens [screen] rotation mode is screen?" + ), arguments: { screen: { type: Scratch.ArgumentType.NUMBER, @@ -319,11 +331,11 @@ acceptReporters: true, items: [ { - text: "center of stage", + text: Scratch.translate("center of stage"), value: "0", }, { - text: "center of screen", + text: Scratch.translate("center of screen"), value: "1", }, ], diff --git a/extensions/NOname-awa/math-and-string.js b/extensions/NOname-awa/math-and-string.js index e47b3db332..148c563f00 100644 --- a/extensions/NOname-awa/math-and-string.js +++ b/extensions/NOname-awa/math-and-string.js @@ -7,7 +7,7 @@ color2: "#48a100", color3: "#48a100", id: "nonameawamathandstring", - name: "Math And String", + name: Scratch.translate("Math And String"), blocks: [ { opcode: "exponent", @@ -54,7 +54,7 @@ { opcode: "astrict", blockType: Scratch.BlockType.REPORTER, - text: "constrain [A] low [B] high [C]", + text: Scratch.translate("constrain [A] low [B] high [C]"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -73,7 +73,7 @@ { opcode: "round", blockType: Scratch.BlockType.REPORTER, - text: "Round [A] to [B] decimal places", + text: Scratch.translate("round [A] to [B] decimal places"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -320,11 +320,11 @@ { opcode: "repeat", blockType: Scratch.BlockType.REPORTER, - text: "repeat [text] [n] times", + text: Scratch.translate("repeat [text] [n] times"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "Text ", + defaultValue: Scratch.translate("Text "), }, n: { type: Scratch.ArgumentType.NUMBER, @@ -335,22 +335,24 @@ { opcode: "trim", blockType: Scratch.BlockType.REPORTER, - text: "trim spaces from both sides of [text]", + text: Scratch.translate("trim spaces from both sides of [text]"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: " Text ", + defaultValue: Scratch.translate(" Text "), }, }, }, { opcode: "intercept", blockType: Scratch.BlockType.REPORTER, - text: "in text [text] get substring from [h] to [e]", + text: Scratch.translate( + "in text [text] get substring from [h] to [e]" + ), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "this is text test", + defaultValue: Scratch.translate("this is text test"), }, h: { type: Scratch.ArgumentType.NUMBER, @@ -365,26 +367,28 @@ { opcode: "replace", blockType: Scratch.BlockType.REPORTER, - text: "replace [o] of [text] with [n]", + text: Scratch.translate("replace [o] of [text] with [n]"), arguments: { o: { type: Scratch.ArgumentType.STRING, - defaultValue: "world", + defaultValue: Scratch.translate("world"), }, text: { type: Scratch.ArgumentType.STRING, - defaultValue: "Hello world!", + defaultValue: Scratch.translate("Hello world!"), }, n: { type: Scratch.ArgumentType.STRING, - defaultValue: "Scratch", + defaultValue: Scratch.translate("Scratch"), }, }, }, { opcode: "Split", blockType: Scratch.BlockType.REPORTER, - text: "divide [text] according to [symbol] to take the [n] th item", + text: Scratch.translate( + "divide [text] according to [symbol] to take the [n] th item" + ), arguments: { text: { type: Scratch.ArgumentType.STRING, @@ -404,33 +408,33 @@ { opcode: "toUpperCase", blockType: Scratch.BlockType.REPORTER, - text: "UPPER CASE [text]", + text: Scratch.translate("upper case [text]"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "Text", + defaultValue: Scratch.translate("Text"), }, }, }, { opcode: "toLowerCase", blockType: Scratch.BlockType.REPORTER, - text: "lower case [text]", + text: Scratch.translate("lower case [text]"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "Text", + defaultValue: Scratch.translate("Text"), }, }, }, { opcode: "textToTitleCase", blockType: Scratch.BlockType.REPORTER, - text: "Title Case [text]", + text: Scratch.translate("title case [text]"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "the text test", + defaultValue: Scratch.translate("the text test"), }, }, }, @@ -438,45 +442,45 @@ { opcode: "indexOf", blockType: Scratch.BlockType.REPORTER, - text: "[a] the first appearance in [text]", + text: Scratch.translate("[a]'s first appearance in [text]"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "The text test", + defaultValue: Scratch.translate("The text test"), }, a: { type: Scratch.ArgumentType.STRING, - defaultValue: "te", + defaultValue: Scratch.translate("te"), }, }, }, { opcode: "lastIndexOf", blockType: Scratch.BlockType.REPORTER, - text: "[a] the position of last occurrence in [text]", + text: Scratch.translate("[a]'s last occurrence in [text]"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "The text test", + defaultValue: Scratch.translate("The text test"), }, a: { type: Scratch.ArgumentType.STRING, - defaultValue: "te", + defaultValue: Scratch.translate("te"), }, }, }, { opcode: "countKeyword", blockType: Scratch.BlockType.REPORTER, - text: "[a] the number of occurrences in [text]", + text: Scratch.translate("[a]'s number of occurrences in [text]"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "The text test", + defaultValue: Scratch.translate("The text test"), }, a: { type: Scratch.ArgumentType.STRING, - defaultValue: "te", + defaultValue: Scratch.translate("te"), }, }, }, @@ -484,22 +488,22 @@ { opcode: "startsWith", blockType: Scratch.BlockType.BOOLEAN, - text: "does [a] begin with a text?", + text: Scratch.translate("does [a] begin with a text?"), arguments: { a: { type: Scratch.ArgumentType.STRING, - defaultValue: "Abc123", + defaultValue: Scratch.translate("Abc123"), }, }, }, { opcode: "matchTextWithPattern", blockType: Scratch.BlockType.BOOLEAN, - text: "match [text] as [pattern] - [flags]", + text: Scratch.translate("match [text] as [pattern] - [flags]"), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "abc", + defaultValue: Scratch.translate("abc"), }, pattern: { type: Scratch.ArgumentType.STRING, @@ -515,18 +519,18 @@ { opcode: "ascii", blockType: Scratch.BlockType.REPORTER, - text: "[a]'s ascii", + text: Scratch.translate("[a]'s ASCII"), arguments: { a: { type: Scratch.ArgumentType.STRING, - defaultValue: "a", + defaultValue: Scratch.translate("a"), }, }, }, { opcode: "ascii_", blockType: Scratch.BlockType.REPORTER, - text: "ascii is [a] 's text", + text: Scratch.translate("ASCII [a] as text"), arguments: { a: { type: Scratch.ArgumentType.NUMBER, @@ -538,7 +542,7 @@ { opcode: "line_segment", blockType: Scratch.BlockType.REPORTER, - text: "line segment ([x1],[y1]) to ([x2],[y2])", + text: Scratch.translate("line segment ([x1],[y1]) to ([x2],[y2])"), arguments: { x1: { type: Scratch.ArgumentType.NUMBER, @@ -562,7 +566,9 @@ { opcode: "triangle", blockType: Scratch.BlockType.REPORTER, - text: "triangle ([x1],[y1]) ([x2],[y2]) ([x3],[y3]) 's [CS]", + text: Scratch.translate( + "triangle ([x1],[y1]) ([x2],[y2]) ([x3],[y3]) 's [CS]" + ), arguments: { x1: { type: Scratch.ArgumentType.NUMBER, @@ -597,7 +603,7 @@ { opcode: "triangle_s", blockType: Scratch.BlockType.REPORTER, - text: "triangle [s1] [s2] [s3] 's square", + text: Scratch.translate("triangle [s1] [s2] [s3] 's square"), arguments: { s1: { type: Scratch.ArgumentType.NUMBER, @@ -616,7 +622,9 @@ { opcode: "rectangle", blockType: Scratch.BlockType.REPORTER, - text: "rectangle ([x1],[y1]) ([x2],[y2]) ([x3],[y3]) ([x4],[y4]) 's [CS]", + text: Scratch.translate( + "rectangle ([x1],[y1]) ([x2],[y2]) ([x3],[y3]) ([x4],[y4]) 's [CS]" + ), arguments: { x1: { type: Scratch.ArgumentType.NUMBER, @@ -659,7 +667,7 @@ { opcode: "graph", blockType: Scratch.BlockType.REPORTER, - text: "graph [graph] 's [CS]", + text: Scratch.translate("graph [graph] 's [CS]"), arguments: { graph: { type: Scratch.ArgumentType.STRING, @@ -675,7 +683,7 @@ { opcode: "circle", blockType: Scratch.BlockType.REPORTER, - text: "circle: [rd][a] 's [CS]", + text: Scratch.translate("circle: [rd][a] 's [CS]"), arguments: { rd: { type: Scratch.ArgumentType.STRING, @@ -696,11 +704,15 @@ opcode: "words", blockType: Scratch.BlockType.REPORTER, disableMonitor: true, - text: "sort unique words in [text] as [language]", + text: Scratch.translate( + "sort unique words in [text] as [language]" + ), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "movie dog restaurant book school", + defaultValue: Scratch.translate( + "movie dog restaurant book school" + ), }, language: { type: Scratch.ArgumentType.STRING, @@ -712,13 +724,13 @@ { opcode: "true", blockType: Scratch.BlockType.BOOLEAN, - text: "true", + text: Scratch.translate("true"), disableMonitor: true, }, { opcode: "false", blockType: Scratch.BlockType.BOOLEAN, - text: "false", + text: Scratch.translate("false"), disableMonitor: true, }, { @@ -757,11 +769,11 @@ acceptReporters: true, items: [ { - text: "radius (r)", + text: Scratch.translate("radius (r)"), value: "r", }, { - text: "diameter (d)", + text: Scratch.translate("diameter (d)"), value: "d", }, ], @@ -770,11 +782,11 @@ acceptReporters: true, items: [ { - text: "square (s)", + text: Scratch.translate("square (s)"), value: "s", }, { - text: "circumference (c)", + text: Scratch.translate("circumference (c)"), value: "c", }, ], @@ -783,11 +795,11 @@ acceptReporters: true, items: [ { - text: "English (en)", + text: Scratch.translate("English (en)"), value: "en", }, { - text: "Chinese (zh)", + text: Scratch.translate("Chinese (zh)"), value: "zh", }, ], @@ -796,11 +808,11 @@ acceptReporters: false, items: [ { - text: "global (g)", + text: Scratch.translate("global (g)"), value: "g", }, { - text: "ignoring case (i)", + text: Scratch.translate("ignoring case (i)"), value: "i", }, ], diff --git a/extensions/NOname-awa/regular-expression.js b/extensions/NOname-awa/regular-expression.js index 0d79427d1c..73093338b1 100644 --- a/extensions/NOname-awa/regular-expression.js +++ b/extensions/NOname-awa/regular-expression.js @@ -8,12 +8,12 @@ color2: "#0067a9", color3: "#0067a9", id: "nonameawaregex", - name: "Regular Expression", + name: Scratch.translate("Regular Expression"), blocks: [ { opcode: "set", blockType: Scratch.BlockType.COMMAND, - text: "set a: [one] b: [two] c: [three]", + text: Scratch.translate("set a: [one] b: [two] c: [three]"), arguments: { one: { type: Scratch.ArgumentType.STRING, @@ -32,7 +32,7 @@ { opcode: "matchText", blockType: Scratch.BlockType.BOOLEAN, - text: "matchText: b in a [flags]", + text: Scratch.translate("match text: b in a [flags]"), arguments: { flags: { type: Scratch.ArgumentType.STRING, @@ -43,18 +43,18 @@ { opcode: "searchText", blockType: Scratch.BlockType.REPORTER, - text: "searchText: b in a", + text: Scratch.translate("search text: b in a"), }, { opcode: "replaceText", blockType: Scratch.BlockType.REPORTER, - text: "replaceText: b in a with c", + text: Scratch.translate("replace text: b in a with c"), }, "---", { opcode: "matchTextWithPattern", blockType: Scratch.BlockType.BOOLEAN, - text: "match [pattern] in [text] - [flags]", + text: Scratch.translate("match [pattern] in [text] - [flags]"), arguments: { text: { type: Scratch.ArgumentType.STRING, @@ -73,7 +73,7 @@ { opcode: "searchTextWithPattern", blockType: Scratch.BlockType.REPORTER, - text: "search [pattern] in [text] ", + text: Scratch.translate("search [pattern] in [text] "), arguments: { text: { type: Scratch.ArgumentType.STRING, @@ -88,7 +88,9 @@ { opcode: "replaceTextWithPattern", blockType: Scratch.BlockType.REPORTER, - text: "replace [pattern] in [text] with [replacement]", + text: Scratch.translate( + "replace [pattern] in [text] with [replacement]" + ), arguments: { text: { type: Scratch.ArgumentType.STRING, @@ -138,11 +140,11 @@ acceptReporters: false, items: [ { - text: "global (g)", + text: Scratch.translate("global (g)"), value: "g", }, { - text: "ignore case (i)", + text: Scratch.translate("ignore case (i)"), value: "i", }, ], @@ -151,47 +153,47 @@ acceptReporters: true, items: [ { - text: "english", + text: Scratch.translate("english"), value: "[a-zA-Z]", }, { - text: "english uppercase", + text: Scratch.translate("english uppercase"), value: "[A-Z]", }, { - text: "english lowercase", + text: Scratch.translate("english lowercase"), value: "[a-z]", }, { - text: "number", + text: Scratch.translate("number"), value: "[0-9]", }, { - text: "numeric integer", + text: Scratch.translate("numeric integer"), value: "^-?[1-9]\\d*$", }, { - text: "positive integer", + text: Scratch.translate("positive integer"), value: "^[1-9]\\d*$", }, { - text: "negative integer", + text: Scratch.translate("negative integer"), value: "^-[1-9]\\d*$", }, { - text: "non-negative integers", + text: Scratch.translate("non-negative integers"), value: "^[1-9]\\d*|0$", }, { - text: "non-positive integer", + text: Scratch.translate("non-positive integer"), value: "^-[1-9]\\d*|0$", }, { - text: "chinese", + text: Scratch.translate("chinese"), value: "[\u4e00-\u9fa5]", }, { - text: "double-byte", + text: Scratch.translate("double-byte"), value: "[^\x00-\xff]", }, ], diff --git a/extensions/NOname-awa/sort-unique-words.js b/extensions/NOname-awa/sort-unique-words.js index d4bcc388b7..6215db5e08 100644 --- a/extensions/NOname-awa/sort-unique-words.js +++ b/extensions/NOname-awa/sort-unique-words.js @@ -28,7 +28,7 @@ getInfo() { return { id: "nonameawasortuniquewords", - name: "Sort Unique Words", + name: Scratch.translate("Sort Unique Words"), color1: "#5a8b9e", color2: "#427081", color3: "#427081", @@ -37,11 +37,15 @@ opcode: "words", blockType: Scratch.BlockType.REPORTER, disableMonitor: true, - text: "sort unique words in [text] as [language]", + text: Scratch.translate( + "sort unique words in [text] as [language]" + ), arguments: { text: { type: Scratch.ArgumentType.STRING, - defaultValue: "movie dog restaurant book school", + defaultValue: Scratch.translate( + "movie dog restaurant book school" + ), }, language: { type: Scratch.ArgumentType.STRING, @@ -55,11 +59,11 @@ acceptReporters: true, items: [ { - text: "English (en)", + text: Scratch.translate("English (en)"), value: "en", }, { - text: "Chinese (zh)", + text: Scratch.translate("Chinese (zh)"), value: "zh", }, ], diff --git a/extensions/TheShovel/ColorPicker.js b/extensions/TheShovel/ColorPicker.js index be2150d21e..e395c62f07 100644 --- a/extensions/TheShovel/ColorPicker.js +++ b/extensions/TheShovel/ColorPicker.js @@ -38,7 +38,7 @@ getInfo() { return { id: "shovelColorPicker", - name: "ColorPicker", + name: Scratch.translate("Color Picker"), color1: "#ff7db5", color2: "#e0649a", color3: "#c14d7f", @@ -46,12 +46,12 @@ { opcode: "showPicker", blockType: Scratch.BlockType.COMMAND, - text: "show color picker", + text: Scratch.translate("show color picker"), }, { opcode: "setPos", blockType: Scratch.BlockType.COMMAND, - text: "set picker position to x: [X] y: [Y]", + text: Scratch.translate("set picker position to x: [X] y: [Y]"), arguments: { X: { type: Scratch.ArgumentType.NUMBER, @@ -66,7 +66,7 @@ { opcode: "setColor", blockType: Scratch.BlockType.COMMAND, - text: "set picker color to [COLOR]", + text: Scratch.translate("set picker color to [COLOR]"), arguments: { COLOR: { type: Scratch.ArgumentType.COLOR, @@ -77,7 +77,7 @@ { opcode: "getColor", blockType: Scratch.BlockType.REPORTER, - text: "color [TYPE] value", + text: Scratch.translate("color [TYPE] value"), arguments: { TYPE: { type: Scratch.ArgumentType.STRING, @@ -88,7 +88,7 @@ { opcode: "getPos", blockType: Scratch.BlockType.REPORTER, - text: "picker [COORD] position", + text: Scratch.translate("picker [COORD] position"), arguments: { COORD: { type: Scratch.ArgumentType.STRING, @@ -100,13 +100,24 @@ opcode: "whenChanged", blockType: Scratch.BlockType.EVENT, isEdgeActivated: false, - text: "when color changed", + text: Scratch.translate("when color changed"), }, ], menus: { RGBMenu: { acceptReporters: true, - items: ["hex", "red", "green", "blue"], + items: [ + { + text: Scratch.translate({ + default: "hex", + description: "Referring to a hex color code like #ff4c4c", + }), + value: "hex", + }, + { text: Scratch.translate("red"), value: "red" }, + { text: Scratch.translate("green"), value: "green" }, + { text: Scratch.translate("blue"), value: "blue" }, + ], }, POSMenu: { acceptReporters: true, diff --git a/extensions/TheShovel/CustomStyles.js b/extensions/TheShovel/CustomStyles.js index 3f15fe13d5..79ad6f9c33 100644 --- a/extensions/TheShovel/CustomStyles.js +++ b/extensions/TheShovel/CustomStyles.js @@ -318,7 +318,7 @@ getInfo() { return { id: "shovelcss", - name: "Custom Styles", + name: Scratch.translate("Custom Styles"), menuIconURI: extensionIcon, color1: "#0072d6", color2: "#0064bc", @@ -328,7 +328,7 @@ blockIconURI: ColorIcon, opcode: "changecss", blockType: Scratch.BlockType.COMMAND, - text: "set [COLORABLE] to [COLOR]", + text: Scratch.translate("set [COLORABLE] to [COLOR]"), arguments: { COLORABLE: { type: Scratch.ArgumentType.STRING, @@ -344,7 +344,9 @@ blockIconURI: GradientIcon, opcode: "gradientAngle", blockType: Scratch.BlockType.REPORTER, - text: "make a gradient with [COLOR1] and [COLOR2] at angle [ANGLE]", + text: Scratch.translate( + "make a gradient with [COLOR1] and [COLOR2] at angle [ANGLE]" + ), arguments: { COLOR1: { type: Scratch.ArgumentType.COLOR, @@ -365,14 +367,14 @@ disableMonitor: true, opcode: "transparentinput", blockType: Scratch.BlockType.REPORTER, - text: "transparent", + text: Scratch.translate("transparent"), }, { blockIconURI: PictureIcon, disableMonitor: true, opcode: "pictureinput", blockType: Scratch.BlockType.REPORTER, - text: "image [URL]", + text: Scratch.translate("image [URL]"), arguments: { URL: { type: Scratch.ArgumentType.STRING, @@ -386,7 +388,7 @@ disableMonitor: true, opcode: "setAskURI", blockType: Scratch.BlockType.COMMAND, - text: "set ask prompt button image to [URL]", + text: Scratch.translate("set ask prompt button image to [URL]"), arguments: { URL: { type: Scratch.ArgumentType.STRING, @@ -399,7 +401,7 @@ blockIconURI: BorderIcon, opcode: "setbordersize", blockType: Scratch.BlockType.COMMAND, - text: "set border width of [BORDER] to [SIZE]", + text: Scratch.translate("set border width of [BORDER] to [SIZE]"), arguments: { BORDER: { type: Scratch.ArgumentType.STRING, @@ -415,7 +417,7 @@ blockIconURI: BorderIcon, opcode: "setborderradius", blockType: Scratch.BlockType.COMMAND, - text: "set roundness of [CORNER] to [SIZE]", + text: Scratch.translate("set roundness of [CORNER] to [SIZE]"), arguments: { SIZE: { type: Scratch.ArgumentType.NUMBER, @@ -432,14 +434,14 @@ blockIconURI: ResetIcon, opcode: "clearCSS", blockType: Scratch.BlockType.COMMAND, - text: "reset styles", + text: Scratch.translate("reset styles"), }, "---", { blockIconURI: miscIcon, opcode: "allowscrollrule", blockType: Scratch.BlockType.COMMAND, - text: "set list scrolling to [SCROLLRULE]", + text: Scratch.translate("set list scrolling to [SCROLLRULE]"), arguments: { SCROLLRULE: { type: Scratch.ArgumentType.STRING, @@ -451,7 +453,7 @@ blockIconURI: miscIcon, opcode: "getValue", blockType: Scratch.BlockType.REPORTER, - text: "get [ITEM]", + text: Scratch.translate("[ITEM]"), arguments: { ITEM: { type: Scratch.ArgumentType.STRING, @@ -464,7 +466,9 @@ blockIconURI: miscIcon, opcode: "setvarpos", blockType: Scratch.BlockType.COMMAND, - text: "set position of variable [NAME] to x: [X] y: [Y]", + text: Scratch.translate( + "set position of variable [NAME] to x: [X] y: [Y]" + ), arguments: { X: { type: Scratch.ArgumentType.NUMBER, @@ -484,7 +488,9 @@ blockIconURI: miscIcon, opcode: "setlistpos", blockType: Scratch.BlockType.COMMAND, - text: "set position of list [NAME] to x: [X] y: [Y]", + text: Scratch.translate( + "set position of list [NAME] to x: [X] y: [Y]" + ), arguments: { X: { type: Scratch.ArgumentType.NUMBER, @@ -506,75 +512,225 @@ COLORABLE_MENU: { acceptReporters: true, items: [ - "monitor text", - "monitor background", - "monitor border", - "variable value background", - "variable value text", - "list header background", - "list footer background", - "list value background", - "list value text", - "ask prompt background", - "ask prompt button background", - "ask prompt input background", - "ask prompt question text", - "ask prompt input text", - "ask prompt input border", + { + text: Scratch.translate("monitor text"), + value: "monitor text", + }, + { + text: Scratch.translate("monitor background"), + value: "monitor background", + }, + { + text: Scratch.translate("monitor border"), + value: "monitor border", + }, + { + text: Scratch.translate("variable value background"), + value: "variable value background", + }, + { + text: Scratch.translate("variable value text"), + value: "variable value text", + }, + { + text: Scratch.translate("list header background"), + value: "list header background", + }, + { + text: Scratch.translate("list footer background"), + value: "list footer background", + }, + { + text: Scratch.translate("list value background"), + value: "list value background", + }, + { + text: Scratch.translate("list value text"), + value: "list value text", + }, + { + text: Scratch.translate("ask prompt background"), + value: "ask prompt background", + }, + { + text: Scratch.translate("ask prompt button background"), + value: "ask prompt button background", + }, + { + text: Scratch.translate("ask prompt input background"), + value: "ask prompt input background", + }, + { + text: Scratch.translate("ask prompt question text"), + value: "ask prompt question text", + }, + { + text: Scratch.translate("ask prompt input text"), + value: "ask prompt input text", + }, + { + text: Scratch.translate("ask prompt input border"), + value: "ask prompt input border", + }, ], }, BORDER_WIDTH_MENU: { acceptReporters: true, items: [ - "monitor background", - "ask prompt background", - "ask prompt input", + { + text: Scratch.translate("monitor background"), + value: "monitor background", + }, + { + text: Scratch.translate("ask prompt background"), + value: "ask prompt background", + }, + { + text: Scratch.translate("ask prompt input"), + value: "ask prompt input", + }, ], }, BORDER_ROUNDNESS_MENU: { acceptReporters: true, items: [ - "monitor background", - "variable value", - "list value", - "ask prompt background", - "ask prompt button", - "ask prompt input", + { + text: Scratch.translate("monitor background"), + value: "monitor background", + }, + { + text: Scratch.translate("variable value"), + value: "variable value", + }, + { text: Scratch.translate("list value"), value: "list value" }, + { + text: Scratch.translate("ask prompt background"), + value: "ask prompt background", + }, + { + text: Scratch.translate("ask prompt button"), + value: "ask prompt button", + }, + { + text: Scratch.translate("ask prompt input"), + value: "ask prompt input", + }, ], }, SCROLL_MENU: { acceptReporters: true, - items: ["enabled", "disabled"], + items: [ + { text: Scratch.translate("enabled"), value: "enabled" }, + { text: Scratch.translate("disabled"), value: "disabled" }, + ], }, VALUEGET_LIST: { acceptReporters: true, items: [ - "monitor text", - "monitor background", - "monitor border color", - "variable value background", - "variable value text", - "list header background", - "list footer background", - "list value background", - "list value text", - "ask prompt background", - "ask prompt button background", - "ask prompt input background", - "ask prompt question text", - "ask prompt input text", - "ask prompt input border", - "monitor background border width", - "ask prompt background border width", - "ask prompt input border width", - "monitor background roundness", - "variable value roundness", - "list value roundness", - "ask prompt background roundness", - "ask prompt button roundness", - "ask prompt input roundness", - "ask prompt button image", - "list scroll rule", + { + text: Scratch.translate("monitor text"), + value: "monitor text", + }, + { + text: Scratch.translate("monitor background"), + value: "monitor background", + }, + { + text: Scratch.translate("monitor border color"), + value: "monitor border color", + }, + { + text: Scratch.translate("variable value background"), + value: "variable value background", + }, + { + text: Scratch.translate("variable value text"), + value: "variable value text", + }, + { + text: Scratch.translate("list header background"), + value: "list header background", + }, + { + text: Scratch.translate("list footer background"), + value: "list footer background", + }, + { + text: Scratch.translate("list value background"), + value: "list value background", + }, + { + text: Scratch.translate("list value text"), + value: "list value text", + }, + { + text: Scratch.translate("ask prompt background"), + value: "ask prompt background", + }, + { + text: Scratch.translate("ask prompt button background"), + value: "ask prompt button background", + }, + { + text: Scratch.translate("ask prompt input background"), + value: "ask prompt input background", + }, + { + text: Scratch.translate("ask prompt question text"), + value: "ask prompt question text", + }, + { + text: Scratch.translate("ask prompt input text"), + value: "ask prompt input text", + }, + { + text: Scratch.translate("ask prompt input border"), + value: "ask prompt input border", + }, + { + text: Scratch.translate("monitor background border width"), + value: "monitor background border width", + }, + { + text: Scratch.translate("ask prompt background border width"), + value: "ask prompt background border width", + }, + { + text: Scratch.translate("ask prompt input border width"), + value: "ask prompt input border width", + }, + { + text: Scratch.translate("monitor background roundness"), + value: "monitor background roundness", + }, + { + text: Scratch.translate("variable value roundness"), + value: "variable value roundness", + }, + { + text: Scratch.translate("list value roundness"), + value: "list value roundness", + }, + { + text: Scratch.translate("ask prompt background roundness"), + value: "ask prompt background roundness", + }, + { + text: Scratch.translate("ask prompt button roundness"), + value: "ask prompt button roundness", + }, + { + text: Scratch.translate("ask prompt input roundness"), + value: "ask prompt input roundness", + }, + { + text: Scratch.translate("ask prompt button image"), + value: "ask prompt button image", + }, + { + text: Scratch.translate("list scroll rule"), + value: "list scroll rule", + }, ], }, }, diff --git a/extensions/TheShovel/LZ-String.js b/extensions/TheShovel/LZ-String.js index 26825183b9..c80818f579 100644 --- a/extensions/TheShovel/LZ-String.js +++ b/extensions/TheShovel/LZ-String.js @@ -349,14 +349,14 @@ getInfo() { return { id: "shovellzcompress", - name: "LZ Compress", + name: Scratch.translate("LZ Compress"), color1: "#2f3463", color2: "#2b2f59", blocks: [ { opcode: "compress", blockType: Scratch.BlockType.REPORTER, - text: "compress [TEXT] to [TYPE]", + text: Scratch.translate("compress [TEXT] to [TYPE]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -371,7 +371,7 @@ { opcode: "decompress", blockType: Scratch.BlockType.REPORTER, - text: "decompress [TEXT] from [TYPE]", + text: Scratch.translate("decompress [TEXT] from [TYPE]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -388,11 +388,31 @@ COMPRESSIONTYPES: { acceptReporters: true, items: [ - "Raw", - "Base64", - "EncodedURIComponent", - "Uint8Array", - "UTF16", + { text: Scratch.translate("Raw"), value: "Raw" }, + { text: Scratch.translate("Base64"), value: "Base64" }, + { + text: Scratch.translate({ + default: "EncodedURIComponent", + description: + "A type of encoding that happens to also be used in URLs.", + }), + value: "EncodedURIComponent", + }, + { + text: Scratch.translate({ + default: "Uint8Array", + description: "An array of bytes.", + }), + value: "Unit8Array", + }, + { + text: Scratch.translate({ + default: "UTF16", + description: + "A type of unicode encoding. For almost all languages this translates to just 'UTF16'", + }), + value: "UTF16", + }, ], }, }, diff --git a/extensions/TheShovel/ShovelUtils.js b/extensions/TheShovel/ShovelUtils.js index 112b47156d..1cb286bb0f 100644 --- a/extensions/TheShovel/ShovelUtils.js +++ b/extensions/TheShovel/ShovelUtils.js @@ -39,7 +39,7 @@ { opcode: "importImage", blockType: Scratch.BlockType.COMMAND, - text: "import image from [TEXT] name [NAME]", + text: Scratch.translate("import image from [TEXT] name [NAME]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -54,7 +54,7 @@ { opcode: "getlist", blockType: Scratch.BlockType.REPORTER, - text: "get list [TEXT] as array", + text: Scratch.translate("list [TEXT] as array"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -65,7 +65,7 @@ { opcode: "setlist", blockType: Scratch.BlockType.COMMAND, - text: "set list [NAME] to [TEXT]", + text: Scratch.translate("set list [NAME] to [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -80,18 +80,18 @@ { opcode: "importSprite", blockType: Scratch.BlockType.COMMAND, - text: "import sprite from [TEXT]", + text: Scratch.translate("import sprite from [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "Link or data uri here", + defaultValue: Scratch.translate("Link or data URI here"), }, }, }, { opcode: "importSound", blockType: Scratch.BlockType.COMMAND, - text: "import sound from [TEXT] name [NAME]", + text: Scratch.translate("import sound from [TEXT] name [NAME]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -106,7 +106,7 @@ { opcode: "importProject", blockType: Scratch.BlockType.COMMAND, - text: "import project from [TEXT]", + text: Scratch.translate("import project from [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -118,7 +118,7 @@ { opcode: "loadExtension", blockType: Scratch.BlockType.COMMAND, - text: "load extension from [TEXT]", + text: Scratch.translate("load extension from [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -130,7 +130,7 @@ { opcode: "restartProject", blockType: Scratch.BlockType.COMMAND, - text: "restart project", + text: Scratch.translate("restart project"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -141,7 +141,7 @@ { opcode: "deleteSprite", blockType: Scratch.BlockType.COMMAND, - text: "delete sprite [SPRITE]", + text: Scratch.translate("delete sprite [SPRITE]"), arguments: { SPRITE: { type: Scratch.ArgumentType.STRING, @@ -152,7 +152,7 @@ { opcode: "deleteImage", blockType: Scratch.BlockType.COMMAND, - text: "delete costume [COSNAME] in [SPRITE]", + text: Scratch.translate("delete costume [COSNAME] in [SPRITE]"), arguments: { COSNAME: { type: Scratch.ArgumentType.STRING, @@ -167,7 +167,7 @@ { opcode: "setedtarget", blockType: Scratch.BlockType.COMMAND, - text: "set editing target to [NAME]", + text: Scratch.translate("set editing target to [NAME]"), arguments: { NAME: { type: Scratch.ArgumentType.STRING, @@ -179,7 +179,7 @@ { opcode: "brightnessByColor", blockType: Scratch.BlockType.REPORTER, - text: "brightness of [color]", + text: Scratch.translate("brightness of [color]"), arguments: { color: { type: Scratch.ArgumentType.STRING, @@ -191,12 +191,12 @@ { opcode: "getAllSprites", blockType: Scratch.BlockType.REPORTER, - text: "all sprites", + text: Scratch.translate("all sprites"), }, { opcode: "getfps", blockType: Scratch.BlockType.REPORTER, - text: "fps", + text: Scratch.translate("fps"), }, ], }; diff --git a/extensions/TheShovel/profanity.js b/extensions/TheShovel/profanity.js index 2985a4405e..50f3f3f45b 100644 --- a/extensions/TheShovel/profanity.js +++ b/extensions/TheShovel/profanity.js @@ -238,7 +238,7 @@ getInfo() { return { id: "theshovelprofanity", - name: "Bad Word Remover", + name: Scratch.translate("Bad Word Remover"), color1: "#cf6a3c", color2: "#cf6a3c", color3: "#cf6a3c", @@ -246,7 +246,9 @@ { opcode: "checkProfanity", blockType: Scratch.BlockType.REPORTER, - text: "replace bad words in [TEXT] with [REPLACEMENT]", + text: Scratch.translate( + "replace bad words in [TEXT] with [REPLACEMENT]" + ), arguments: { REPLACEMENT: { type: Scratch.ArgumentType.STRING, @@ -254,7 +256,7 @@ }, TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "Hello!", + defaultValue: Scratch.translate("Hello!"), }, }, }, diff --git a/extensions/TheShovel/profanityAPI.js b/extensions/TheShovel/profanityAPI.js index 773158a22b..7f7b3690e9 100644 --- a/extensions/TheShovel/profanityAPI.js +++ b/extensions/TheShovel/profanityAPI.js @@ -4,7 +4,7 @@ getInfo() { return { id: "profanityAPI", - name: "profanityAPI", + name: Scratch.translate("Profanity API"), color1: "#cf6a3c", color2: "#cf6a3c", color3: "#cf6a3c", @@ -12,11 +12,11 @@ { opcode: "checkProfanity", blockType: Scratch.BlockType.REPORTER, - text: "Remove profanity from [TEXT]", + text: Scratch.translate("remove profanity from [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "Hello, I love pizza!", + defaultValue: Scratch.translate("Hello, I love pizza!"), }, }, }, diff --git a/extensions/WP-Studio01/text2speech.js b/extensions/WP-Studio01/text2speech.js index a51c7cb015..452d0ee48a 100644 --- a/extensions/WP-Studio01/text2speech.js +++ b/extensions/WP-Studio01/text2speech.js @@ -5,16 +5,16 @@ getInfo() { return { id: "wpstudio01tts", - name: "System Text To Speech", + name: Scratch.translate("System Text To Speech"), blocks: [ { opcode: "speak", blockType: Scratch.BlockType.COMMAND, - text: "speak [TEXT]", + text: Scratch.translate("speak [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "Hello", + defaultValue: Scratch.translate("Hello"), }, }, }, diff --git a/extensions/Xeltalliv/clippingblending.js b/extensions/Xeltalliv/clippingblending.js index 71a1858634..be02efe375 100644 --- a/extensions/Xeltalliv/clippingblending.js +++ b/extensions/Xeltalliv/clippingblending.js @@ -284,7 +284,7 @@ getInfo() { return { id: "xeltallivclipblend", - name: "Clipping & Blending", + name: Scratch.translate("Clipping & Blending"), color1: "#9966FF", color2: "#855CD6", color3: "#774DCB", @@ -293,7 +293,9 @@ { opcode: "setClipbox", blockType: Scratch.BlockType.COMMAND, - text: "set clipping box x1:[X1] y1:[Y1] x2:[X2] y2:[Y2]", + text: Scratch.translate( + "set clipping box x1:[X1] y1:[Y1] x2:[X2] y2:[Y2]" + ), arguments: { X1: { type: Scratch.ArgumentType.NUMBER, @@ -318,18 +320,18 @@ { opcode: "clearClipbox", blockType: Scratch.BlockType.COMMAND, - text: "clear clipping box", + text: Scratch.translate("clear clipping box"), filter: [Scratch.TargetType.SPRITE], extensions: ["colours_looks"], }, { opcode: "getClipbox", blockType: Scratch.BlockType.REPORTER, - text: "clipping box [PROP]", + text: Scratch.translate("clipping box [PROP]"), arguments: { PROP: { type: Scratch.ArgumentType.STRING, - defaultValue: "width", + defaultValue: Scratch.translate("width"), menu: "props", }, }, @@ -340,11 +342,11 @@ { opcode: "setBlend", blockType: Scratch.BlockType.COMMAND, - text: "use [BLENDMODE] blending ", + text: Scratch.translate("use [BLENDMODE] blending"), arguments: { BLENDMODE: { type: Scratch.ArgumentType.STRING, - defaultValue: "default", + defaultValue: Scratch.translate("default"), menu: "blends", }, }, @@ -354,7 +356,7 @@ { opcode: "getBlend", blockType: Scratch.BlockType.REPORTER, - text: "blending", + text: Scratch.translate("blending"), filter: [Scratch.TargetType.SPRITE], disableMonitor: true, extensions: ["colours_looks"], @@ -363,11 +365,11 @@ { opcode: "setAdditiveBlend", blockType: Scratch.BlockType.COMMAND, - text: "turn additive blending [STATE]", + text: Scratch.translate("turn additive blending [STATE]"), arguments: { STATE: { type: Scratch.ArgumentType.STRING, - defaultValue: "on", + defaultValue: Scratch.translate("on"), menu: "states", }, }, @@ -378,7 +380,7 @@ { opcode: "getAdditiveBlend", blockType: Scratch.BlockType.BOOLEAN, - text: "is additive blending on?", + text: Scratch.translate("is additive blending on?"), filter: [Scratch.TargetType.SPRITE], hideFromPalette: true, disableMonitor: true, @@ -388,15 +390,31 @@ menus: { states: { acceptReporters: true, - items: ["on", "off"], + items: [ + { text: Scratch.translate("on"), value: "on" }, + { text: Scratch.translate("off"), value: "off" }, + ], }, blends: { acceptReporters: true, - items: ["default", "additive", "subtract", "multiply", "invert"], + items: [ + { text: Scratch.translate("default"), value: "default" }, + { text: Scratch.translate("additive"), value: "additive" }, + { text: Scratch.translate("subtract"), value: "subtract" }, + { text: Scratch.translate("multiply"), value: "multiply" }, + { text: Scratch.translate("invert"), value: "invert" }, + ], }, props: { acceptReporters: true, - items: ["width", "height", "min x", "min y", "max x", "max y"], + items: [ + { text: Scratch.translate("width"), value: "width" }, + { text: Scratch.translate("height"), value: "height" }, + { text: Scratch.translate("min x"), value: "min x" }, + { text: Scratch.translate("min y"), value: "min y" }, + { text: Scratch.translate("max x"), value: "max x" }, + { text: Scratch.translate("max y"), value: "max y" }, + ], }, }, }; diff --git a/extensions/XeroName/Deltatime.js b/extensions/XeroName/Deltatime.js index 6a8541de5e..bb99cc01dc 100644 --- a/extensions/XeroName/Deltatime.js +++ b/extensions/XeroName/Deltatime.js @@ -1,4 +1,4 @@ -// Name: Deltatime +// Name: Delta Time // ID: dtbyxeroname // Description: Precise delta timing blocks. // By: XeroName @@ -29,7 +29,7 @@ getInfo() { return { id: "dtbyxeroname", - name: "Deltatime", + name: Scratch.translate("Delta Time"), color1: "#333333", color2: "#444444", color3: "#ffffff", diff --git a/extensions/ZXMushroom63/searchApi.js b/extensions/ZXMushroom63/searchApi.js index 9ff620ace1..4479aac0a6 100644 --- a/extensions/ZXMushroom63/searchApi.js +++ b/extensions/ZXMushroom63/searchApi.js @@ -14,7 +14,7 @@ getInfo() { return { id: "zxmushroom63searchparams", - name: "Search Params", + name: Scratch.translate("Search Params"), color1: "#b4b4b4", color2: "#9c9c9c", color3: "#646464", @@ -22,7 +22,7 @@ { opcode: "searchparam", blockType: Scratch.BlockType.REPORTER, - text: "value of search parameter [ID]", + text: Scratch.translate("value of search parameter [ID]"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -33,7 +33,7 @@ { opcode: "occurencesofsearchparam", blockType: Scratch.BlockType.REPORTER, - text: "occurences of search parameter [ID]", + text: Scratch.translate("occurrences of search parameter [ID]"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -44,7 +44,7 @@ { opcode: "indexedsearchparam", blockType: Scratch.BlockType.REPORTER, - text: "index [I] of search parameters [ID]", + text: Scratch.translate("index [I] of search parameters [ID]"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -59,7 +59,7 @@ { opcode: "setsearchparam", blockType: Scratch.BlockType.COMMAND, - text: "set search parameter [ID] to [VAL]", + text: Scratch.translate("set search parameter [ID] to [VAL]"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -74,7 +74,7 @@ { opcode: "deletesearchparam", blockType: Scratch.BlockType.COMMAND, - text: "delete search parameter [ID]", + text: Scratch.translate("delete search parameter [ID]"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -85,7 +85,9 @@ { opcode: "appendsearchparam", blockType: Scratch.BlockType.COMMAND, - text: "append search parameter [ID] with value [VAL]", + text: Scratch.translate( + "append search parameter [ID] with value [VAL]" + ), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -100,7 +102,7 @@ { opcode: "hassearchparam", blockType: Scratch.BlockType.BOOLEAN, - text: "has search parameter [ID]", + text: Scratch.translate("has search parameter [ID]?"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -111,12 +113,12 @@ { opcode: "searchparamslength", blockType: Scratch.BlockType.REPORTER, - text: "length of search parameters", + text: Scratch.translate("length of search parameters"), }, { opcode: "searchparamatindex", blockType: Scratch.BlockType.REPORTER, - text: "search parameter [PARAM] at index [I]", + text: Scratch.translate("search parameter [PARAM] at index [I]"), arguments: { PARAM: { type: Scratch.ArgumentType.STRING, @@ -132,7 +134,10 @@ menus: { PARAM: { acceptReporters: true, - items: ["value", "name"], + items: [ + { text: Scratch.translate("value"), value: "value" }, + { text: Scratch.translate("name"), value: "name" }, + ], }, }, }; diff --git a/extensions/ar.js b/extensions/ar.js index 77747da93e..4718ea38f0 100644 --- a/extensions/ar.js +++ b/extensions/ar.js @@ -523,25 +523,25 @@ { opcode: "enterAR", blockType: BlockType.COMMAND, - text: "enter AR mode", + text: Scratch.translate("enter AR mode"), arguments: {}, }, { opcode: "exitAR", blockType: BlockType.COMMAND, - text: "exit AR mode", + text: Scratch.translate("exit AR mode"), arguments: {}, }, { opcode: "isInAR", blockType: BlockType.BOOLEAN, - text: "is in AR?", + text: Scratch.translate("is in AR?"), arguments: {}, }, { opcode: "isFeatureAvailible", // unfixable typo blockType: BlockType.BOOLEAN, - text: "is [FEATURE] available?", + text: Scratch.translate("is [FEATURE] available?"), arguments: { FEATURE: { type: ArgumentType.STRING, @@ -554,25 +554,25 @@ { opcode: "getStageWidth", blockType: BlockType.REPORTER, - text: "stage width", + text: Scratch.translate("stage width"), arguments: {}, }, { opcode: "getStageHeight", blockType: BlockType.REPORTER, - text: "stage height", + text: Scratch.translate("stage height"), arguments: {}, }, "---", { opcode: "getMatrixItem", blockType: BlockType.REPORTER, - text: "item [ITEM] of [MATRIX] matrix", + text: Scratch.translate("item [ITEM] of [MATRIX] matrix"), arguments: { MATRIX: { type: ArgumentType.STRING, menu: "xrMatrix", - defaultValue: "combined", + defaultValue: Scratch.translate("combined"), }, ITEM: { type: ArgumentType.NUMBER, @@ -583,7 +583,7 @@ { opcode: "getPosition", blockType: BlockType.REPORTER, - text: "position [POSITION_COMPONENT]", + text: Scratch.translate("position [POSITION_COMPONENT]"), arguments: { POSITION_COMPONENT: { type: ArgumentType.STRING, @@ -595,7 +595,7 @@ { opcode: "getOrientation", blockType: BlockType.REPORTER, - text: "orientation [ORIENTATION_COMPONENT]", + text: Scratch.translate("orientation [ORIENTATION_COMPONENT]"), arguments: { ORIENTATION_COMPONENT: { type: ArgumentType.STRING, @@ -608,7 +608,7 @@ { opcode: "getHitPosition", blockType: BlockType.REPORTER, - text: "hit position [POSITION_COMPONENT]", + text: Scratch.translate("hit position [POSITION_COMPONENT]"), arguments: { POSITION_COMPONENT: { type: ArgumentType.STRING, @@ -621,7 +621,7 @@ { opcode: "moveSpaceBy", blockType: BlockType.COMMAND, - text: "move everything by x:[X] y:[Y] z:[Z]", + text: Scratch.translate("move everything by x:[X] y:[Y] z:[Z]"), arguments: { X: { type: ArgumentType.NUMBER, @@ -640,7 +640,9 @@ { opcode: "turnSpaceBy", blockType: BlockType.COMMAND, - text: "turn everything by r:[R] i:[I] j:[J] k:[K]", + text: Scratch.translate( + "turn everything by r:[R] i:[I] j:[J] k:[K]" + ), arguments: { R: { type: ArgumentType.NUMBER, @@ -664,7 +666,7 @@ { opcode: "setResolution", blockType: BlockType.COMMAND, - text: "set resolution [RESOLUTION]", + text: Scratch.translate("set resolution [RESOLUTION]"), arguments: { RESOLUTION: { type: ArgumentType.NUMBER, @@ -714,11 +716,26 @@ }, xrMatrix: { acceptReporters: false, - items: ["combined", "projection", "view", "inverse view"], + items: [ + { text: Scratch.translate("combined"), value: "combined" }, + { text: Scratch.translate("projection"), value: "projection" }, + { text: Scratch.translate("view"), value: "view" }, + { + text: Scratch.translate("inverse view"), + value: "inverse view", + }, + ], }, xrFeature: { acceptReporters: false, - items: ["ar", "pose", "hit position"], + items: [ + { text: Scratch.translate("ar"), value: "ar" }, + { text: Scratch.translate("pose"), value: "pose" }, + { + text: Scratch.translate("hit position"), + value: "hit position", + }, + ], }, }, }; diff --git a/extensions/cloudlink.js b/extensions/cloudlink.js index 019b59a45a..bc1d524eee 100644 --- a/extensions/cloudlink.js +++ b/extensions/cloudlink.js @@ -76,7 +76,7 @@ const version = { editorType: "TurboWarp", versionNumber: 2, - versionString: "0.1.2", + versionString: "0.1.3", // Styling/Parity and Translation Strings Update }; // Store extension state @@ -825,19 +825,19 @@ { opcode: "returnGlobalData", blockType: Scratch.BlockType.REPORTER, - text: "Global data" + text: Scratch.translate("global data") }, { opcode: "returnPrivateData", blockType: Scratch.BlockType.REPORTER, - text: "Private data" + text: Scratch.translate("private data") }, { opcode: "returnDirectData", blockType: Scratch.BlockType.REPORTER, - text: "Direct data" + text: Scratch.translate("direct data") }, "---", @@ -845,13 +845,13 @@ { opcode: "returnLinkData", blockType: Scratch.BlockType.REPORTER, - text: "Link status" + text: Scratch.translate("link status") }, { opcode: "returnStatusCode", blockType: Scratch.BlockType.REPORTER, - text: "Status code" + text: Scratch.translate("status code") }, "---", @@ -859,20 +859,20 @@ { opcode: "returnUserListData", blockType: Scratch.BlockType.REPORTER, - text: "Usernames" + text: Scratch.translate("usernames") }, { opcode: "returnUsernameDataNew", blockType: Scratch.BlockType.REPORTER, - text: "My username" + text: Scratch.translate("my username") }, { opcode: "returnUsernameData", blockType: Scratch.BlockType.REPORTER, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "(OLD - DO NOT USE IN NEW PROJECTS) My username" + text: Scratch.translate("(OLD - DO NOT USE IN NEW PROJECTS) my username") }, "---", @@ -880,25 +880,25 @@ { opcode: "returnVersionData", blockType: Scratch.BlockType.REPORTER, - text: "Extension version" + text: Scratch.translate("extension version") }, { opcode: "returnServerVersion", blockType: Scratch.BlockType.REPORTER, - text: "Server version" + text: Scratch.translate("server version") }, { opcode: "returnServerList", blockType: Scratch.BlockType.REPORTER, - text: "Server list" + text: Scratch.translate("server list") }, { opcode: "returnMOTD", blockType: Scratch.BlockType.REPORTER, - text: "Server MOTD" + text: Scratch.translate("server MOTD") }, "---", @@ -906,13 +906,13 @@ { opcode: "returnClientIP", blockType: Scratch.BlockType.REPORTER, - text: "My IP address" + text: Scratch.translate("my IP address") }, { opcode: "returnUserObject", blockType: Scratch.BlockType.REPORTER, - text: "My user object" + text: Scratch.translate("my user object") }, "---", @@ -920,7 +920,7 @@ { opcode: "returnListenerData", blockType: Scratch.BlockType.REPORTER, - text: "Response for listener [ID]", + text: Scratch.translate("response for listener [ID]"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -933,7 +933,7 @@ opcode: "readQueueSize", blockType: Scratch.BlockType.REPORTER, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "Size of queue for [TYPE]", + text: Scratch.translate("size of queue for [TYPE]"), arguments: { TYPE: { type: Scratch.ArgumentType.STRING, @@ -947,7 +947,7 @@ opcode: "readQueueData", blockType: Scratch.BlockType.REPORTER, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "Packet queue for [TYPE]", + text: Scratch.translate("packet queue for [TYPE]"), arguments: { TYPE: { type: Scratch.ArgumentType.STRING, @@ -962,11 +962,11 @@ { opcode: "returnVarData", blockType: Scratch.BlockType.REPORTER, - text: "[TYPE] [VAR] data", + text: Scratch.translate("[TYPE] [VAR] data"), arguments: { VAR: { type: Scratch.ArgumentType.STRING, - defaultValue: "Apple", + defaultValue: Scratch.translate("Apple"), }, TYPE: { type: Scratch.ArgumentType.STRING, @@ -982,7 +982,7 @@ opcode: "parseJSON", blockType: Scratch.BlockType.REPORTER, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "[PATH] of [JSON_STRING]", + text: Scratch.translate("[PATH] of [JSON_STRING]"), arguments: { PATH: { type: Scratch.ArgumentType.STRING, @@ -999,7 +999,7 @@ opcode: "getFromJSONArray", blockType: Scratch.BlockType.REPORTER, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: 'Get [NUM] from JSON array [ARRAY]', + text: Scratch.translate('[NUM] from JSON array [ARRAY]'), arguments: { NUM: { type: Scratch.ArgumentType.NUMBER, @@ -1016,7 +1016,7 @@ opcode: "makeJSON", blockType: Scratch.BlockType.REPORTER, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "Convert [toBeJSONified] to JSON", + text: Scratch.translate("convert [toBeJSONified] to JSON"), arguments: { toBeJSONified: { type: Scratch.ArgumentType.STRING, @@ -1029,7 +1029,7 @@ opcode: "isValidJSON", blockType: Scratch.BlockType.BOOLEAN, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "Is [JSON_STRING] valid JSON?", + text: Scratch.translate("is [JSON_STRING] valid JSON?"), arguments: { JSON_STRING: { type: Scratch.ArgumentType.STRING, @@ -1045,7 +1045,7 @@ opcode: "fetchURL", blockType: Scratch.BlockType.REPORTER, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "Fetch data from URL [url]", + text: Scratch.translate("fetch data from URL [url]"), arguments: { url: { type: Scratch.ArgumentType.STRING, @@ -1058,7 +1058,7 @@ opcode: "requestURL", blockType: Scratch.BlockType.REPORTER, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "Send request with method [method] for URL [url] with data [data] and headers [headers]", + text: Scratch.translate("send request with method [method] for URL [url] with data [data] and headers [headers]"), arguments: { method: { type: Scratch.ArgumentType.STRING, @@ -1084,14 +1084,14 @@ { opcode: "onConnect", blockType: Scratch.BlockType.EVENT, - text: "When connected", + text: Scratch.translate("when connected"), isEdgeActivated: false, // Gets called by runtime.startHats }, { opcode: "onClose", blockType: Scratch.BlockType.EVENT, - text: "When disconnected", + text: Scratch.translate("when disconnected"), isEdgeActivated: false, // Gets called by runtime.startHats }, @@ -1100,7 +1100,7 @@ { opcode: "onListener", blockType: Scratch.BlockType.HAT, - text: "When I receive new message with listener [ID]", + text: Scratch.translate("when I receive new message with listener [ID]"), isEdgeActivated: true, arguments: { ID: { @@ -1113,7 +1113,7 @@ { opcode: "onNewPacket", blockType: Scratch.BlockType.HAT, - text: "When I receive new [TYPE] message", + text: Scratch.translate("when I receive new [TYPE] message"), isEdgeActivated: true, arguments: { TYPE: { @@ -1127,7 +1127,7 @@ { opcode: "onNewVar", blockType: Scratch.BlockType.HAT, - text: "When I receive new [TYPE] data for [VAR]", + text: Scratch.translate("When I receive new [TYPE] data for [VAR]"), isEdgeActivated: true, arguments: { TYPE: { @@ -1137,7 +1137,7 @@ }, VAR: { type: Scratch.ArgumentType.STRING, - defaultValue: "Apple", + defaultValue: Scratch.translate("Apple"), }, }, }, @@ -1147,37 +1147,37 @@ { opcode: "getComState", blockType: Scratch.BlockType.BOOLEAN, - text: "Connected?", + text: Scratch.translate("connected?"), }, { opcode: "getRoomState", blockType: Scratch.BlockType.BOOLEAN, - text: "Linked to rooms?", + text: Scratch.translate("linked to rooms?"), }, { opcode: "getComLostConnectionState", blockType: Scratch.BlockType.BOOLEAN, - text: "Lost connection?", + text: Scratch.translate("lost connection?"), }, { opcode: "getComFailedConnectionState", blockType: Scratch.BlockType.BOOLEAN, - text: "Failed to connnect?", + text: Scratch.translate("failed to connnect?"), }, { opcode: "getUsernameState", blockType: Scratch.BlockType.BOOLEAN, - text: "Username synced?", + text: Scratch.translate("username synced?"), }, { opcode: "returnIsNewData", blockType: Scratch.BlockType.BOOLEAN, - text: "Got New [TYPE]?", + text: Scratch.translate("got new [TYPE]?"), arguments: { TYPE: { type: Scratch.ArgumentType.STRING, @@ -1190,16 +1190,16 @@ { opcode: "returnIsNewVarData", blockType: Scratch.BlockType.BOOLEAN, - text: "Got New [TYPE] data for variable [VAR]?", + text: Scratch.translate("got new [TYPE] data for variable [VAR]?"), arguments: { TYPE: { type: Scratch.ArgumentType.STRING, menu: "varmenu", - defaultValue: 'Global variables', + defaultValue: "Global variables", }, VAR: { type: Scratch.ArgumentType.STRING, - defaultValue: "Apple", + defaultValue: Scratch.translate("Apple"), }, }, }, @@ -1207,7 +1207,7 @@ { opcode: "returnIsNewListener", blockType: Scratch.BlockType.BOOLEAN, - text: "Got new packet with listener [ID]?", + text: Scratch.translate("got new packet with listener [ID]?"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -1219,11 +1219,11 @@ { opcode: "checkForID", blockType: Scratch.BlockType.BOOLEAN, - text: "ID [ID] connected?", + text: Scratch.translate("ID [ID] connected?"), arguments: { ID: { type: Scratch.ArgumentType.STRING, - defaultValue: "Another name", + defaultValue: Scratch.translate("Another name"), }, }, }, @@ -1233,7 +1233,7 @@ { opcode: "openSocket", blockType: Scratch.BlockType.COMMAND, - text: "Connect to [IP]", + text: Scratch.translate("connect to [IP]"), arguments: { IP: { type: Scratch.ArgumentType.STRING, @@ -1245,7 +1245,7 @@ { opcode: "openSocketPublicServers", blockType: Scratch.BlockType.COMMAND, - text: "Connect to server [ID]", + text: Scratch.translate("connect to server [ID]"), arguments: { ID: { type: Scratch.ArgumentType.NUMBER, @@ -1257,7 +1257,7 @@ { opcode: "closeSocket", blockType: Scratch.BlockType.COMMAND, - text: "Disconnect" + text: Scratch.translate("disconnect") }, "---", @@ -1265,11 +1265,11 @@ { opcode: "setMyName", blockType: Scratch.BlockType.COMMAND, - text: "Set [NAME] as username", + text: Scratch.translate("set [NAME] as username"), arguments: { NAME: { type: Scratch.ArgumentType.STRING, - defaultValue: "A name", + defaultValue: Scratch.translate("A name"), }, }, }, @@ -1279,7 +1279,7 @@ { opcode: "createListener", blockType: Scratch.BlockType.COMMAND, - text: "Attach listener [ID] to next packet", + text: Scratch.translate("attach listener [ID] to next packet"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -1294,11 +1294,11 @@ { opcode: 'linkToRooms', blockType: Scratch.BlockType.COMMAND, - text: "Link to room(s) [ROOMS]", + text: Scratch.translate("link to room(s) [ROOMS]"), arguments: { ROOMS: { type: Scratch.ArgumentType.STRING, - defaultValue: '["test"]', + defaultValue: Scratch.translate('["test"]'), }, } }, @@ -1306,11 +1306,11 @@ { opcode: "selectRoomsInNextPacket", blockType: Scratch.BlockType.COMMAND, - text: "Select room(s) [ROOMS] for next packet", + text: Scratch.translate("select room(s) [ROOMS] for next packet"), arguments: { ROOMS: { type: Scratch.ArgumentType.STRING, - defaultValue: '["test"]', + defaultValue: Scratch.translate('["test"]'), }, }, }, @@ -1318,7 +1318,7 @@ { opcode: "unlinkFromRooms", blockType: Scratch.BlockType.COMMAND, - text: "Unlink from all rooms", + text: Scratch.translate("unlink from all rooms"), }, "---", @@ -1326,11 +1326,11 @@ { opcode: "sendGData", blockType: Scratch.BlockType.COMMAND, - text: "Send [DATA]", + text: Scratch.translate("send [DATA]"), arguments: { DATA: { type: Scratch.ArgumentType.STRING, - defaultValue: "Apple", + defaultValue: Scratch.translate("Apple"), }, }, }, @@ -1338,15 +1338,15 @@ { opcode: "sendPData", blockType: Scratch.BlockType.COMMAND, - text: "Send [DATA] to [ID]", + text: Scratch.translate("send [DATA] to [ID]"), arguments: { DATA: { type: Scratch.ArgumentType.STRING, - defaultValue: "Apple", + defaultValue: Scratch.translate("Apple"), }, ID: { type: Scratch.ArgumentType.STRING, - defaultValue: "Another name", + defaultValue: Scratch.translate("Another name"), }, }, }, @@ -1354,15 +1354,15 @@ { opcode: "sendGDataAsVar", blockType: Scratch.BlockType.COMMAND, - text: "Send variable [VAR] with data [DATA]", + text: Scratch.translate("send variable [VAR] with data [DATA]"), arguments: { DATA: { type: Scratch.ArgumentType.STRING, - defaultValue: "Banana", + defaultValue: Scratch.translate("Banana"), }, VAR: { type: Scratch.ArgumentType.STRING, - defaultValue: "Apple", + defaultValue: Scratch.translate("Apple"), }, }, }, @@ -1370,19 +1370,19 @@ { opcode: "sendPDataAsVar", blockType: Scratch.BlockType.COMMAND, - text: "Send variable [VAR] to [ID] with data [DATA]", + text: Scratch.translate("send variable [VAR] to [ID] with data [DATA]"), arguments: { DATA: { type: Scratch.ArgumentType.STRING, - defaultValue: "Banana", + defaultValue: Scratch.translate("Banana"), }, ID: { type: Scratch.ArgumentType.STRING, - defaultValue: "Another name", + defaultValue: Scratch.translate("Another name"), }, VAR: { type: Scratch.ArgumentType.STRING, - defaultValue: "Apple", + defaultValue: Scratch.translate("Apple"), }, }, }, @@ -1393,15 +1393,15 @@ opcode: "runCMDnoID", blockType: Scratch.BlockType.COMMAND, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "Send command without ID [CMD] [DATA]", + text: Scratch.translate("send command without ID [CMD] [DATA]"), arguments: { CMD: { type: Scratch.ArgumentType.STRING, - defaultValue: "direct", + defaultValue: Scratch.translate("direct"), }, DATA: { type: Scratch.ArgumentType.STRING, - defaultValue: "val", + defaultValue: Scratch.translate("val"), }, }, }, @@ -1410,19 +1410,19 @@ opcode: "runCMD", blockType: Scratch.BlockType.COMMAND, hideFromPalette: clVars.hideCLDeprecatedBlocks, - text: "Send command [CMD] [ID] [DATA]", + text: Scratch.translate("send command [CMD] [ID] [DATA]"), arguments: { CMD: { type: Scratch.ArgumentType.STRING, - defaultValue: "direct", + defaultValue: Scratch.translate("direct"), }, ID: { type: Scratch.ArgumentType.STRING, - defaultValue: "id", + defaultValue: Scratch.translate("id"), }, DATA: { type: Scratch.ArgumentType.STRING, - defaultValue: "val", + defaultValue: Scratch.translate("val"), }, }, }, @@ -1432,7 +1432,7 @@ { opcode: "resetNewData", blockType: Scratch.BlockType.COMMAND, - text: "Reset got new [TYPE] status", + text: Scratch.translate("reset got new [TYPE] status"), arguments: { TYPE: { type: Scratch.ArgumentType.STRING, @@ -1445,7 +1445,7 @@ { opcode: "resetNewVarData", blockType: Scratch.BlockType.COMMAND, - text: "Reset got new [TYPE] [VAR] status", + text: Scratch.translate("reset got new [TYPE] [VAR] status"), arguments: { TYPE: { type: Scratch.ArgumentType.STRING, @@ -1454,7 +1454,7 @@ }, VAR: { type: Scratch.ArgumentType.STRING, - defaultValue: "Apple", + defaultValue: Scratch.translate("Apple"), }, }, }, @@ -1464,7 +1464,7 @@ { opcode: "resetNewListener", blockType: Scratch.BlockType.COMMAND, - text: "Reset got new [ID] listener status", + text: Scratch.translate("reset got new [ID] listener status"), arguments: { ID: { type: Scratch.ArgumentType.STRING, @@ -1478,7 +1478,7 @@ { opcode: "clearAllPackets", blockType: Scratch.BlockType.COMMAND, - text: "Clear all packets for [TYPE]", + text: Scratch.translate("clear all packets for [TYPE]"), arguments: { TYPE: { type: Scratch.ArgumentType.STRING, @@ -1493,14 +1493,14 @@ { func: "showOldBlocks", blockType: Scratch.BlockType.BUTTON, - text: "Show old blocks", + text: Scratch.translate("Show old blocks"), hideFromPalette: !clVars.hideCLDeprecatedBlocks, }, { func: "hideOldBlocks", blockType: Scratch.BlockType.BUTTON, - text: "Hide old blocks", + text: Scratch.translate("Hide old blocks"), hideFromPalette: clVars.hideCLDeprecatedBlocks, }, @@ -1509,16 +1509,39 @@ ], menus: { datamenu: { - items: ['Global data', 'Private data', 'Direct data', 'Status code'] + items: [ + {text: Scratch.translate('Global data'), value: 'Global data'}, + {text: Scratch.translate('Private data'), value: 'Private data'}, + {text: Scratch.translate('Direct data'), value: 'Direct data'}, + {text: Scratch.translate('Status code'), value: 'Status code'} + ] }, varmenu: { - items: ['Global variables', 'Private variables'] + items: [ + {text: Scratch.translate('Global variables'), value: "Global variables"}, + {text: Scratch.translate('Private variables'), value: "Private variables"} + ] }, allmenu: { - items: ['Global data', 'Private data', 'Direct data', 'Status code', "Global variables", "Private variables", "All data"] + items: [ + {text: Scratch.translate('Global data'), value: 'Global data'}, + {text: Scratch.translate('Private data'), value: 'Private data'}, + {text: Scratch.translate('Direct data'), value: 'Direct data'}, + {text: Scratch.translate('Status code'), value: 'Status code'}, + {text: Scratch.translate("Global variables"), value: "Global variables"}, + {text: Scratch.translate("Private variables"), value: "Private variables"}, + {text: Scratch.translate("All data"), value: "All data"} + ] }, almostallmenu: { - items: ['Global data', 'Private data', 'Direct data', 'Status code', "Global variables", "Private variables"] + items: [ + {text: Scratch.translate('Global data'), value: 'Global data'}, + {text: Scratch.translate('Private data'), value: 'Private data'}, + {text: Scratch.translate('Direct data'), value: 'Direct data'}, + {text: Scratch.translate('Status code'), value: 'Status code'}, + {text: Scratch.translate("Global variables"), value: "Global variables"}, + {text: Scratch.translate("Private variables"), value: "Private variables"} + ] }, } }; diff --git a/extensions/codeGIO/ExtraUtilities.js b/extensions/codeGIO/ExtraUtilities.js index a88fee3591..7332a89da4 100644 --- a/extensions/codeGIO/ExtraUtilities.js +++ b/extensions/codeGIO/ExtraUtilities.js @@ -4,20 +4,20 @@ getInfo() { return { id: "utilitiesCodegio", - name: "Utilities", + name: Scratch.translate("Utilities"), color1: "#0fbd8c", blocks: [ { opcode: "newline", blockType: Scratch.BlockType.REPORTER, - text: "New Line", + text: Scratch.translate("new line"), }, { opcode: "strict_equality", blockType: Scratch.BlockType.BOOLEAN, - text: "Strict Equality | [one]=[two]", + text: Scratch.translate("strictly [one] = [two]?"), arguments: { one: { type: Scratch.ArgumentType.STRING, @@ -33,19 +33,19 @@ { opcode: "returntrue", blockType: Scratch.BlockType.BOOLEAN, - text: "true", + text: Scratch.translate("true"), }, { opcode: "returnfalse", blockType: Scratch.BlockType.BOOLEAN, - text: "false", + text: Scratch.translate("false"), }, { opcode: "exponent", blockType: Scratch.BlockType.REPORTER, - text: "[one] ^ [two]", + text: Scratch.translate("[one] ^ [two]"), arguments: { one: { type: Scratch.ArgumentType.NUMBER, @@ -61,7 +61,7 @@ { opcode: "color", blockType: Scratch.BlockType.REPORTER, - text: "Hex [color]", + text: Scratch.translate("hex: [color]"), arguments: { color: { type: Scratch.ArgumentType.COLOR, @@ -73,35 +73,35 @@ { opcode: "monitor_width", blockType: Scratch.BlockType.REPORTER, - text: "Screen | Width", + text: Scratch.translate("screen width"), }, { opcode: "monitor_height", blockType: Scratch.BlockType.REPORTER, - text: "Screen | Height", + text: Scratch.translate("screen height"), }, { opcode: "window_width", blockType: Scratch.BlockType.REPORTER, - text: "Window | Width", + text: Scratch.translate("window width"), }, { opcode: "window_height", blockType: Scratch.BlockType.REPORTER, - text: "Window | Height", + text: Scratch.translate("window height"), }, { opcode: "alert_ext", blockType: Scratch.BlockType.COMMAND, - text: "Alert | Text: [one]", + text: Scratch.translate("alert: [one]"), arguments: { one: { type: Scratch.ArgumentType.STRING, - defaultValue: "Alert...", + defaultValue: Scratch.translate("Alert"), }, }, }, @@ -109,11 +109,11 @@ { opcode: "confirm_ext", blockType: Scratch.BlockType.BOOLEAN, - text: "Confirm | Text: [one]", + text: Scratch.translate("confirm: [one]"), arguments: { one: { type: Scratch.ArgumentType.STRING, - defaultValue: "Confirm...", + defaultValue: Scratch.translate("Confirm"), }, }, }, @@ -121,11 +121,11 @@ { opcode: "prompt_ext", blockType: Scratch.BlockType.REPORTER, - text: "Prompt | Text: [one] Default: [two]", + text: Scratch.translate("prompt [one] with default: [two]"), arguments: { one: { type: Scratch.ArgumentType.STRING, - defaultValue: "Enter Username:", + defaultValue: Scratch.translate("Enter Username"), }, two: { type: Scratch.ArgumentType.STRING, @@ -137,7 +137,7 @@ { opcode: "open_link", blockType: Scratch.BlockType.COMMAND, - text: "Open | Link: [one]", + text: Scratch.translate("open link: [one]"), arguments: { one: { type: Scratch.ArgumentType.STRING, @@ -149,7 +149,7 @@ { opcode: "redirect", blockType: Scratch.BlockType.COMMAND, - text: "Redirect | Link: [one]", + text: Scratch.translate("redirect to: [one]"), arguments: { one: { type: Scratch.ArgumentType.STRING, @@ -161,19 +161,19 @@ { opcode: "get_current_url", blockType: Scratch.BlockType.REPORTER, - text: "Current URL", + text: Scratch.translate("current URL"), }, { opcode: "get_current_url_hash", blockType: Scratch.BlockType.REPORTER, - text: "Current URL hash (#)", + text: Scratch.translate("current URL hash (#)"), }, { opcode: "set_clipboard", blockType: Scratch.BlockType.COMMAND, - text: "Set clipboard | Text: [one]", + text: Scratch.translate("set clipboard to: [one]"), arguments: { one: { type: Scratch.ArgumentType.STRING, @@ -185,29 +185,31 @@ { opcode: "get_clipboard", blockType: Scratch.BlockType.REPORTER, - text: "Clipboard", + text: Scratch.translate("clipboard"), }, { opcode: "get_browser", blockType: Scratch.BlockType.REPORTER, - text: "Browser", + text: Scratch.translate("browser"), }, { opcode: "get_os", blockType: Scratch.BlockType.REPORTER, - text: "Operating System", + text: Scratch.translate("operating system"), }, { opcode: "consoleLog", blockType: Scratch.BlockType.COMMAND, - text: "Console | Log: [input] Font: [font] Size [size] Color [color]", + text: Scratch.translate( + "console log [input] with font: [font] size: [size] and color: [color]" + ), arguments: { input: { type: Scratch.ArgumentType.STRING, - defaultValue: "Hello World!", + defaultValue: Scratch.translate("Hello World!"), }, font: { type: Scratch.ArgumentType.STRING, @@ -228,7 +230,7 @@ { opcode: "consoleClear", blockType: Scratch.BlockType.COMMAND, - text: "Console | Clear", + text: Scratch.translate("clear console"), }, ], menus: { diff --git a/extensions/cs2627883/numericalencoding.js b/extensions/cs2627883/numericalencoding.js index decd885ef8..28bf7709c8 100644 --- a/extensions/cs2627883/numericalencoding.js +++ b/extensions/cs2627883/numericalencoding.js @@ -64,7 +64,7 @@ { opcode: "NumericalEncode", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Encode [DATA] to numbers"), + text: Scratch.translate("encode [DATA] to numbers"), arguments: { DATA: { type: Scratch.ArgumentType.STRING, @@ -75,7 +75,7 @@ { opcode: "NumericalDecode", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Decode [ENCODED] back to text"), + text: Scratch.translate("decode [ENCODED] back to text"), arguments: { ENCODED: { type: Scratch.ArgumentType.STRING, diff --git a/extensions/encoding.js b/extensions/encoding.js index f70b1aa2ab..996414ac0b 100644 --- a/extensions/encoding.js +++ b/extensions/encoding.js @@ -423,7 +423,7 @@ { opcode: "encode", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Encode [string] in [code]"), + text: Scratch.translate("encode [string] in [code]"), arguments: { string: { type: Scratch.ArgumentType.STRING, @@ -439,7 +439,7 @@ { opcode: "decode", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Decode [string] with [code]"), + text: Scratch.translate("decode [string] with [code]"), arguments: { string: { type: Scratch.ArgumentType.STRING, @@ -455,7 +455,7 @@ { opcode: "hash", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Hash [string] with [hash]"), + text: Scratch.translate("hash [string] with [hash]"), arguments: { string: { type: Scratch.ArgumentType.STRING, @@ -475,7 +475,7 @@ opcode: "Conversioncodes", blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Convert the character [string] to [CodeList]" + "convert the character [string] to [CodeList]" ), arguments: { string: { @@ -514,7 +514,7 @@ opcode: "Randomstrings", blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Randomly generated [position] character string" + "randomly generated [position] character string" ), arguments: { position: { @@ -527,7 +527,7 @@ opcode: "Fontgenerationstring", blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Use [wordbank] to generate a random [position] character string" + "use [wordbank] to generate a random [position] character string" ), arguments: { wordbank: { diff --git a/extensions/gamejolt.js b/extensions/gamejolt.js index b8e016bb78..713f508965 100644 --- a/extensions/gamejolt.js +++ b/extensions/gamejolt.js @@ -1407,8 +1407,8 @@ blockType: Scratch.BlockType.BOOLEAN, text: Scratch.translate({ id: "GameJoltAPI_gamejoltBool", - default: "On Game Jolt?", - description: 'Keep "Game Jolt" as is.', + default: "on game jolt?", + description: 'Keep "game jolt" as is.', }), }, { @@ -1420,7 +1420,7 @@ blockIconURI: icons.main, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Set game ID to [ID] and private key to [key]" + "set game ID to [ID] and private key to [key]" ), arguments: { ID: { @@ -1456,13 +1456,13 @@ opcode: "sessionPing", blockIconURI: icons.main, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Ping session"), + text: Scratch.translate("ping session"), }, { opcode: "sessionSetStatus", blockIconURI: icons.main, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Set session status to [status]"), + text: Scratch.translate("set session status to [status]"), arguments: { status: { type: Scratch.ArgumentType.STRING, @@ -1475,18 +1475,18 @@ opcode: "sessionBool", blockIconURI: icons.main, blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Session open?"), + text: Scratch.translate("session open?"), disableMonitor: true, }, { blockType: Scratch.BlockType.LABEL, - text: Scratch.translate("User Blocks"), + text: Scratch.translate("user Blocks"), }, { opcode: "loginManual", blockIconURI: icons.user, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Login with [username] and [token]"), + text: Scratch.translate("login with [username] and [token]"), arguments: { username: { type: Scratch.ArgumentType.STRING, @@ -1502,38 +1502,38 @@ opcode: "loginAuto", blockIconURI: icons.user, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Login automatically"), + text: Scratch.translate("login automatically"), }, { opcode: "loginAutoBool", blockIconURI: icons.user, blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Autologin available?"), + text: Scratch.translate("auto login available?"), }, { opcode: "logout", blockIconURI: icons.user, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Logout"), + text: Scratch.translate("logout"), }, { opcode: "loginBool", blockIconURI: icons.user, blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Logged in?"), + text: Scratch.translate("logged in?"), }, { opcode: "loginUser", blockIconURI: icons.user, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Logged in user's username"), + text: Scratch.translate("logged in user's username"), }, { opcode: "userFetch", blockIconURI: icons.user, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Fetch user's [usernameOrID] by [fetchType]" + "fetch user's [usernameOrID] by [fetchType]" ), arguments: { usernameOrID: { @@ -1551,13 +1551,13 @@ opcode: "userFetchCurrent", blockIconURI: icons.user, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch logged in user"), + text: Scratch.translate("fetch logged in user"), }, { opcode: "returnUserData", blockIconURI: icons.user, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched user's [userDataType]"), + text: Scratch.translate("fetched user's [userDataType]"), arguments: { userDataType: { type: Scratch.ArgumentType.STRING, @@ -1570,14 +1570,14 @@ opcode: "returnUserDataJson", blockIconURI: icons.user, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched user's data in JSON"), + text: Scratch.translate("fetched user's data in JSON"), }, { hideFromPalette: true, opcode: "friendsFetch", blockIconURI: icons.user, blockType: Scratch.BlockType.REPORTER, - text: "Fetched user's friend ID at index[index] (Deprecated)", + text: "fetched user's friend ID at index[index] (Deprecated)", arguments: { index: { type: Scratch.ArgumentType.NUMBER, @@ -1589,13 +1589,13 @@ opcode: "friendsFetchNew", blockIconURI: icons.user, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch user's friend IDs"), + text: Scratch.translate("fetch user's friend IDs"), }, { opcode: "friendsReturn", blockIconURI: icons.user, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched user's friend ID at index[index]"), + text: Scratch.translate("fetched user's friend ID at index[index]"), arguments: { index: { type: Scratch.ArgumentType.NUMBER, @@ -1607,7 +1607,7 @@ opcode: "friendsReturnJson", blockIconURI: icons.user, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched user's friend IDs in JSON"), + text: Scratch.translate("fetched user's friend IDs in JSON"), }, { blockType: Scratch.BlockType.LABEL, @@ -1617,7 +1617,7 @@ opcode: "trophyAchieve", blockIconURI: icons.trophy, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Achieve trophy of ID [ID]"), + text: Scratch.translate("achieve trophy of ID [ID]"), arguments: { ID: { type: Scratch.ArgumentType.NUMBER, @@ -1629,7 +1629,7 @@ opcode: "trophyRemove", blockIconURI: icons.trophy, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Remove trophy of ID [ID]"), + text: Scratch.translate("remove trophy of ID [ID]"), arguments: { ID: { type: Scratch.ArgumentType.NUMBER, @@ -1642,7 +1642,7 @@ opcode: "trophyFetch", blockIconURI: icons.trophy, blockType: Scratch.BlockType.REPORTER, - text: "Fetched trophy [trophyDataType] at [indexOrID][value] (Deprecated)", + text: "fetched trophy [trophyDataType] at [indexOrID][value] (Deprecated)", arguments: { trophyDataType: { type: Scratch.ArgumentType.STRING, @@ -1664,7 +1664,7 @@ opcode: "trophyFetchId", blockIconURI: icons.trophy, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch trophy of ID[ID]"), + text: Scratch.translate("fetch trophy of ID[ID]"), arguments: { ID: { type: Scratch.ArgumentType.NUMBER, @@ -1676,7 +1676,7 @@ opcode: "trophyFetchAll", blockIconURI: icons.trophy, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch [trophyFetchGroup] trophies"), + text: Scratch.translate("fetch [trophyFetchGroup] trophies"), arguments: { trophyFetchGroup: { type: Scratch.ArgumentType.STRING, @@ -1690,7 +1690,7 @@ blockIconURI: icons.trophy, blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Fetched trophy [trophyDataType] at index [index]" + "fetched trophy [trophyDataType] at index [index]" ), arguments: { trophyDataType: { @@ -1708,7 +1708,7 @@ opcode: "trophyReturnJson", blockIconURI: icons.trophy, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched trophies in JSON"), + text: Scratch.translate("fetched trophies in JSON"), }, { blockType: Scratch.BlockType.LABEL, @@ -1719,7 +1719,7 @@ blockIconURI: icons.score, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Add score [value] in table of ID [ID] with text [text] and comment [extraData]" + "add score [value] in table of ID [ID] with text [text] and comment [extraData]" ), arguments: { ID: { @@ -1745,7 +1745,7 @@ blockIconURI: icons.score, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Add [username] score [value] in table of ID [ID] with text [text] and comment [extraData]" + "add [username] score [value] in table of ID [ID] with text [text] and comment [extraData]" ), arguments: { ID: { @@ -1775,7 +1775,7 @@ blockIconURI: icons.score, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Fetch [amount] [globalOrPerUser] score/s in table of ID [ID]" + "fetch [amount] [globalOrPerUser] score/s in table of ID [ID]" ), arguments: { amount: { @@ -1798,7 +1798,7 @@ blockIconURI: icons.score, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Fetch [amount] [globalOrPerUser] score/s [betterOrWorse] than [value] in table of ID [ID]" + "fetch [amount] [globalOrPerUser] score/s [betterOrWorse] than [value] in table of ID [ID]" ), arguments: { amount: { @@ -1830,7 +1830,7 @@ blockIconURI: icons.score, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Fetch [amount] [username] score/s in table of ID [ID]" + "fetch [amount] [username] score/s in table of ID [ID]" ), arguments: { amount: { @@ -1852,7 +1852,7 @@ blockIconURI: icons.score, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Fetch [amount] [username] score/s [betterOrWorse] than [value] in table of ID [ID]" + "fetch [amount] [username] score/s [betterOrWorse] than [value] in table of ID [ID]" ), arguments: { amount: { @@ -1883,7 +1883,7 @@ blockIconURI: icons.score, blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Fetched score [scoreDataType] at index [index]" + "fetched score [scoreDataType] at index [index]" ), arguments: { scoreDataType: { @@ -1901,14 +1901,14 @@ opcode: "returnScoreDataJson", blockIconURI: icons.score, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched score data in JSON"), + text: Scratch.translate("fetched score data in JSON"), }, { opcode: "scoreGetRank", blockIconURI: icons.score, blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Fetched rank of [value] in table of ID [ID]" + "fetched rank of [value] in table of ID [ID]" ), arguments: { value: { @@ -1927,7 +1927,7 @@ blockIconURI: icons.score, blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Fetched table [tableDataType] at index[index] (Deprecated)" + "fetched table [tableDataType] at index[index] (Deprecated)" ), arguments: { tableDataType: { @@ -1945,14 +1945,14 @@ opcode: "scoreFetchTables", blockIconURI: icons.score, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch score tables"), + text: Scratch.translate("fetch score tables"), }, { opcode: "scoreReturnTables", blockIconURI: icons.score, blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Fetched table [tableDataType] at index [index]" + "fetched table [tableDataType] at index [index]" ), arguments: { tableDataType: { @@ -1970,7 +1970,7 @@ opcode: "scoreReturnTablesJson", blockIconURI: icons.score, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched tables in JSON"), + text: Scratch.translate("fetched tables in JSON"), }, { blockType: Scratch.BlockType.LABEL, @@ -1981,7 +1981,7 @@ blockIconURI: icons.store, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Set [globalOrPerUser] data at [key] to [data]" + "set [globalOrPerUser] data at [key] to [data]" ), arguments: { globalOrPerUser: { @@ -2003,7 +2003,7 @@ opcode: "dataStoreFetch", blockIconURI: icons.store, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched [globalOrPerUser] data at [key]"), + text: Scratch.translate("fetched [globalOrPerUser] data at [key]"), arguments: { globalOrPerUser: { type: Scratch.ArgumentType.STRING, @@ -2021,7 +2021,7 @@ blockIconURI: icons.store, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Update [globalOrPerUser] data at [key] by [operationType] [value]" + "update [globalOrPerUser] data at [key] by [operationType] [value]" ), arguments: { globalOrPerUser: { @@ -2048,7 +2048,7 @@ opcode: "dataStoreRemove", blockIconURI: icons.store, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Remove [globalOrPerUser] data at [key]"), + text: Scratch.translate("remove [globalOrPerUser] data at [key]"), arguments: { globalOrPerUser: { type: Scratch.ArgumentType.STRING, @@ -2066,7 +2066,7 @@ opcode: "dataStoreGetKey", blockIconURI: icons.store, blockType: Scratch.BlockType.REPORTER, - text: "Fetched [globalOrPerUser] keys with pattern [pattern] at index [index] (Deprecated)", + text: "fetched [globalOrPerUser] keys with pattern [pattern] at index [index] (Deprecated)", arguments: { globalOrPerUser: { type: Scratch.ArgumentType.STRING, @@ -2087,7 +2087,7 @@ opcode: "dataStoreFetchKeys", blockIconURI: icons.store, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch all [globalOrPerUser] keys"), + text: Scratch.translate("fetch all [globalOrPerUser] keys"), arguments: { globalOrPerUser: { type: Scratch.ArgumentType.STRING, @@ -2101,7 +2101,7 @@ blockIconURI: icons.store, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Fetch [globalOrPerUser] keys matching with [pattern]" + "fetch [globalOrPerUser] keys matching with [pattern]" ), arguments: { globalOrPerUser: { @@ -2119,7 +2119,7 @@ opcode: "dataStoreReturnKeys", blockIconURI: icons.store, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched key at index [index]"), + text: Scratch.translate("fetched key at index [index]"), arguments: { index: { type: Scratch.ArgumentType.NUMBER, @@ -2131,7 +2131,7 @@ opcode: "dataStoreReturnKeysJson", blockIconURI: icons.store, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched keys in JSON"), + text: Scratch.translate("fetched keys in JSON"), }, { blockType: Scratch.BlockType.LABEL, @@ -2142,7 +2142,7 @@ opcode: "timeFetch", blockIconURI: icons.time, blockType: Scratch.BlockType.REPORTER, - text: "Server's current [timeType] (Deprecated)", + text: "server's current [timeType] (Deprecated)", arguments: { timeType: { type: Scratch.ArgumentType.STRING, @@ -2155,13 +2155,13 @@ opcode: "timeFetchNew", blockIconURI: icons.time, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch server's time"), + text: Scratch.translate("fetch server's time"), }, { opcode: "timeReturn", blockIconURI: icons.time, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched server's [timeType]"), + text: Scratch.translate("fetched server's [timeType]"), arguments: { timeType: { type: Scratch.ArgumentType.STRING, @@ -2174,18 +2174,18 @@ opcode: "timeReturnJson", blockIconURI: icons.time, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched server's time in JSON"), + text: Scratch.translate("fetched server's time in JSON"), }, { blockType: Scratch.BlockType.LABEL, - text: "Batch Blocks", + text: Scratch.translate("Batch Blocks"), }, { opcode: "batchAdd", blockIconURI: icons.batch, blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Add [namespace] request with [parameters] to batch" + "add [namespace] request with [parameters] to batch" ), arguments: { namespace: { @@ -2202,19 +2202,19 @@ opcode: "batchClear", blockIconURI: icons.batch, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Clear batch"), + text: Scratch.translate("clear batch"), }, { opcode: "batchJson", blockIconURI: icons.batch, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Batch in JSON"), + text: Scratch.translate("batch in JSON"), }, { opcode: "batchCall", blockIconURI: icons.batch, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch batch [parameter]"), + text: Scratch.translate("fetch batch [parameter]"), arguments: { parameter: { type: Scratch.ArgumentType.STRING, @@ -2227,7 +2227,7 @@ opcode: "batchReturnJson", blockIconURI: icons.batch, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Fetched batch data in JSON"), + text: Scratch.translate("fetched batch data in JSON"), }, { blockType: Scratch.BlockType.LABEL, @@ -2237,7 +2237,7 @@ opcode: "debug", blockIconURI: icons.debug, blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Turn debug mode [toggle]"), + text: Scratch.translate("turn debug mode [toggle]"), arguments: { toggle: { type: Scratch.ArgumentType.STRING, @@ -2250,13 +2250,13 @@ opcode: "debugBool", blockIconURI: icons.debug, blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("In debug mode?"), + text: Scratch.translate("in debug mode?"), }, { opcode: "debugLastErr", blockIconURI: icons.debug, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Last API error"), + text: Scratch.translate("last API error"), }, ], menus: { diff --git a/extensions/godslayerakp/http.js b/extensions/godslayerakp/http.js index 0aa997d8f9..b552c6560e 100644 --- a/extensions/godslayerakp/http.js +++ b/extensions/godslayerakp/http.js @@ -246,38 +246,38 @@ { opcode: "clearAll", blockType: BlockType.COMMAND, - text: "clear current data", + text: Scratch.translate("clear current data"), }, { blockType: Scratch.BlockType.LABEL, - text: "Response", + text: Scratch.translate("Response"), }, { opcode: "resData", blockType: BlockType.REPORTER, - text: "response", + text: Scratch.translate("response"), }, { opcode: "error", blockType: BlockType.REPORTER, - text: "error", + text: Scratch.translate("error"), }, { opcode: "status", blockType: BlockType.REPORTER, - text: "status", + text: Scratch.translate("status"), }, { opcode: "statusText", blockType: BlockType.REPORTER, - text: "status text", + text: Scratch.translate("status text"), }, "---", { opcode: "getHeaderJSON", blockType: BlockType.REPORTER, disableMonitor: true, - text: "get headers as json", + text: Scratch.translate("headers as json"), }, { opcode: "getHeaderValue", @@ -285,42 +285,43 @@ arguments: { name: { type: ArgumentType.STRING, + defaultValue: "name", }, }, - text: "get [name] from header", + text: Scratch.translate("[name] from header"), }, "---", { opcode: "requestComplete", blockType: BlockType.BOOLEAN, - text: "site responded?", + text: Scratch.translate("site responded?"), }, { opcode: "requestFail", blockType: BlockType.BOOLEAN, - text: "request failed?", + text: Scratch.translate("request failed?"), }, { opcode: "requestSuccess", blockType: BlockType.BOOLEAN, - text: "request succeeded?", + text: Scratch.translate("request succeeded?"), }, "---", { opcode: "onResponse", blockType: BlockType.EVENT, isEdgeActivated: false, - text: "when a site responds", + text: Scratch.translate("when a site responds"), }, { opcode: "onFail", blockType: BlockType.EVENT, isEdgeActivated: false, - text: "when a request fails", + text: Scratch.translate("when a request fails"), }, { blockType: Scratch.BlockType.LABEL, - text: "Request", + text: Scratch.translate("Request"), }, { opcode: "setMimeType", @@ -332,7 +333,7 @@ defaultValue: this.request.mimeType, }, }, - text: "set content type to [type]", + text: Scratch.translate("set content type to [type]"), }, { opcode: "setRequestmethod", @@ -344,7 +345,7 @@ defaultValue: this.request.method, }, }, - text: "set request method to [method]", + text: Scratch.translate("set request method to [method]"), }, { opcode: "setHeaderData", @@ -359,7 +360,7 @@ defaultValue: this.request.mimeType, }, }, - text: "in header set [name] to [value]", + text: Scratch.translate("in header set [name] to [value]"), }, { opcode: "setHeaderJSON", @@ -370,7 +371,7 @@ defaultValue: `{"Content-Type": "${this.request.mimeType}"}`, }, }, - text: "set headers to json [json]", + text: Scratch.translate("set headers to json [json]"), }, { opcode: "setBody", @@ -381,13 +382,13 @@ default: "Apple!", }, }, - text: "set request body to [text]", + text: Scratch.translate("set request body to [text]"), }, "---", { opcode: "setBodyToForm", blockType: BlockType.COMMAND, - text: "set request body to a form", + text: Scratch.translate("set request body to a form"), }, { opcode: "getFormProperty", @@ -398,7 +399,7 @@ defaultValue: "name", }, }, - text: "get [name] in request form", + text: Scratch.translate("[name] in request form"), }, { opcode: "setFormProperty", @@ -413,7 +414,7 @@ defaultValue: "value", }, }, - text: "set [name] to [value] in request form", + text: Scratch.translate("set [name] to [value] in request form"), }, { opcode: "deleteFormProperty", @@ -424,7 +425,7 @@ defaultValue: "name", }, }, - text: "delete [name] from request form", + text: Scratch.translate("delete [name] from request form"), }, "---", { @@ -436,18 +437,18 @@ defaultValue: "https://extensions.turbowarp.org/hello.txt", }, }, - text: "send request to [url]", + text: Scratch.translate("send request to [url]"), }, { func: "showExtra", blockType: BlockType.BUTTON, - text: "Show Extra", + text: Scratch.translate("Show Extra"), hideFromPalette: this.showingExtra, }, { func: "hideExtra", blockType: BlockType.BUTTON, - text: "Hide Extra", + text: Scratch.translate("Hide Extra"), hideFromPalette: !this.showingExtra, }, { @@ -463,7 +464,7 @@ defaultValue: "data", }, }, - text: "set [path] to [value] in request options", + text: Scratch.translate("set [path] to [value] in request options"), hideFromPalette: !this.showingExtra, }, { @@ -479,7 +480,9 @@ menu: "jsTypes", }, }, - text: "set [path] to type [type] in request options", + text: Scratch.translate( + "set [path] to type [type] in request options" + ), hideFromPalette: !this.showingExtra, }, { @@ -491,7 +494,7 @@ defaultValue: "path.to.item", }, }, - text: "get [path] in request options", + text: Scratch.translate("[path] in request options"), hideFromPalette: !this.showingExtra, }, { @@ -503,7 +506,7 @@ defaultValue: "path.to.item", }, }, - text: "get type of [path] in request options", + text: Scratch.translate("type of [path] in request options"), hideFromPalette: !this.showingExtra, }, ], diff --git a/extensions/godslayerakp/ws.js b/extensions/godslayerakp/ws.js index b43cb7fa1a..e9341f9a39 100644 --- a/extensions/godslayerakp/ws.js +++ b/extensions/godslayerakp/ws.js @@ -117,7 +117,7 @@ defaultValue: "wss://echoserver.redman13.repl.co", }, }, - text: "connect to [URL]", + text: Scratch.translate("connect to [URL]"), }, "---", { @@ -125,12 +125,12 @@ blockType: BlockType.EVENT, isEdgeActivated: false, shouldRestartExistingThreads: true, - text: "when connected", + text: Scratch.translate("when connected"), }, { opcode: "isConnected", blockType: BlockType.BOOLEAN, - text: "is connected?", + text: Scratch.translate("is connected?"), disableMonitor: true, }, "---", @@ -139,12 +139,12 @@ blockType: BlockType.EVENT, isEdgeActivated: false, shouldRestartExistingThreads: true, - text: "when message received", + text: Scratch.translate("when message received"), }, { opcode: "messageData", blockType: BlockType.REPORTER, - text: "received message data", + text: Scratch.translate("received message data"), disableMonitor: true, }, "---", @@ -154,10 +154,10 @@ arguments: { PAYLOAD: { type: ArgumentType.STRING, - defaultValue: "hello!", + defaultValue: "Hello!", }, }, - text: "send message [PAYLOAD]", + text: Scratch.translate("send message [PAYLOAD]"), }, "---", { @@ -165,12 +165,12 @@ blockType: BlockType.EVENT, isEdgeActivated: false, shouldRestartExistingThreads: true, - text: "when connection errors", + text: Scratch.translate("when connection errors"), }, { opcode: "hasErrored", blockType: BlockType.BOOLEAN, - text: "has connection errored?", + text: Scratch.translate("connection errored?"), disableMonitor: true, }, "---", @@ -179,30 +179,30 @@ blockType: BlockType.EVENT, isEdgeActivated: false, shouldRestartExistingThreads: true, - text: "when connection closes", + text: Scratch.translate("when connection closes"), }, { opcode: "isClosed", blockType: BlockType.BOOLEAN, - text: "is connection closed?", + text: Scratch.translate("is connection closed?"), disableMonitor: true, }, { opcode: "closeCode", blockType: BlockType.REPORTER, - text: "closing code", + text: Scratch.translate("closing code"), disableMonitor: true, }, { opcode: "closeMessage", blockType: BlockType.REPORTER, - text: "closing message", + text: Scratch.translate("closing message"), disableMonitor: true, }, { opcode: "closeWithoutReason", blockType: BlockType.COMMAND, - text: "close connection", + text: Scratch.translate("close connection"), }, { opcode: "closeWithCode", @@ -213,7 +213,7 @@ defaultValue: "1000", }, }, - text: "close connection with code [CODE]", + text: Scratch.translate("close connection with code [CODE]"), }, { opcode: "closeWithReason", @@ -228,7 +228,9 @@ defaultValue: "fulfilled", }, }, - text: "close connection with reason [REASON] and code [CODE]", + text: Scratch.translate( + "close connection with reason [REASON] and code [CODE]" + ), }, ], }; diff --git a/extensions/itchio.js b/extensions/itchio.js index d1186361c0..ba3650e611 100644 --- a/extensions/itchio.js +++ b/extensions/itchio.js @@ -86,7 +86,7 @@ opcode: "openItchWindow", blockType: Scratch.BlockType.COMMAND, text: Scratch.translate( - "Open [prefix] itch.io [page] window with [width]width and [height]height" + "open [prefix] itch.io [page] window with [width]width and [height]height" ), arguments: { prefix: { @@ -114,7 +114,7 @@ { opcode: "getGameData", blockType: Scratch.BlockType.COMMAND, - text: Scratch.translate("Fetch game data [user][game][secret]"), + text: Scratch.translate("fetch game data [user][game][secret]"), arguments: { user: { type: Scratch.ArgumentType.STRING, @@ -133,9 +133,7 @@ { opcode: "getGameDataJson", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate( - "Return game data [user][game][secret] in .json" - ), + text: Scratch.translate("game data [user][game][secret] in .json"), arguments: { user: { type: Scratch.ArgumentType.STRING, @@ -154,13 +152,13 @@ { opcode: "returnGameDataJson", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Return game data in .json"), + text: Scratch.translate("game data in .json"), }, "---", { opcode: "returnGameData", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Return game [data]"), + text: Scratch.translate("game [data]"), arguments: { data: { type: Scratch.ArgumentType.STRING, @@ -172,7 +170,7 @@ { opcode: "gameBool", blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Game data?"), + text: Scratch.translate("game data?"), }, { blockType: Scratch.BlockType.LABEL, @@ -181,9 +179,7 @@ { opcode: "returnGameRewards", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate( - "Return game rewards [rewards] by index:[index]" - ), + text: Scratch.translate("game rewards [rewards] by index:[index]"), arguments: { rewards: { type: Scratch.ArgumentType.STRING, @@ -199,22 +195,22 @@ { opcode: "rewardsLenght", // fixing this typo would break projects blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Return rewards list length"), + text: Scratch.translate("rewards list length"), }, { opcode: "rewardsBool", blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Rewards?"), + text: Scratch.translate("rewards?"), }, { blockType: Scratch.BlockType.LABEL, - text: Scratch.translate("Sub products"), + text: Scratch.translate("Sub Products"), }, { opcode: "returnGameSubProducts", blockType: Scratch.BlockType.REPORTER, text: Scratch.translate( - "Return game sub products [subProducts] by index:[index]" + "game sub products [subProducts] by index:[index]" ), arguments: { subProducts: { @@ -231,12 +227,12 @@ { opcode: "subProductsLength", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Return sub products list length"), + text: Scratch.translate("sub products list length"), }, { opcode: "subProductsBool", blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Sub products?"), + text: Scratch.translate("sub products?"), }, { blockType: Scratch.BlockType.LABEL, @@ -245,7 +241,7 @@ { opcode: "returnGameSale", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("Return game sale [sale]"), + text: Scratch.translate("game sale [sale]"), arguments: { sale: { type: Scratch.ArgumentType.STRING, @@ -257,7 +253,7 @@ { opcode: "saleBool", blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Sale?"), + text: Scratch.translate("sale?"), }, ], menus: { diff --git a/extensions/mdwalters/notifications.js b/extensions/mdwalters/notifications.js index df55962b10..0ba6ed3a7a 100644 --- a/extensions/mdwalters/notifications.js +++ b/extensions/mdwalters/notifications.js @@ -59,7 +59,7 @@ { opcode: "hasPermission", blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("has notification permission"), + text: Scratch.translate("has notification permission?"), disableMonitor: true, }, { diff --git a/extensions/obviousAlexC/SensingPlus.js b/extensions/obviousAlexC/SensingPlus.js index e41e4211f2..fb9d94c9b0 100644 --- a/extensions/obviousAlexC/SensingPlus.js +++ b/extensions/obviousAlexC/SensingPlus.js @@ -298,7 +298,7 @@ { opcode: "supportsTouches", blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("Supports touches?"), + text: Scratch.translate("supports touches?"), blockIconURI: touchIco, arguments: {}, extensions: ["colours_sensing"], @@ -322,7 +322,7 @@ { opcode: "isFingerDown", blockType: Scratch.BlockType.BOOLEAN, - text: Scratch.translate("is Finger [ID] down?"), + text: Scratch.translate("is finger [ID] down?"), blockIconURI: touchIco, arguments: { ID: { @@ -509,7 +509,7 @@ { opcode: "getEffect", blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("get this sprite's [effect] effect"), + text: Scratch.translate("this sprite's [effect] effect"), blockIconURI: effectIco, disableMonitor: true, arguments: { @@ -631,7 +631,7 @@ opcode: "getDeviceSpeed", blockIconURI: deviceVelIco, blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("get the [type] speed on the [axis] axis"), + text: Scratch.translate("[type] speed on the [axis] axis"), disableMonitor: true, arguments: { type: { diff --git a/extensions/obviousAlexC/newgroundsIO.js b/extensions/obviousAlexC/newgroundsIO.js index 14635e7ac7..18870d0bf8 100644 --- a/extensions/obviousAlexC/newgroundsIO.js +++ b/extensions/obviousAlexC/newgroundsIO.js @@ -9129,7 +9129,7 @@ getInfo() { return { id: "NGIO", - name: "Newgrounds!", + name: "Newgrounds", color1: "#EB7522", color2: "#4F280E", @@ -9142,22 +9142,22 @@ { opcode: "onLoginSuccess", blockType: Scratch.BlockType.HAT, - text: "Login Successful", + text: Scratch.translate("when login success"), }, { opcode: "onLoginRequired", blockType: Scratch.BlockType.HAT, - text: "If login required", + text: Scratch.translate("when login required"), }, { opcode: "promptLogin", blockType: Scratch.BlockType.COMMAND, //skipLogin - text: "Prompt user Login", + text: Scratch.translate("prompt user login"), }, { opcode: "skipLogin", blockType: Scratch.BlockType.COMMAND, - text: "Skip Login", + text: Scratch.translate("skip login"), }, "---", //Game blocks @@ -9165,7 +9165,7 @@ { opcode: "setVersionNumber", blockType: Scratch.BlockType.COMMAND, - text: "Change the game Version to[version]", + text: Scratch.translate("change game version to [version]"), arguments: { version: { type: Scratch.ArgumentType.STRING, @@ -9177,15 +9177,17 @@ { opcode: "connect", blockType: Scratch.BlockType.COMMAND, - text: "Connect to game:[gameID] code:[code]", + text: Scratch.translate( + "connect to game: [gameID] with code: [code]" + ), arguments: { gameID: { type: Scratch.ArgumentType.STRING, - defaultValue: "gameID", + defaultValue: Scratch.translate("gameID"), }, code: { type: Scratch.ArgumentType.STRING, - defaultValue: "Encryption Code", + defaultValue: Scratch.translate("Encryption Code"), }, }, }, @@ -9194,23 +9196,23 @@ { opcode: "isNewgrounds", blockType: Scratch.BlockType.BOOLEAN, - text: "Newgrounds?", + text: Scratch.translate("is newgrounds?"), }, { opcode: "loggedIn", blockType: Scratch.BlockType.BOOLEAN, - text: "Logged In?", + text: Scratch.translate("currently logged in?"), disableMonitor: true, }, { opcode: "version", blockType: Scratch.BlockType.REPORTER, - text: "Game Version", + text: Scratch.translate("game version"), }, { opcode: "getStatus", blockType: Scratch.BlockType.REPORTER, - text: "Api Status", + text: Scratch.translate("API status"), }, "---", //User Blocks @@ -9218,12 +9220,12 @@ { opcode: "getIfSupporter", blockType: Scratch.BlockType.BOOLEAN, - text: "Newgrounds Supporter?", + text: Scratch.translate("is user a newgrounds supporter?"), }, { opcode: "getUserDat", blockType: Scratch.BlockType.REPORTER, - text: "User [datType]", + text: Scratch.translate("user [datType]"), arguments: { datType: { type: Scratch.ArgumentType.STRING, @@ -9236,16 +9238,16 @@ { opcode: "onSaveCompletedHat", blockType: Scratch.BlockType.HAT, - text: "On Save Completed", + text: Scratch.translate("when save completed"), }, { opcode: "saveData", blockType: Scratch.BlockType.COMMAND, - text: "Save [Data] to slot [Slot]", + text: Scratch.translate("save [Data] to slot [Slot]"), arguments: { Data: { type: Scratch.ArgumentType.STRING, - defaultValue: "Data", + defaultValue: Scratch.translate("Data"), }, Slot: { type: Scratch.ArgumentType.NUMBER, @@ -9256,7 +9258,7 @@ { opcode: "doesSlotHaveData", blockType: Scratch.BlockType.BOOLEAN, - text: "Does slot [Slot] have save data?", + text: Scratch.translate("does slot [Slot] have save data?"), arguments: { Slot: { type: Scratch.ArgumentType.NUMBER, @@ -9267,7 +9269,7 @@ { opcode: "getData", blockType: Scratch.BlockType.REPORTER, - text: "Get data from slot [Slot]", + text: Scratch.translate("data from slot [Slot]"), arguments: { Slot: { type: Scratch.ArgumentType.NUMBER, @@ -9281,22 +9283,22 @@ { opcode: "unlockMedal", blockType: Scratch.BlockType.COMMAND, - text: "Unlock medal [medalID]", + text: Scratch.translate("unlock medal [medalID]"), arguments: { medalID: { type: Scratch.ArgumentType.STRING, - defaultValue: "MedalID", + defaultValue: Scratch.translate("MedalID"), }, }, }, { opcode: "isMedalUnlocked", blockType: Scratch.BlockType.BOOLEAN, - text: "Is medal [medalID] unlocked?", + text: Scratch.translate("is medal [medalID] unlocked?"), arguments: { medalID: { type: Scratch.ArgumentType.NUMBER, - defaultValue: "MedalID", + defaultValue: Scratch.translate("MedalID"), }, }, }, @@ -9306,12 +9308,14 @@ { opcode: "onScorePosted", blockType: Scratch.BlockType.HAT, - text: "On Score Posted", + text: Scratch.translate("when score posted"), }, { opcode: "postScore", blockType: Scratch.BlockType.COMMAND, - text: "Post score [score] to scoreboard [scoreBoardID]", + text: Scratch.translate( + "post score [score] to scoreboard [scoreBoardID]" + ), arguments: { scoreBoardID: { type: Scratch.ArgumentType.NUMBER, @@ -9326,7 +9330,9 @@ { opcode: "getScore", blockType: Scratch.BlockType.REPORTER, - text: "Get the [scoreDataType] of rank [rank] from scoreboard [scoreBoardID] from the timespan of [timeSpan]", + text: Scratch.translate( + "[scoreDataType] of rank [rank] from scoreboard [scoreBoardID] from the timespan of [timeSpan]" + ), arguments: { scoreBoardID: { type: Scratch.ArgumentType.NUMBER, @@ -9352,17 +9358,17 @@ { opcode: "loadNewgrounds", blockType: Scratch.BlockType.COMMAND, - text: "Open Newgrounds", + text: Scratch.translate("open newgrounds"), }, { opcode: "loadMoreGames", blockType: Scratch.BlockType.COMMAND, - text: "Open explore page", + text: Scratch.translate("open explore page"), }, { opcode: "loadAuthor", blockType: Scratch.BlockType.COMMAND, - text: "Open Author page", + text: Scratch.translate("open author page"), }, ], @@ -9371,19 +9377,19 @@ acceptReporters: true, items: [ { - text: "username", + text: Scratch.translate("username"), value: "name", }, { - text: "id", + text: Scratch.translate("id"), value: "id", }, { - text: "score", + text: Scratch.translate("score"), value: "MedalScore", }, { - text: "profile picture", + text: Scratch.translate("profile picture"), value: "icon", }, ], @@ -9392,11 +9398,11 @@ acceptReporters: true, items: [ { - text: "Today", + text: Scratch.translate("Today"), value: NGIO.PERIOD_TODAY, }, { - text: "All Time", + text: Scratch.translate("All Time"), value: NGIO.PERIOD_ALL_TIME, }, ], @@ -9405,27 +9411,27 @@ acceptReporters: true, items: [ { - text: "username", + text: Scratch.translate("username"), value: "name", }, { - text: "id", + text: Scratch.translate("id"), value: "id", }, { - text: "is supporting?", + text: Scratch.translate("is supporting?"), value: "supporter", }, { - text: "profile picture", + text: Scratch.translate("profile picture"), value: "icon", }, { - text: "score", + text: Scratch.translate("score"), value: "rawScore", }, { - text: "formatted score", + text: Scratch.translate("formatted score"), value: "score", }, { diff --git a/extensions/rixxyx.js b/extensions/rixxyx.js index 922aeebffa..df67b10712 100644 --- a/extensions/rixxyx.js +++ b/extensions/rixxyx.js @@ -42,7 +42,7 @@ { opcode: "color", blockType: Scratch.BlockType.REPORTER, - text: "color [COLOR] in hex", + text: Scratch.translate("color [COLOR] in hex"), arguments: { COLOR: { type: Scratch.ArgumentType.COLOR, @@ -53,21 +53,21 @@ { opcode: "returnTrue", blockType: Scratch.BlockType.BOOLEAN, - text: "true", + text: Scratch.translate("true"), arguments: {}, disableMonitor: true, }, { opcode: "returnFalse", blockType: Scratch.BlockType.BOOLEAN, - text: "false", + text: Scratch.translate("false"), arguments: {}, disableMonitor: true, }, { opcode: "ifElseString", blockType: Scratch.BlockType.REPORTER, - text: "if [BOOL] then [TEXT_1] else [TEXT_2]", + text: Scratch.translate("if [BOOL] then [TEXT_1] else [TEXT_2]"), arguments: { BOOL: { type: Scratch.ArgumentType.BOOLEAN, @@ -86,7 +86,7 @@ { opcode: "ifString", blockType: Scratch.BlockType.REPORTER, - text: "if [BOOL] then [TEXT]", + text: Scratch.translate("if [BOOL] then [TEXT]"), arguments: { BOOL: { type: Scratch.ArgumentType.BOOLEAN, @@ -101,11 +101,13 @@ { opcode: "extractTextBetweenToCharacters", blockType: Scratch.BlockType.REPORTER, - text: "extract text [TEXT] between [NUM_1] to [NUM_2] characters", + text: Scratch.translate( + "extract text [TEXT] between [NUM_1] to [NUM_2] characters" + ), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "RixxyX is cool, right?", + defaultValue: Scratch.translate("RixxyX is cool, right?"), }, NUM_1: { type: Scratch.ArgumentType.NUMBER, @@ -120,33 +122,33 @@ { opcode: "returnString", blockType: Scratch.BlockType.REPORTER, - text: "[TEXT] as text", + text: Scratch.translate("[TEXT] as text"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "RixxyX is cool, right?", + defaultValue: Scratch.translate("RixxyX is cool, right?"), }, }, }, { opcode: "isTheSameTypeAs", blockType: Scratch.BlockType.BOOLEAN, - text: "[TEXT_1] is the same type as [TEXT_2]?", + text: Scratch.translate("[TEXT_1] is the same type as [TEXT_2]?"), arguments: { TEXT_1: { type: Scratch.ArgumentType.STRING, - defaultValue: "RixxyX is cool, right?", + defaultValue: Scratch.translate("RixxyX is cool, right?"), }, TEXT_2: { type: Scratch.ArgumentType.STRING, - defaultValue: "RixxyX is cool, right?", + defaultValue: Scratch.translate("RixxyX is cool, right?"), }, }, }, { opcode: "reverseTxt", blockType: Scratch.BlockType.REPORTER, - text: "reverse text [TEXT]", + text: Scratch.translate("reverse text [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -157,13 +159,13 @@ { opcode: "returnCount", blockType: Scratch.BlockType.REPORTER, - text: "counter", + text: Scratch.translate("counter"), arguments: {}, }, { opcode: "incrementCountByNum", blockType: Scratch.BlockType.COMMAND, - text: "increment counter by [NUM]", + text: Scratch.translate("increment counter by [NUM]"), arguments: { NUM: { type: Scratch.ArgumentType.NUMBER, @@ -174,7 +176,7 @@ { opcode: "decrementCountByNum", blockType: Scratch.BlockType.COMMAND, - text: "decrement counter by [NUM]", + text: Scratch.translate("decrement counter by [NUM]"), arguments: { NUM: { type: Scratch.ArgumentType.NUMBER, @@ -185,7 +187,7 @@ { opcode: "setCount", blockType: Scratch.BlockType.COMMAND, - text: "set counter to [NUM]", + text: Scratch.translate("set counter to [NUM]"), arguments: { NUM: { type: Scratch.ArgumentType.NUMBER, @@ -196,7 +198,7 @@ { opcode: "toUppercase", blockType: Scratch.BlockType.REPORTER, - text: "[TEXT] to uppercase", + text: Scratch.translate("[TEXT] to uppercase"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -207,7 +209,7 @@ { opcode: "toLowercase", blockType: Scratch.BlockType.REPORTER, - text: "[TEXT] to lowercase", + text: Scratch.translate("[TEXT] to lowercase"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -218,18 +220,18 @@ { opcode: "toCapitalize", blockType: Scratch.BlockType.REPORTER, - text: "capitalize [TEXT]", + text: Scratch.translate("capitalize [TEXT]"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, - defaultValue: "rixxyX is cool, right?", + defaultValue: Scratch.translate("rixxyX is cool, right?"), }, }, }, { opcode: "isJsNan", blockType: Scratch.BlockType.BOOLEAN, - text: "is JavaScript NaN [OBJ]", + text: Scratch.translate("is javascript NaN [OBJ]"), arguments: { OBJ: { type: Scratch.ArgumentType.NUMBER, @@ -240,7 +242,7 @@ { opcode: "returnNum", blockType: Scratch.BlockType.REPORTER, - text: "[NUM] as number", + text: Scratch.translate("[NUM] as number"), arguments: { NUM: { type: Scratch.ArgumentType.NUMBER, @@ -251,7 +253,7 @@ { opcode: "returnBool", blockType: Scratch.BlockType.BOOLEAN, - text: "[BOOL] as boolean", + text: Scratch.translate("[BOOL] as boolean"), arguments: { BOOL: { type: Scratch.ArgumentType.STRING, @@ -262,7 +264,7 @@ { opcode: "binToTxt", blockType: Scratch.BlockType.REPORTER, - text: "binary [BIN] to text", + text: Scratch.translate("binary [BIN] to text"), arguments: { BIN: { type: Scratch.ArgumentType.STRING, @@ -274,7 +276,7 @@ { opcode: "txtToBin", blockType: Scratch.BlockType.REPORTER, - text: "text [TEXT] to binary", + text: Scratch.translate("text [TEXT] to binary"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -285,7 +287,7 @@ { opcode: "repeatTxtTimes", blockType: Scratch.BlockType.REPORTER, - text: "repeat text [TEXT] [NUM] times", + text: Scratch.translate("repeat text [TEXT] [NUM] times"), arguments: { TEXT: { type: Scratch.ArgumentType.STRING, @@ -317,19 +319,19 @@ { opcode: "startTime", blockType: Scratch.BlockType.COMMAND, - text: "start measuring time", + text: Scratch.translate("start measuring time"), arguments: {}, }, { opcode: "endTime", blockType: Scratch.BlockType.COMMAND, - text: "end measuring time", + text: Scratch.translate("end measuring time"), arguments: {}, }, { opcode: "returnTime", blockType: Scratch.BlockType.REPORTER, - text: "time", + text: Scratch.translate("time"), arguments: {}, }, ], diff --git a/extensions/true-fantom/math.js b/extensions/true-fantom/math.js index 569ba24301..11f290d6f8 100644 --- a/extensions/true-fantom/math.js +++ b/extensions/true-fantom/math.js @@ -102,7 +102,7 @@ getInfo() { return { id: "truefantommath", - name: "Math", + name: Scratch.translate("Math"), color1: "#59c059", @@ -368,7 +368,7 @@ { opcode: "exactly_cont_block", blockType: Scratch.BlockType.BOOLEAN, - text: "[A] exactly contains [B] ?", + text: Scratch.translate("[A] exactly contains [B]?"), arguments: { A: { type: Scratch.ArgumentType.STRING, @@ -385,7 +385,7 @@ { opcode: "clamp_block", blockType: Scratch.BlockType.REPORTER, - text: "clamp [A] between [B] and [C]", + text: Scratch.translate("clamp [A] between [B] and [C]"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -405,7 +405,9 @@ { opcode: "scale_block", blockType: Scratch.BlockType.REPORTER, - text: "map [A] from range [m1] - [M1] to range [m2] - [M2]", + text: Scratch.translate( + "map [A] from range [m1] - [M1] to range [m2] - [M2]" + ), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -434,7 +436,7 @@ { opcode: "trunc2_block", blockType: Scratch.BlockType.REPORTER, - text: "trunc of [A] with [B] digits after dot", + text: Scratch.translate("trunc of [A] with [B] digits after dot"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -450,7 +452,7 @@ { opcode: "trunc_block", blockType: Scratch.BlockType.REPORTER, - text: "trunc of [A]", + text: Scratch.translate("trunc of [A]"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -463,7 +465,7 @@ { opcode: "is_multiple_of_block", blockType: Scratch.BlockType.BOOLEAN, - text: "[A] is multiple of [B] ?", + text: Scratch.translate("[A] is multiple of [B]?"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -480,7 +482,7 @@ { opcode: "log_with_base_block", blockType: Scratch.BlockType.REPORTER, - text: "log of [A] with base [B]", + text: Scratch.translate("log of [A] with base [B]"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -516,7 +518,7 @@ { opcode: "is_safe_number_block", blockType: Scratch.BlockType.BOOLEAN, - text: "is safe number [A] ?", + text: Scratch.translate("is safe number [A]?"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -529,7 +531,7 @@ { opcode: "is_number_block", blockType: Scratch.BlockType.BOOLEAN, - text: "is number [A] ?", + text: Scratch.translate("is number [A]?"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -541,7 +543,7 @@ { opcode: "is_int_block", blockType: Scratch.BlockType.BOOLEAN, - text: "is int [A] ?", + text: Scratch.translate("is int [A]?"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, @@ -553,7 +555,7 @@ { opcode: "is_float_block", blockType: Scratch.BlockType.BOOLEAN, - text: "is float [A] ?", + text: Scratch.translate("is float [A]?"), arguments: { A: { type: Scratch.ArgumentType.NUMBER, diff --git a/extensions/true-fantom/network-m.js b/extensions/true-fantom/network-m.js index 3a4df1d3bc..3a643dfc37 100644 --- a/extensions/true-fantom/network-m.js +++ b/extensions/true-fantom/network-m.js @@ -8,7 +8,7 @@ getInfo() { return { id: "truefantomnetworkm", - name: "Network", + name: Scratch.translate("Network"), color1: "#83cc70", color2: "#76b865", @@ -20,40 +20,40 @@ { opcode: "connected_to_internet_block", blockType: Scratch.BlockType.BOOLEAN, - text: "connected to internet?", + text: Scratch.translate("connected to internet?"), }, "---", { opcode: "current_url_block", blockType: Scratch.BlockType.REPORTER, - text: "current url", + text: Scratch.translate("current url"), }, "---", { opcode: "network_type_block", blockType: Scratch.BlockType.REPORTER, - text: "network type", + text: Scratch.translate("network type"), }, { opcode: "network_generation_block", blockType: Scratch.BlockType.REPORTER, - text: "network generation", + text: Scratch.translate("network generation"), }, "---", { opcode: "downlink_speed_block", blockType: Scratch.BlockType.REPORTER, - text: "downlink speed in mb/s", + text: Scratch.translate("downlink speed in mb/s"), }, { opcode: "downlink_max_speed_block", blockType: Scratch.BlockType.REPORTER, - text: "downlink max speed in mb/s", + text: Scratch.translate("downlink max speed in mb/s"), }, { opcode: "rtt_block", blockType: Scratch.BlockType.REPORTER, - text: "rtt in ms", + text: Scratch.translate("rtt in ms"), }, ], }; diff --git a/extensions/true-fantom/network.js b/extensions/true-fantom/network.js index a15d66fc03..955cf863b7 100644 --- a/extensions/true-fantom/network.js +++ b/extensions/true-fantom/network.js @@ -89,7 +89,7 @@ getInfo() { return { id: "truefantomnetwork", - name: "Network", + name: Scratch.translate("Network"), color1: "#146600", color2: "#125C00", @@ -101,52 +101,54 @@ { opcode: "connected_to_internet_block", blockType: Scratch.BlockType.BOOLEAN, - text: "connected to internet?", + text: Scratch.translate("connected to internet?"), }, "---", { opcode: "browser_block", blockType: Scratch.BlockType.REPORTER, - text: "browser", + text: Scratch.translate("browser"), }, "---", { opcode: "current_url_block", blockType: Scratch.BlockType.REPORTER, - text: "current url", + text: Scratch.translate("current url"), }, "---", { opcode: "network_type_block", blockType: Scratch.BlockType.REPORTER, - text: "network type", + text: Scratch.translate("network type"), }, { opcode: "network_generation_block", blockType: Scratch.BlockType.REPORTER, - text: "network generation", + text: Scratch.translate("network generation"), }, "---", { opcode: "downlink_speed_block", blockType: Scratch.BlockType.REPORTER, - text: "downlink speed in mb/s", + text: Scratch.translate("downlink speed in mb/s"), }, { opcode: "downlink_max_speed_block", blockType: Scratch.BlockType.REPORTER, - text: "downlink max speed in mb/s", + text: Scratch.translate("downlink max speed in mb/s"), }, { opcode: "rtt_block", blockType: Scratch.BlockType.REPORTER, - text: "rtt in ms", + text: Scratch.translate("rtt in ms"), }, "---", { opcode: "get_block", blockType: Scratch.BlockType.REPORTER, - text: "get [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]", + text: Scratch.translate( + "get [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]" + ), arguments: { USER_URL: { type: Scratch.ArgumentType.STRING, @@ -165,7 +167,9 @@ { opcode: "delete_block", blockType: Scratch.BlockType.REPORTER, - text: "delete [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]", + text: Scratch.translate( + "delete [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]" + ), arguments: { USER_URL: { type: Scratch.ArgumentType.STRING, @@ -184,7 +188,9 @@ { opcode: "post_block", blockType: Scratch.BlockType.REPORTER, - text: "post [CONTENT_TYPE] [BODY] to [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]", + text: Scratch.translate( + "post [CONTENT_TYPE] [BODY] to [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]" + ), arguments: { USER_URL: { type: Scratch.ArgumentType.STRING, @@ -192,7 +198,7 @@ }, BODY: { type: Scratch.ArgumentType.STRING, - defaultValue: "apple", + defaultValue: Scratch.translate("apple"), }, CONTENT_TYPE: { type: Scratch.ArgumentType.STRING, @@ -211,7 +217,9 @@ { opcode: "put_block", blockType: Scratch.BlockType.REPORTER, - text: "put [CONTENT_TYPE] [BODY] to [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]", + text: Scratch.translate( + "put [CONTENT_TYPE] [BODY] to [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]" + ), arguments: { USER_URL: { type: Scratch.ArgumentType.STRING, @@ -219,7 +227,7 @@ }, BODY: { type: Scratch.ArgumentType.STRING, - defaultValue: "apple", + defaultValue: Scratch.translate("apple"), }, CONTENT_TYPE: { type: Scratch.ArgumentType.STRING, @@ -238,7 +246,9 @@ { opcode: "patch_block", blockType: Scratch.BlockType.REPORTER, - text: "patch [CONTENT_TYPE] [BODY] to [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]", + text: Scratch.translate( + "patch [CONTENT_TYPE] [BODY] to [USER_URL] respond [RESPONSES_TYPES] split by [SPLIT]" + ), arguments: { USER_URL: { type: Scratch.ArgumentType.STRING, @@ -246,7 +256,7 @@ }, BODY: { type: Scratch.ArgumentType.STRING, - defaultValue: "apple", + defaultValue: Scratch.translate("apple"), }, CONTENT_TYPE: { type: Scratch.ArgumentType.STRING, @@ -266,7 +276,7 @@ { opcode: "open_link_block", blockType: Scratch.BlockType.COMMAND, - text: "open [USER_URL] in new tab", + text: Scratch.translate("open [USER_URL] in new tab"), arguments: { USER_URL: { type: Scratch.ArgumentType.STRING, @@ -277,7 +287,9 @@ { opcode: "open_window_block", blockType: Scratch.BlockType.COMMAND, - text: "open [USER_URL] in new window with width: [WIDTH] height: [HEIGHT] left: [LEFT] top: [TOP]", + text: Scratch.translate( + "open [USER_URL] in new window with width: [WIDTH] height: [HEIGHT] left: [LEFT] top: [TOP]" + ), arguments: { USER_URL: { type: Scratch.ArgumentType.STRING, @@ -304,7 +316,7 @@ { opcode: "redirect_link_block", blockType: Scratch.BlockType.COMMAND, - text: "redirect this tab to [USER_URL]", + text: Scratch.translate("redirect this tab to [USER_URL]"), arguments: { USER_URL: { type: Scratch.ArgumentType.STRING, @@ -319,7 +331,7 @@ acceptReporters: true, items: [ { - text: "(1) text", + text: Scratch.translate("(1) text"), value: "1", }, { @@ -332,7 +344,7 @@ acceptReporters: true, items: [ { - text: "(1) text", + text: Scratch.translate("(1) text"), value: "1", }, { @@ -340,31 +352,31 @@ value: "2", }, { - text: "(3) status ok?", + text: Scratch.translate("(3) status ok?"), value: "3", }, { - text: "(4) status", + text: Scratch.translate("(4) status"), value: "4", }, { - text: "(5) status text", + text: Scratch.translate("(5) status text"), value: "5", }, { - text: "(5 1) status text and text", + text: Scratch.translate("(5 1) status text and text"), value: "5 1", }, { - text: "(6) type", + text: Scratch.translate("(6) type"), value: "6", }, { - text: "(6 4) type and status", + text: Scratch.translate("(6 4) type and status"), value: "6 4", }, { - text: "(7) redirected?", + text: Scratch.translate("(7) redirected?"), value: "7", }, { @@ -377,7 +389,7 @@ acceptReporters: true, items: [ { - text: "(1) text", + text: Scratch.translate("(1) text"), value: "1", }, { @@ -385,31 +397,31 @@ value: "2", }, { - text: "(3) status ok?", + text: Scratch.translate("(3) status ok?"), value: "3", }, { - text: "(4) status", + text: Scratch.translate("(4) status"), value: "4", }, { - text: "(5) status text", + text: Scratch.translate("(5) status text"), value: "5", }, { - text: "(5 1) status text and text", + text: Scratch.translate("(5 1) status text and text"), value: "5 1", }, { - text: "(6) type", + text: Scratch.translate("(6) type"), value: "6", }, { - text: "(6 4) type and status", + text: Scratch.translate("(6 4) type and status"), value: "6 4", }, { - text: "(7) redirected?", + text: Scratch.translate("(7) redirected?"), value: "7", }, { @@ -417,7 +429,7 @@ value: "8", }, { - text: "(9) body used?", + text: Scratch.translate("(9) body used?"), value: "9", }, ], @@ -426,7 +438,7 @@ acceptReporters: true, items: [ { - text: "default", + text: Scratch.translate("default"), value: "default", }, ], diff --git a/extensions/turboloader/audiostream.js b/extensions/turboloader/audiostream.js index c75f051eea..0a916736dd 100644 --- a/extensions/turboloader/audiostream.js +++ b/extensions/turboloader/audiostream.js @@ -15,7 +15,7 @@ getInfo() { return { id: "audiostr", - name: "AudioStream 🔊", + name: Scratch.translate("AudioStream") + " 🔊", color1: "#ba45ac", color2: "#a8399b", color3: "#942c88", @@ -23,7 +23,7 @@ { opcode: "am_loadasset", blockType: Scratch.BlockType.COMMAND, - text: "load sound from project [SRC]", + text: Scratch.translate("load sound from project [SRC]"), arguments: { SRC: { type: Scratch.ArgumentType.STRING, @@ -34,7 +34,7 @@ { opcode: "am_playfromurl", blockType: Scratch.BlockType.COMMAND, - text: "load sound from URL/URI [URL]", + text: Scratch.translate("load sound from URL/URI [URL]"), arguments: { URL: { type: Scratch.ArgumentType.STRING, @@ -45,7 +45,7 @@ { opcode: "am_playnew", blockType: Scratch.BlockType.COMMAND, - text: "start playing [SRC] in a new context", + text: Scratch.translate("start playing [SRC] in a new context"), arguments: { SRC: { type: Scratch.ArgumentType.STRING, @@ -57,7 +57,7 @@ { opcode: "am_usecontext", blockType: Scratch.BlockType.COMMAND, - text: "use [SPRITE]'s context in this sprite", + text: Scratch.translate("use [SPRITE]'s context in this sprite"), arguments: { SPRITE: { type: Scratch.ArgumentType.STRING, menu: "spriteList" }, }, @@ -66,37 +66,37 @@ { opcode: "am_play", blockType: Scratch.BlockType.COMMAND, - text: "play", + text: Scratch.translate("play"), arguments: {}, }, { opcode: "am_playandwait", blockType: Scratch.BlockType.COMMAND, - text: "play and wait till the end", + text: Scratch.translate("play and wait till the end"), arguments: {}, }, { opcode: "am_resume", blockType: Scratch.BlockType.COMMAND, - text: "resume", + text: Scratch.translate("resume"), arguments: {}, }, { opcode: "am_pause", blockType: Scratch.BlockType.COMMAND, - text: "pause", + text: Scratch.translate("pause"), arguments: {}, }, { opcode: "am_stopthis", blockType: Scratch.BlockType.COMMAND, - text: "stop (this context)", + text: Scratch.translate("stop (this context)"), arguments: {}, }, { opcode: "am_stophim", blockType: Scratch.BlockType.COMMAND, - text: "stop sounds of [SPRITE]", + text: Scratch.translate("stop sounds of [SPRITE]"), arguments: { SPRITE: { type: Scratch.ArgumentType.STRING, menu: "spriteList" }, }, @@ -104,20 +104,20 @@ { opcode: "am_stop", blockType: Scratch.BlockType.COMMAND, - text: "stop all sounds", + text: Scratch.translate("stop all sounds"), arguments: {}, }, { opcode: "am_hasStopped", blockType: Scratch.BlockType.BOOLEAN, - text: "has stopped", + text: Scratch.translate("has stopped?"), arguments: {}, disableMonitor: true, }, { opcode: "am_isPaused", blockType: Scratch.BlockType.BOOLEAN, - text: "is paused", + text: Scratch.translate("is paused?"), arguments: {}, disableMonitor: true, }, @@ -125,13 +125,13 @@ { opcode: "am_getanalyser", blockType: Scratch.BlockType.REPORTER, - text: "get all visualizer data (slow)", + text: Scratch.translate("all visualizer data (slow)"), arguments: {}, }, { opcode: "am_getanalyserindex", blockType: Scratch.BlockType.REPORTER, - text: "get visualizer data at [INDEX]", + text: Scratch.translate("visualizer data at [INDEX]"), arguments: { INDEX: { type: Scratch.ArgumentType.NUMBER, @@ -141,7 +141,9 @@ { opcode: "am_analyserfft", blockType: Scratch.BlockType.COMMAND, - text: "set visualizer read size to [VAL] (must be power of 2)", + text: Scratch.translate( + "set visualizer read size to [VAL] (must be power of 2)" + ), arguments: { VAL: { type: Scratch.ArgumentType.NUMBER, @@ -153,7 +155,7 @@ { opcode: "am_setvolume", blockType: Scratch.BlockType.COMMAND, - text: "set volume to [VAL]", + text: Scratch.translate("set volume to [VAL]"), arguments: { VAL: { type: Scratch.ArgumentType.NUMBER, @@ -164,14 +166,14 @@ { opcode: "am_getvolume", blockType: Scratch.BlockType.REPORTER, - text: "volume", + text: Scratch.translate("volume"), arguments: {}, }, "---", { opcode: "am_skipToTime", blockType: Scratch.BlockType.COMMAND, - text: "skip to time [VAL]", + text: Scratch.translate("skip to time [VAL]"), arguments: { VAL: { type: Scratch.ArgumentType.NUMBER, @@ -182,20 +184,20 @@ { opcode: "am_songDuration", blockType: Scratch.BlockType.REPORTER, - text: "sound duration", + text: Scratch.translate("sound duration"), arguments: {}, }, { opcode: "am_songCurrent", blockType: Scratch.BlockType.REPORTER, - text: "current time", + text: Scratch.translate("current time"), arguments: {}, }, "---", { opcode: "am_setpitch", blockType: Scratch.BlockType.COMMAND, - text: "set speed/pitch to [VAL]", + text: Scratch.translate("set speed/pitch to [VAL]"), arguments: { VAL: { type: Scratch.ArgumentType.NUMBER, @@ -206,7 +208,7 @@ { opcode: "am_setppitch", blockType: Scratch.BlockType.COMMAND, - text: "preservesPitch [VAL]", + text: Scratch.translate("preservesPitch [VAL]"), arguments: { VAL: { type: Scratch.ArgumentType.BOOLEAN, @@ -217,7 +219,7 @@ { opcode: "am_setstereo", blockType: Scratch.BlockType.COMMAND, - text: "set pan to [VAL] (-1 to 1)", + text: Scratch.translate("set pan to [VAL] (-1 to 1)"), arguments: { VAL: { type: Scratch.ArgumentType.NUMBER, @@ -228,7 +230,9 @@ { opcode: "am_setfilter", blockType: Scratch.BlockType.COMMAND, - text: "(broken) filter [FIL] set frequency [FQ] quality [Q]", + text: Scratch.translate( + "(broken) filter [FIL] set frequency [FQ] quality [Q]" + ), hideFromPalette: true, arguments: { FIL: { @@ -249,7 +253,7 @@ { opcode: "am_toglefilter", blockType: Scratch.BlockType.COMMAND, - text: "(broken) filter [FIL] [STATE]", + text: Scratch.translate("(broken) filter [FIL] [STATE]"), hideFromPalette: true, arguments: { FIL: { @@ -267,39 +271,43 @@ { opcode: "am_freset", blockType: Scratch.BlockType.COMMAND, - text: "(broken) reset all filters", + text: Scratch.translate("(broken) reset all filters"), hideFromPalette: true, arguments: {}, }, { opcode: "am_connect", blockType: Scratch.BlockType.COMMAND, - text: "(broken) connect [STRING] to track [TRACK]", + text: Scratch.translate( + "(broken) connect [STRING] to track [TRACK]" + ), hideFromPalette: true, arguments: { STRING: { type: Scratch.ArgumentType.STRING, - defaultValue: "filter1", + defaultValue: Scratch.translate("filter1"), }, TRACK: { type: Scratch.ArgumentType.STRING, - defaultValue: "track", + defaultValue: Scratch.translate("track"), }, }, }, { opcode: "am_disconnect", blockType: Scratch.BlockType.COMMAND, - text: "(broken) disconnect [STRING] from track [TRACK]", + text: Scratch.translate( + "(broken) disconnect [STRING] from track [TRACK]" + ), hideFromPalette: true, arguments: { STRING: { type: Scratch.ArgumentType.STRING, - defaultValue: "filter1", + defaultValue: Scratch.translate("filter1"), }, TRACK: { type: Scratch.ArgumentType.STRING, - defaultValue: "track", + defaultValue: Scratch.translate("track"), }, }, }, @@ -307,45 +315,45 @@ menus: { filtersmenu: [ { - text: "lowpass", + text: Scratch.translate("lowpass"), value: "lowpass", }, { - text: "highpass", + text: Scratch.translate("highpass"), value: "highpass", }, { - text: "bandpass", + text: Scratch.translate("bandpass"), value: "bandpass", }, { - text: "lowshelf", + text: Scratch.translate("lowshelf"), value: "lowshelf", }, { - text: "highshelf", + text: Scratch.translate("highshelf"), value: "highshelf", }, { - text: "peaking", + text: Scratch.translate("peaking"), value: "peaking", }, { - text: "notch", + text: Scratch.translate("notch"), value: "notch", }, { - text: "allpass", + text: Scratch.translate("allpass"), value: "allpass", }, ], connectOrDisconnect: [ { - text: "connect", + text: Scratch.translate("connect"), value: "connect", }, { - text: "disconnect", + text: Scratch.translate("disconnect"), value: "disconnect", }, ], diff --git a/extensions/utilities.js b/extensions/utilities.js index e1a6f31c3e..741f109686 100644 --- a/extensions/utilities.js +++ b/extensions/utilities.js @@ -214,7 +214,7 @@ blockType: Scratch.BlockType.REPORTER, - text: Scratch.translate("get content from [URL]"), + text: Scratch.translate("content from [URL]"), arguments: { URL: { type: Scratch.ArgumentType.STRING, diff --git a/extensions/veggiecan/LongmanDictionary.js b/extensions/veggiecan/LongmanDictionary.js index 0a27bfa7d9..5745a727a2 100644 --- a/extensions/veggiecan/LongmanDictionary.js +++ b/extensions/veggiecan/LongmanDictionary.js @@ -23,27 +23,31 @@ color3: "#3C6874", menuIconURI: longmamlogomenu, blockIconURI: longmamlogoblocks, - name: "Longman Dictionary", + name: Scratch.translate("Longman Dictionary"), blocks: [ { opcode: "define", blockType: Scratch.BlockType.REPORTER, - text: "primary definition of [word] in the Longman Dictionary", + text: Scratch.translate( + "primary definition of [word] in the longman dictionary" + ), arguments: { word: { type: Scratch.ArgumentType.STRING, - defaultValue: "cat", + defaultValue: Scratch.translate("cat"), }, }, }, { opcode: "getalldefs", blockType: Scratch.BlockType.REPORTER, - text: "all definitions of [word] in the Longman Dictionary", + text: Scratch.translate( + "all definitions of [word] in the longman dictionary" + ), arguments: { word: { type: Scratch.ArgumentType.STRING, - defaultValue: "cat", + defaultValue: Scratch.translate("cat"), }, }, }, diff --git a/extensions/veggiecan/browserfullscreen.js b/extensions/veggiecan/browserfullscreen.js index c071043ba0..7565d3a8df 100644 --- a/extensions/veggiecan/browserfullscreen.js +++ b/extensions/veggiecan/browserfullscreen.js @@ -23,12 +23,12 @@ color2: "#C77612", color3: "#9D5D0E", blockIconURI: icon, - name: "Browser Fullscreen", + name: Scratch.translate("Browser Fullscreen"), blocks: [ { opcode: "fullscreen", blockType: Scratch.BlockType.COMMAND, - text: "[ACTION] fullscreen", + text: Scratch.translate("[ACTION] fullscreen"), arguments: { ACTION: { type: Scratch.ArgumentType.STRING, @@ -40,13 +40,13 @@ { opcode: "isInFullscreen", blockType: Scratch.BlockType.BOOLEAN, - text: "in browser fullscreen?", + text: Scratch.translate("in browser fullscreen?"), arguments: {}, }, { opcode: "whenfullscreen", blockType: Scratch.BlockType.EVENT, - text: "when browser fullscreen [ENABLED]", + text: Scratch.translate("when browser fullscreen [ENABLED]"), isEdgeActivated: false, arguments: { ENABLED: { @@ -61,11 +61,11 @@ acceptReporters: true, items: [ { - text: "enter", + text: Scratch.translate("enter"), value: "enter", }, { - text: "exit", + text: Scratch.translate("exit"), value: "exit", }, ], @@ -75,11 +75,11 @@ acceptReporters: false, items: [ { - text: "entered", + text: Scratch.translate("entered"), value: "entered", }, { - text: "exited", + text: Scratch.translate("exited"), value: "exited", }, ], diff --git a/extensions/vercte/dictionaries.js b/extensions/vercte/dictionaries.js index 5705677368..ad60a2da13 100644 --- a/extensions/vercte/dictionaries.js +++ b/extensions/vercte/dictionaries.js @@ -16,7 +16,7 @@ getInfo() { return { id: "verctedictionaries", - name: "Dictionaries", + name: Scratch.translate("Dictionaries"), color1: "#008cff", color2: "#0073d1", color3: "#0066ba", @@ -24,12 +24,12 @@ { opcode: "dict_list", blockType: Scratch.BlockType.REPORTER, - text: "list of dictionaries", + text: Scratch.translate("list of dictionaries"), }, { opcode: "dict_stringify", blockType: Scratch.BlockType.REPORTER, - text: "stringify dictionary [DICT] into JSON", + text: Scratch.translate("stringify dictionary [DICT] into JSON"), arguments: { DICT: { type: Scratch.ArgumentType.STRING, @@ -40,7 +40,7 @@ { opcode: "dict_parse", blockType: Scratch.BlockType.COMMAND, - text: "parse JSON [OBJ] into dictionary [DICT]", + text: Scratch.translate("parse JSON [OBJ] into dictionary [DICT]"), arguments: { OBJ: { type: Scratch.ArgumentType.STRING, @@ -55,7 +55,7 @@ { opcode: "dict_get", blockType: Scratch.BlockType.REPORTER, - text: "get key [KEY] from dictionary [DICT]", + text: Scratch.translate("key [KEY] from dictionary [DICT]"), arguments: { KEY: { type: Scratch.ArgumentType.STRING, defaultValue: "bar" }, DICT: { type: Scratch.ArgumentType.STRING, defaultValue: "foo" }, @@ -64,7 +64,9 @@ { opcode: "dict_property_defined", blockType: Scratch.BlockType.BOOLEAN, - text: "key [KEY] in dictionary [DICT] is defined?", + text: Scratch.translate( + "key [KEY] in dictionary [DICT] is defined?" + ), arguments: { KEY: { type: Scratch.ArgumentType.STRING, defaultValue: "bar" }, DICT: { type: Scratch.ArgumentType.STRING, defaultValue: "foo" }, @@ -73,7 +75,7 @@ { opcode: "dict_property_null", blockType: Scratch.BlockType.BOOLEAN, - text: "key [KEY] in dictionary [DICT] is null?", + text: Scratch.translate("key [KEY] in dictionary [DICT] is null?"), arguments: { KEY: { type: Scratch.ArgumentType.STRING, defaultValue: "bar" }, DICT: { type: Scratch.ArgumentType.STRING, defaultValue: "foo" }, @@ -85,7 +87,9 @@ { opcode: "dict_set", blockType: Scratch.BlockType.COMMAND, - text: "set key [KEY] in dictionary [DICT] to [VAL]", + text: Scratch.translate( + "set key [KEY] in dictionary [DICT] to [VAL]" + ), arguments: { KEY: { type: Scratch.ArgumentType.STRING, defaultValue: "bar" }, DICT: { type: Scratch.ArgumentType.STRING, defaultValue: "foo" }, @@ -95,7 +99,9 @@ { opcode: "dict_change", blockType: Scratch.BlockType.COMMAND, - text: "change key [KEY] in dictionary [DICT] by [BY]", + text: Scratch.translate( + "change key [KEY] in dictionary [DICT] by [BY]" + ), arguments: { KEY: { type: Scratch.ArgumentType.STRING, @@ -111,7 +117,7 @@ { opcode: "dict_delete", blockType: Scratch.BlockType.COMMAND, - text: "remove dictionary [DICT]", + text: Scratch.translate("remove dictionary [DICT]"), arguments: { DICT: { type: Scratch.ArgumentType.STRING, defaultValue: "foo" }, }, @@ -119,7 +125,7 @@ { opcode: "dict_delete_key", blockType: Scratch.BlockType.COMMAND, - text: "remove key [KEY] from dictionary [DICT]", + text: Scratch.translate("remove key [KEY] from dictionary [DICT]"), arguments: { KEY: { type: Scratch.ArgumentType.STRING, defaultValue: "bar" }, DICT: { type: Scratch.ArgumentType.STRING, defaultValue: "foo" },