From 22463fd296d0f6dada197f0298eab9cdd366b606 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Tue, 25 Jan 2022 20:55:02 -0800 Subject: [PATCH] Add 'compile translations' task to VSCode tasks (#64933) --- .vscode/tasks.json | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 77d31339a69..3fecfd8ba48 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,9 +16,7 @@ "label": "Pytest", "type": "shell", "command": "pytest --timeout=10 tests", - "dependsOn": [ - "Install all Test Requirements" - ], + "dependsOn": ["Install all Test Requirements"], "group": { "kind": "test", "isDefault": true @@ -47,9 +45,7 @@ "label": "Pylint", "type": "shell", "command": "pylint homeassistant", - "dependsOn": [ - "Install all Requirements" - ], + "dependsOn": ["Install all Requirements"], "group": { "kind": "test", "isDefault": true @@ -116,6 +112,21 @@ "panel": "new" }, "problemMatcher": [] + }, + { + "label": "Compile translations", + "detail": "In order to test changes to translation files, the translation strings must be compiled into Home Assistant's translation directories.", + "type": "shell", + "command": "python3 -m script.translations develop --integration ${input:integrationName}", + "group": { + "kind": "build", + "isDefault": true + }, + "presentation": { + "reveal": "always", + "panel": "new" + }, + "problemMatcher": [] } ], "inputs": [