-
Notifications
You must be signed in to change notification settings - Fork 8
Combine internationalization #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
5ee4bec
b641ef4
dc2b623
7e2ed44
da233a3
6b3b5a5
aa63dbd
807db9b
af5ec73
eb53279
71441af
1aa450b
8d6247c
7d201d5
7f53299
81006e5
7f824a7
6a9f7bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as Blockly from 'blockly/core'; | ||
import { M } from 'vitest/dist/chunks/reporters.d.BFLkQcL6.js'; | ||
|
||
export const customTokens = (t: (key: string) => string): typeof Blockly.Msg => { | ||
return { | ||
ADD_COMMENT: t('BLOCKLY.ADD_COMMENT'), | ||
REMOVE_COMMENT: t('BLOCKLY.REMOVE_COMMENT'), | ||
DUPLICATE_COMMENT: t('BLOCKLY.DUPLICATE_COMMENT'), | ||
OF_TYPE: t('BLOCKLY.OF_TYPE'), | ||
WITH: t('BLOCKLY.WITH'), | ||
WHEN: t('BLOCKLY.WHEN'), | ||
PARAMETER: t('BLOCKLY.PARAMETER'), | ||
PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK: t('BLOCKLY.PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK'), | ||
MECHANISMS: t('BLOCKLY.MECHANISMS'), | ||
COMPONENTS: t('BLOCKLY.COMPONENTS'), | ||
EVENTS: t('BLOCKLY.EVENTS'), | ||
EVALUATE_BUT_IGNORE_RESULT: t('BLOCKLY.EVALUATE_BUT_IGNORE_RESULT'), | ||
EVALUATE_BUT_IGNORE_RESULT_TOOLTIP: t('BLOCKLY.EVALUATE_BUT_IGNORE_RESULT_TOOLTIP'), | ||
AUTO: t('BLOCKLY.AUTO'), | ||
TELEOP: t('BLOCKLY.TELEOP'), | ||
TEST: t('BLOCKLY.TEST'), | ||
TYPE: t('BLOCKLY.TYPE'), | ||
ENABLED: t('BLOCKLY.ENABLED'), | ||
DISPLAY_NAME: t('BLOCKLY.DISPLAY_NAME'), | ||
DISPLAY_GROUP: t('BLOCKLY.DISPLAY_GROUP'), | ||
OPMODE_TYPE_TOOLTIP: t('BLOCKLY.TOOLTIP.OPMODE_TYPE_TOOLTIP'), | ||
OPMODE_ENABLED_TOOLTIP: t('BLOCKLY.TOOLTIP.OPMODE_ENABLED_TOOLTIP'), | ||
OPMODE_NAME_TOOLTIP: t('BLOCKLY.TOOLTIP.OPMODE_NAME_TOOLTIP'), | ||
OPMODE_GROUP_TOOLTIP: t('BLOCKLY.TOOLTIP.OPMODE_GROUP_TOOLTIP'), | ||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"mechanism_delete": "Delete Mechanism", | ||
"mechanism_rename": "Rename Mechanism", | ||
"mechanism_copy": "Copy Mechanism", | ||
"opmode_delete": "Delete OpMode", | ||
"opmode_rename": "Rename OpMode", | ||
"opmode_copy": "Copy OpMode", | ||
"project_delete": "Delete Project", | ||
"project_rename": "Rename Project", | ||
"project_copy": "Copy Project", | ||
"fail_list_projects": "Failed to load the list of projects.", | ||
"mechanism": "Mechanism", | ||
"opmode": "OpMode", | ||
"class_rule_description": "No spaces are allowed in the name. Each word in the name should start with a capital letter.", | ||
"example_mechanism": "For example: GamePieceShooter", | ||
"example_opmode": "For example: AutoParkAndShoot", | ||
"example_project": "For example: WackyWheelerRobot", | ||
"addTabDialog": { | ||
"title": "Add Tab", | ||
"newItemPlaceholder": "Add Module", | ||
"search": "Search..." | ||
}, | ||
"PROJECT": "Project", | ||
"SAVE": "Save", | ||
"DEPLOY": "Deploy", | ||
"MANAGE": "Manage", | ||
"EXPLORER": "Explorer", | ||
"ROBOT": "Robot", | ||
"SETTINGS": "Settings", | ||
"WPI_TOOLBOX": "WPI Toolbox", | ||
"THEME": "Theme", | ||
"LANGUAGE": "Language", | ||
"ENGLISH": "English", | ||
"SPANISH": "Spanish", | ||
"HELP": "Help", | ||
"ABOUT": "About", | ||
"BLOCKLY":{ | ||
"OF_TYPE": "of type", | ||
"WITH": "with", | ||
"WHEN": "when", | ||
"PARAMETER": "parameter", | ||
"PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK": "Parameters can only go in their method's block", | ||
"MECHANISMS": "Mechanisms", | ||
"COMPONENTS": "Components", | ||
"EVENTS": "Events", | ||
"EVALUATE_BUT_IGNORE_RESULT": "evaluate but ignore result", | ||
"TYPE": "Type", | ||
"ENABLED": "Enabled", | ||
"DISPLAY_NAME": "Display Name", | ||
"DISPLAY_GROUP": "Display Group", | ||
"TOOLTIP":{ | ||
"EVALUATE_BUT_IGNORE_RESULT": "Executes the connected block and ignores the result. Allows you to call a function and ignore the return value.", | ||
"OPMODE_TYPE": "What sort of OpMode this is", | ||
"OPMODE_ENABLED": "Whether the OpMode is shown on Driver Station", | ||
"OPMODE_NAME": "The name shown on the Driver Station. If blank will use the class name.", | ||
"OPMODE_GROUP": "An optional group to group OpModes on Driver Station" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you write these strings? Do you speak Spanish? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had Copilot (Claude 4 Sonnet) translate for me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a comment that says we should have a native Spanish speaker check these? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since JSON doesn't allow comments, I put a key:value pair at the top that was "TODO" and a note. How is that? |
||
"mechanism_delete": "Eliminar Mecanismo", | ||
"mechanism_rename": "Renombrar Mecanismo", | ||
"mechanism_copy": "Copiar Mecanismo", | ||
"opmode_delete": "Eliminar OpMode", | ||
"opmode_rename": "Renombrar OpMode", | ||
"opmode_copy": "Copiar OpMode", | ||
"project_delete": "Eliminar Proyecto", | ||
"project_rename": "Renombrar Proyecto", | ||
"project_copy": "Copiar Proyecto", | ||
"fail_list_projects": "Error al cargar la lista de proyectos.", | ||
"mechanism": "Mecanismo", | ||
"opmode": "OpMode", | ||
"class_rule_description": "No se permiten espacios en el nombre. Cada palabra en el nombre debe comenzar con una letra mayúscula.", | ||
"example_mechanism": "Por ejemplo: DisparadorDePiezas", | ||
"example_opmode": "Por ejemplo: AutoEstacionarYDisparar", | ||
"example_project": "Por ejemplo: RobotRuedasLocas", | ||
"PROJECT": "Proyecto", | ||
"SAVE": "Guardar", | ||
"DEPLOY": "Desplegar", | ||
"MANAGE": "Gestionar", | ||
"EXPLORER": "Explorador", | ||
"ROBOT": "Robot", | ||
"SETTINGS": "Configuración", | ||
"WPI_TOOLBOX": "Caja de Herramientas WPI", | ||
"THEME": "Tema", | ||
"LANGUAGE": "Idioma", | ||
"ENGLISH": "Inglés", | ||
"SPANISH": "Español", | ||
"HELP": "Ayuda", | ||
"ABOUT": "Acerca de", | ||
"addTabDialog": { | ||
"title": "Agregar Pestaña", | ||
"newItemPlaceholder": "Agregar Módulo", | ||
"search": "Buscar..." | ||
}, | ||
"BLOCKLY":{ | ||
"OF_TYPE": "de tipo", | ||
"WITH": "con", | ||
"WHEN": "cuando", | ||
"PARAMETER": "parámetro", | ||
"PARAMETERS_CAN_ONLY_GO_IN_THEIR_METHODS_BLOCK": "Los parámetros solo pueden ir en el bloque de su método", | ||
"MECHANISMS": "Mecanismos", | ||
"COMPONENTS": "Componentes", | ||
"EVENTS": "Eventos", | ||
"EVALUATE_BUT_IGNORE_RESULT": "evaluar pero ignorar resultado", | ||
"TYPE": "Tipo", | ||
"ENABLED": "Habilitado", | ||
"DISPLAY_NAME": "Nombre a Mostrar", | ||
"DISPLAY_GROUP": "Grupo a Mostrar", | ||
"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.", | ||
"OPMODE_TYPE": "Qué tipo de OpMode es este", | ||
"OPMODE_ENABLED": "Si el OpMode se muestra en la Estación del Conductor", | ||
"OPMODE_NAME": "El nombre mostrado en la Estación del Conductor. Si está en blanco usará el nombre de la clase.", | ||
"OPMODE_GROUP": "Un grupo opcional para agrupar OpModes en la Estación del Conductor" | ||
} | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.