Skip to content

Commit

Permalink
L10N - Part 3 of many (#1156)
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Nov 17, 2023
1 parent 5fe23e7 commit cec16cb
Show file tree
Hide file tree
Showing 15 changed files with 633 additions and 262 deletions.
50 changes: 27 additions & 23 deletions extensions/-SIPC-/consoles.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
getInfo() {
return {
id: "sipcconsole",
name: "Consoles",
name: Scratch.translate("Consoles"),
color1: "#808080",
color2: "#8c8c8c",
color3: "#999999",
Expand All @@ -24,61 +24,61 @@
{
opcode: "Emptying",
blockType: Scratch.BlockType.COMMAND,
text: "Clear Console",
text: Scratch.translate("Clear Console"),
arguments: {},
},
{
opcode: "Information",
blockType: Scratch.BlockType.COMMAND,
text: "Information [string]",
text: Scratch.translate("Information [string]"),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Information",
defaultValue: Scratch.translate("Information"),
},
},
},
{
opcode: "Journal",
blockType: Scratch.BlockType.COMMAND,
text: "Journal [string]",
text: Scratch.translate("Journal [string]"),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Journal",
defaultValue: Scratch.translate("Journal"),
},
},
},
{
opcode: "Warning",
blockType: Scratch.BlockType.COMMAND,
text: "Warning [string]",
text: Scratch.translate("Warning [string]"),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Warning",
defaultValue: Scratch.translate("Warning"),
},
},
},
{
opcode: "Error",
blockType: Scratch.BlockType.COMMAND,
text: "Error [string]",
text: Scratch.translate("Error [string]"),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Error",
defaultValue: Scratch.translate("Error"),
},
},
},
{
opcode: "debug",
blockType: Scratch.BlockType.COMMAND,
text: "Debug [string]",
text: Scratch.translate("Debug [string]"),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Debug",
defaultValue: Scratch.translate("Debug"),
},
},
},
Expand All @@ -87,62 +87,66 @@
{
opcode: "group",
blockType: Scratch.BlockType.COMMAND,
text: "Create a group named [string]",
text: Scratch.translate("Create a group named [string]"),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "group",
defaultValue: Scratch.translate("group"),
},
},
},
{
opcode: "groupCollapsed",
blockType: Scratch.BlockType.COMMAND,
text: "Create a collapsed group named [string]",
text: Scratch.translate("Create a collapsed group named [string]"),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "group",
defaultValue: Scratch.translate("group"),
},
},
},
{
opcode: "groupEnd",
blockType: Scratch.BlockType.COMMAND,
text: "Exit the current group",
text: Scratch.translate("Exit the current group"),
arguments: {},
},
"---",
{
opcode: "Timeron",
blockType: Scratch.BlockType.COMMAND,
text: "Start a timer named [string]",
text: Scratch.translate("Start a timer named [string]"),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Time",
defaultValue: Scratch.translate("Time"),
},
},
},
{
opcode: "Timerlog",
blockType: Scratch.BlockType.COMMAND,
text: "Print the time run by the timer named [string]",
text: Scratch.translate(
"Print the time run by the timer named [string]"
),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Time",
defaultValue: Scratch.translate("Time"),
},
},
},
{
opcode: "Timeroff",
blockType: Scratch.BlockType.COMMAND,
text: "End the timer named [string] and print the time elapsed from start to end",
text: Scratch.translate(
"End the timer named [string] and print the time elapsed from start to end"
),
arguments: {
string: {
type: Scratch.ArgumentType.STRING,
defaultValue: "Time",
defaultValue: Scratch.translate("Time"),
},
},
},
Expand Down
18 changes: 12 additions & 6 deletions extensions/-SIPC-/recording.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,45 @@
getInfo() {
return {
id: "sipcrecording",
name: "Recording",
name: Scratch.translate("Recording"),
color1: "#696969",
blocks: [
{
opcode: "startRecording",
blockType: Scratch.BlockType.COMMAND,
text: "Start recording",
text: Scratch.translate("Start recording"),
blockIconURI: icon,
arguments: {},
},
{
opcode: "stopRecording",
blockType: Scratch.BlockType.COMMAND,
text: "Stop recording",
text: Scratch.translate("Stop recording"),
blockIconURI: icon,
arguments: {},
},
{
opcode: "stopRecordingAndDownload",
blockType: Scratch.BlockType.COMMAND,
text: "Stop recording and download with [name] as filename",
text: Scratch.translate(
"Stop recording and download with [name] as filename"
),
blockIconURI: icon,
arguments: {
name: {
type: Scratch.ArgumentType.STRING,
defaultValue: "recording.wav",
defaultValue:
Scratch.translate({
default: "recording",
description: "Default file name",
}) + ".wav",
},
},
},
{
opcode: "isRecording",
blockType: Scratch.BlockType.BOOLEAN,
text: "Recording?",
text: Scratch.translate("Recording?"),
blockIconURI: icon,
arguments: {},
},
Expand Down
39 changes: 32 additions & 7 deletions extensions/-SIPC-/time.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
getInfo() {
return {
id: "sipctime",
name: "Time",
name: Scratch.translate("Time"),
color1: "#ff8000",
color2: "#804000",
color3: "#804000",
Expand All @@ -23,19 +23,19 @@
{
opcode: "Timestamp",
blockType: Scratch.BlockType.REPORTER,
text: "current timestamp",
text: Scratch.translate("current timestamp"),
arguments: {},
},
{
opcode: "timezone",
blockType: Scratch.BlockType.REPORTER,
text: "current time zone",
text: Scratch.translate("current time zone"),
arguments: {},
},
{
opcode: "Timedata",
blockType: Scratch.BlockType.REPORTER,
text: "get [Timedata] from [timestamp]",
text: Scratch.translate("get [Timedata] from [timestamp]"),
arguments: {
timestamp: {
type: Scratch.ArgumentType.NUMBER,
Expand All @@ -51,7 +51,7 @@
{
opcode: "TimestampToTime",
blockType: Scratch.BlockType.REPORTER,
text: "convert [timestamp] to datetime",
text: Scratch.translate("convert [timestamp] to datetime"),
arguments: {
timestamp: {
type: Scratch.ArgumentType.NUMBER,
Expand All @@ -62,7 +62,7 @@
{
opcode: "TimeToTimestamp",
blockType: Scratch.BlockType.REPORTER,
text: "convert [time] to timestamp",
text: Scratch.translate("convert [time] to timestamp"),
arguments: {
time: {
type: Scratch.ArgumentType.STRING,
Expand All @@ -74,7 +74,32 @@
menus: {
Time: {
acceptReporters: true,
items: ["year", "month", "day", "hour", "minute", "second"],
items: [
{
text: Scratch.translate("year"),
value: "year",
},
{
text: Scratch.translate("month"),
value: "month",
},
{
text: Scratch.translate("day"),
value: "day",
},
{
text: Scratch.translate("hour"),
value: "hour",
},
{
text: Scratch.translate("minute"),
value: "minute",
},
{
text: Scratch.translate("second"),
value: "second",
},
],
},
},
};
Expand Down
9 changes: 5 additions & 4 deletions extensions/Alestore/nfcwarp.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// ID: alestorenfc
// Description: Allows reading data from NFC (NDEF) devices. Only works in Chrome on Android.
// By: Alestore Games <https://scratch.mit.edu/users/aleb2005/>
// Context: NFC stands for "Near-field communication". Ideally check a real phone in your language to see how they translated it.

(function (Scratch) {
"use strict";
Expand All @@ -17,7 +18,7 @@
getInfo() {
return {
id: "alestorenfc",
name: "NFCWarp",
name: Scratch.translate("NFCWarp"),
color1: "#FF4646",
color2: "#FF0000",
color3: "#990033",
Expand All @@ -26,17 +27,17 @@
blocks: [
{
blockType: Scratch.BlockType.LABEL,
text: "Only works in Chrome on Android",
text: Scratch.translate("Only works in Chrome on Android"),
},
{
opcode: "supported",
blockType: Scratch.BlockType.BOOLEAN,
text: "NFC supported?",
text: Scratch.translate("NFC supported?"),
},
{
opcode: "nfcRead",
blockType: Scratch.BlockType.REPORTER,
text: "read NFC tag",
text: Scratch.translate("read NFC tag"),
disableMonitor: true,
},
],
Expand Down
Loading

0 comments on commit cec16cb

Please sign in to comment.