Skip to content

Commit

Permalink
add: l18next and flow: start
Browse files Browse the repository at this point in the history
  • Loading branch information
Tardo committed Feb 12, 2024
1 parent a509840 commit b7c2a09
Show file tree
Hide file tree
Showing 21 changed files with 704 additions and 105 deletions.
17 changes: 17 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[ignore]

[include]

[libs]

[lints]

[options]
module.name_mapper='^@common' -> '<PROJECT_ROOT>/src/js/common'
module.name_mapper='^@shared' -> '<PROJECT_ROOT>/src/js/shared'
module.name_mapper='^@odoo' -> '<PROJECT_ROOT>/src/js/page/odoo'
module.name_mapper='^@terminal' -> '<PROJECT_ROOT>/src/js/page/terminal'
module.name_mapper='^@trash' -> '<PROJECT_ROOT>/src/js/page/trash'
module.name_mapper='^@tests' -> '<PROJECT_ROOT>/src/js/page/tests'

[strict]
8 changes: 7 additions & 1 deletion OdooTerminal.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@
"path": "scripts",
"name": "Scripts",
},
{
"path": "_locales",
"name": "i18n",
},
{
"path": ".",
"name": "OdooTerminal - Root"
}
],
"settings": {}
"settings": {
"javascript.validate.enable": false
}
}
3 changes: 1 addition & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
- Solve some boostrap "glitches" printing error section in 11.0 (Because Terminal uses BS4 and 11.0 BS3)
- Remove extension storage data after uninstall (chrome doesn't have any 'event' to handle this)
- Use some kind of mock to cover all commands in tests (See Untested Commands section in docs/testing.md)
- What will happen when Odoo stops supporting the "new old" api?
- Explicity define the states for the state machine... sounds like a good idea uh?
- Use better english... and maybe support multi-language?
- Use better english...
- Rewrite tests in JS and drop python usage
```
84 changes: 84 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"extensionName": {
"message": "Odoo Terminal"
},

"extensionDescription": {
"message": "Terminal-like to send json-rpc requests and use tools for Odoo developers"
},

"optionsTitle": {
"message": "OdooTerminal Options"
},
"optionsTitleBehaviour": {
"message": "Behaviour"
},
"optionsTitleBehaviourPinned": {
"message": "Pinned"
},
"optionsTitleBehaviourMaximized": {
"message": "Maximized"
},
"optionsTitleBehaviourOpacity": {
"message": "Opacity:"
},
"optionsTitleShortcuts": {
"message": "Shortcuts"
},
"optionsTitleShortcutsKeybind": {
"message": "Keybind"
},
"optionsTitleShortcutsCommand": {
"message": "Command"
},
"optionsTitleShortcutsAdd": {
"message": "Add"
},
"optionsTitleCommandAssistant": {
"message": "Command Assistant"
},
"optionsTitleCommandAssistantDynOptionsDisabled": {
"message": "Disable dynamic options"
},
"optionsTitleCommandAssistantMatchMode": {
"message": "Match mode:"
},
"optionsTitleCommandAssistantMaxResults": {
"message": "Max. results:"
},
"optionsTitleInitCommands": {
"message": "Init Commands"
},
"optionsTitleInitCommandsDescription": {
"message": "Run these commands when initialize the terminal (one per line). Be careful! changes here can cause unwanted exceptions. Note that the commands will be executed on all 'odoo' pages."
},
"optionsTitleTerminalContext": {
"message": "Terminal Context"
},
"optionsTitleTerminalContextDescription": {
"message": "This context will be merged with the 'normal' context on terminal operations. In json format."
},
"optionsTitleDeveloperZone": {
"message": "Extension Developer Zone"
},
"optionsTitleDeveloperZoneModeTests": {
"message": "Use $terminaltests$",
"placeholders": {
"terminaltests": {
"content": "OdooTerminalTests"
}
}
},
"optionsTitleDeveloperZoneModeIgnoreCompChecks": {
"message": "Disable Odoo version checking (this can cause unwanted exceptions!)"
},
"optionsTitleDeveloperZoneModeConsoleErrors": {
"message": "Show errors in the browser console"
},
"optionsReset": {
"message": "Reset"
},
"optionsSave": {
"message": "Save"
}
}
13 changes: 13 additions & 0 deletions _locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cmdAliasArgCmd": "The command to run",
"cmdAliasArgName": "The name of the alias",
"cmdAliasCreated": "Alias created successfully",
"cmdAliasDefinition": "Create aliases",
"cmdAliasDetail": "Define aliases to run commands easy. <br><b>WARNING:</b> This command uses 'local storage' to persist the data even if you close the browser. This data can be easy accessed by other computer usedrs. Don't use sensible data if you are using a shared computer.<br><br>Can use positional parameters ($1,$2,$3,$N...)",
"cmdAliasExample": "-n myalias -c \"print 'Hello, $1!'\"",
"cmdAliasInvalidAliasName": "Invalid alias name",
"cmdAliasNotDefined": "No aliases defined.",
"cmdAliasNotExists": "The selected alias not exists",
"cmdAliasRemoved": "Alias removed successfully",
"cmdChronoTimeElapsed": "Time elapsed: '{{time_elapsed_secs}}' seconds"
}
84 changes: 84 additions & 0 deletions _locales/es/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"extensionName": {
"message": "Odoo Terminal"
},

"extensionDescription": {
"message": "Algo parecido a un terminal para enviar peticiones json-rpc y utilizar herramientas para desarrolladores de Odoo"
},

"optionsTitle": {
"message": "OdooTerminal Opciones"
},
"optionsTitleBehaviour": {
"message": "Comportamiendo"
},
"optionsTitleBehaviourPinned": {
"message": "Fijado"
},
"optionsTitleBehaviourMaximized": {
"message": "Maximizado"
},
"optionsTitleBehaviourOpacity": {
"message": "Opacidad:"
},
"optionsTitleShortcuts": {
"message": "Atajos"
},
"optionsTitleShortcutsKeybind": {
"message": "Combinación de teclas"
},
"optionsTitleShortcutsCommand": {
"message": "Comando"
},
"optionsTitleShortcutsAdd": {
"message": "Añadir"
},
"optionsTitleCommandAssistant": {
"message": "Asistente de comandos"
},
"optionsTitleCommandAssistantDynOptionsDisabled": {
"message": "Desactivar opciones dinámicas"
},
"optionsTitleCommandAssistantMatchMode": {
"message": "Método de comprobación:"
},
"optionsTitleCommandAssistantMaxResults": {
"message": "Máx. resultados:"
},
"optionsTitleInitCommands": {
"message": "Comandos iniciales"
},
"optionsTitleInitCommandsDescription": {
"message": "Ejecutar estos comandos al inicializar el terminal (uno por línea). Tenga cuidado! los cambios aquí pueden causar excepciones no deseadas. Ten en cuenta que los comandos se ejecutarán en todas las páginas de 'odoo'."
},
"optionsTitleTerminalContext": {
"message": "Contexto del terminal"
},
"optionsTitleTerminalContextDescription": {
"message": "Este contexto se fusionará con el contexto 'normal' en las operaciones del terminal. En formato JSON."
},
"optionsTitleDeveloperZone": {
"message": "Zona de desarrollador de la extensión"
},
"optionsTitleDeveloperZoneModeTests": {
"message": "Usar $terminaltests$",
"placeholders": {
"terminaltests": {
"content": "OdooTerminalTests"
}
}
},
"optionsTitleDeveloperZoneModeIgnoreCompChecks": {
"message": "Desactivar la comprobación de la versión de Odoo (¡puede causar problemas!)"
},
"optionsTitleDeveloperZoneModeConsoleErrors": {
"message": "Mostrar errores en la consola del navegador"
},
"optionsReset": {
"message": "Reestablecer"
},
"optionsSave": {
"message": "Guardar"
}
}
13 changes: 13 additions & 0 deletions _locales/es/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"cmdAliasArgCmd": "The command to run",
"cmdAliasArgName": "The name of the alias",
"cmdAliasCreated": "Alias created successfully",
"cmdAliasDefinition": "Create aliases",
"cmdAliasDetail": "Define aliases to run commands easy. <br><b>WARNING:</b> This command uses 'local storage' to persist the data even if you close the browser. This data can be easy accessed by other computer usedrs. Don't use sensible data if you are using a shared computer.<br><br>Can use positional parameters ($1,$2,$3,$N...)",
"cmdAliasExample": "-n myalias -c \"print 'Hello, $1!'\"",
"cmdAliasInvalidAliasName": "Invalid alias name",
"cmdAliasNotDefined": "No aliases defined.",
"cmdAliasNotExists": "The selected alias not exists",
"cmdAliasRemoved": "Alias removed successfully",
"cmdChronoTimeElapsed": "Time elapsed: '{{time_elapsed_secs}}' segundos"
}
9 changes: 5 additions & 4 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"run_at": "document_idle"
}
],
"description": "Terminal-like to send json-rpc requests and use tools for Odoo developers",
"description": "__MSG_extensionDescription__",
"icons": {
"16": "src/img/terminal-16.png",
"32": "src/img/terminal-32.png",
Expand All @@ -33,15 +33,16 @@
}
},
"manifest_version": 2,
"name": "Odoo Terminal",
"default_locale": "en",
"name": "__MSG_extensionName__",
"options_ui": {
"page": "src/html/options.html",
"open_in_tab": true,
"browser_style": true,
"chrome_style": true
},
"permissions": ["activeTab", "storage"],
"short_name": "Odoo Terminal",
"short_name": "__MSG_extensionName__",
"version": "10.4.2",
"web_accessible_resources": ["dist/pub/**"]
"web_accessible_resources": ["dist/pub/**", "_locales/**/translation.json"]
}
Loading

0 comments on commit b7c2a09

Please sign in to comment.