diff --git a/src/blocks/tokens.ts b/src/blocks/tokens.ts index 58ef15a6..bf8c4dea 100644 --- a/src/blocks/tokens.ts +++ b/src/blocks/tokens.ts @@ -108,5 +108,11 @@ export function customTokens(t: (key: string) => string): typeof Blockly.Msg { MRC_CATEGORY_ADD_COMPONENT: t('BLOCKLY.CATEGORY.ADD_COMPONENT'), MRC_CATEGORY_TEST: t('BLOCKLY.CATEGORY.TEST'), MRC_PRINT: t('BLOCKLY.PRINT'), + CUSTOM_EVENTS_LABEL: t('BLOCKLY.CUSTOM_EVENTS_LABEL'), + CUSTOM_METHODS_LABEL: t('BLOCKLY.CUSTOM_METHODS_LABEL'), + MORE_ROBOT_METHODS_LABEL: t('BLOCKLY.MORE_ROBOT_METHODS_LABEL'), + MORE_MECHANISM_METHODS_LABEL: t('BLOCKLY.MORE_MECHANISM_METHODS_LABEL'), + MORE_OPMODE_METHODS_LABEL: t('BLOCKLY.MORE_OPMODE_METHODS_LABEL'), + COMMENT_DEFAULT_TEXT: t('BLOCKLY.COMMENT_DEFAULT_TEXT'), } }; \ No newline at end of file diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 2cea6220..c261c810 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -96,6 +96,12 @@ "ROBOT": "robot", "CREATE": "create", "FIRE": "fire", + "CUSTOM_EVENTS_LABEL": "Custom Events", + "CUSTOM_METHODS_LABEL": "Custom Methods", + "MORE_ROBOT_METHODS_LABEL": "More Robot Methods", + "MORE_MECHANISM_METHODS_LABEL": "More Mechanism Methods", + "MORE_OPMODE_METHODS_LABEL": "More OpMode Methods", + "COMMENT_DEFAULT_TEXT": "Enter your comment here!", "TOOLTIP":{ "EVALUATE_BUT_IGNORE_RESULT": "Executes the connected block and ignores the result. Allows you to call a function and ignore the return value.", "NONE": "Returns None.", diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index ebb5764c..e73ead9f 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -97,6 +97,12 @@ "ROBOT": "robot", "CREATE": "crear", "FIRE": "disparar", + "CUSTOM_EVENTS_LABEL": "Eventos Personalizados", + "CUSTOM_METHODS_LABEL": "Métodos Personalizados", + "MORE_ROBOT_METHODS_LABEL": "Más Métodos del Robot", + "MORE_MECHANISM_METHODS_LABEL": "Más Métodos del Mecanismo", + "MORE_OPMODE_METHODS_LABEL": "Más Métodos del OpMode", + "COMMENT_DEFAULT_TEXT": "¡Ingresa tu comentario aquí!", "TOOLTIP": { "EVALUATE_BUT_IGNORE_RESULT": "Ejecuta el bloque conectado e ignora el resultado. Te permite llamar una función e ignorar el valor de retorno.", "NONE": "No devuelve ninguno.", diff --git a/src/i18n/locales/he/translation.json b/src/i18n/locales/he/translation.json index dbd63d19..86c2b444 100644 --- a/src/i18n/locales/he/translation.json +++ b/src/i18n/locales/he/translation.json @@ -96,6 +96,12 @@ "ROBOT": "רובוט", "CREATE": "צור", "FIRE": "הפעל", + "CUSTOM_EVENTS_LABEL": "אירועים מותאמים אישית", + "CUSTOM_METHODS_LABEL": "מתודות מותאמות אישית", + "MORE_ROBOT_METHODS_LABEL": "מתודות נוספות לרובוט", + "MORE_MECHANISM_METHODS_LABEL": "מתודות נוספות למנגנון", + "MORE_OPMODE_METHODS_LABEL": "מתודות נוספות לאופמוד", + "COMMENT_DEFAULT_TEXT": "הזן את ההערה שלך כאן!", "TOOLTIP": { "EVALUATE_BUT_IGNORE_RESULT": "מבצע את הבלוק המחובר ומתעלם מהתוצאה. מאפשר לקרוא לפונקציה מבלי להשתמש בערך שהיא מחזירה.", "NONE": "מחזיר כלום.", diff --git a/src/toolbox/event_category.ts b/src/toolbox/event_category.ts index 72bf0d3e..df0eba4c 100644 --- a/src/toolbox/event_category.ts +++ b/src/toolbox/event_category.ts @@ -65,7 +65,7 @@ class EventsCategory { contents.push( { kind: 'label', - text: 'Custom Events', + text: Blockly.Msg['CUSTOM_EVENTS_LABEL'], }, createCustomEventBlock(storageNames.makeUniqueName('my_event', eventNames)) ); diff --git a/src/toolbox/methods_category.ts b/src/toolbox/methods_category.ts index 66d5ab18..23695623 100644 --- a/src/toolbox/methods_category.ts +++ b/src/toolbox/methods_category.ts @@ -81,7 +81,7 @@ class MethodsCategory { ]; // Add the methods for a Robot. this.addClassBlocksForCurrentModule( - 'More Robot Methods', this.robotClassBlocks, robotMethodNamesNotOverrideable, + Blockly.Msg['MORE_ROBOT_METHODS_LABEL'], this.robotClassBlocks, robotMethodNamesNotOverrideable, methodNamesAlreadyOverridden, contents); break; case storageModule.ModuleType.MECHANISM: @@ -95,13 +95,13 @@ class MethodsCategory { ]; // Add the methods for a Mechanism. this.addClassBlocksForCurrentModule( - 'More Mechanism Methods', this.mechanismClassBlocks, mechanismMethodNamesNotOverrideable, + Blockly.Msg['MORE_MECHANISM_METHODS_LABEL'], this.mechanismClassBlocks, mechanismMethodNamesNotOverrideable, methodNamesAlreadyOverridden, contents); break; case storageModule.ModuleType.OPMODE: // Add the methods for an OpMode. this.addClassBlocksForCurrentModule( - 'More OpMode Methods', this.opmodeClassBlocks, [], + Blockly.Msg['MORE_OPMODE_METHODS_LABEL'], this.opmodeClassBlocks, [], methodNamesAlreadyOverridden, contents); break; } @@ -110,7 +110,7 @@ class MethodsCategory { contents.push( { kind: 'label', - text: 'Custom Methods', + text: Blockly.Msg['CUSTOM_METHODS_LABEL'], }, createCustomMethodBlock(), createCustomMethodBlockWithReturn() diff --git a/src/toolbox/misc_category.ts b/src/toolbox/misc_category.ts index f7762e82..545da622 100644 --- a/src/toolbox/misc_category.ts +++ b/src/toolbox/misc_category.ts @@ -7,7 +7,7 @@ export const getCategory = () => ({ kind: 'block', type: 'mrc_misc_comment', fields: { - COMMENT: 'Enter your comment here!', + COMMENT: Blockly.Msg['COMMENT_DEFAULT_TEXT'], }, }, {