From 499b232624ad54c49f80f566ca432d350c91c750 Mon Sep 17 00:00:00 2001 From: Fatou Mounzeo Date: Wed, 21 Aug 2019 13:50:55 -0700 Subject: [PATCH 1/2] adding .po file --- .../locale/en/LC_MESSAGES/express.po | 26 +++++++++++++++++++ .../locale/express.pot | 26 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/adafruit_circuitplayground/locale/en/LC_MESSAGES/express.po create mode 100644 src/adafruit_circuitplayground/locale/express.pot diff --git a/src/adafruit_circuitplayground/locale/en/LC_MESSAGES/express.po b/src/adafruit_circuitplayground/locale/en/LC_MESSAGES/express.po new file mode 100644 index 000000000..50579af3a --- /dev/null +++ b/src/adafruit_circuitplayground/locale/en/LC_MESSAGES/express.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-08-21 13:35-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: express.py:190 +msgid " is not a path to a .wav file." +msgstr "" + +#: express.py:192 +msgid "Please use Python 3 or higher." +msgstr "" diff --git a/src/adafruit_circuitplayground/locale/express.pot b/src/adafruit_circuitplayground/locale/express.pot new file mode 100644 index 000000000..50579af3a --- /dev/null +++ b/src/adafruit_circuitplayground/locale/express.pot @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-08-21 13:35-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: express.py:190 +msgid " is not a path to a .wav file." +msgstr "" + +#: express.py:192 +msgid "Please use Python 3 or higher." +msgstr "" From 46b4228598f52ea6ffada811a7419ffe278f2df6 Mon Sep 17 00:00:00 2001 From: Fatou Mounzeo Date: Thu, 22 Aug 2019 22:22:46 -0700 Subject: [PATCH 2/2] changing extension name --- LICENSE | 2 +- PRIVACY.md | 2 +- README.md | 2 +- docs/developers-setup.md | 2 +- docs/how-to-use.md | 10 +- docs/telemetry.md | 26 ++--- gulpfile.js | 2 +- locales/en/out/constants.i18n.json | 8 +- locales/en/package.i18n.json | 28 ++--- package.json | 120 ++++++++++----------- package.nls.json | 28 ++--- src/constants.ts | 23 ++-- src/extension.ts | 24 ++--- src/serialMonitor.ts | 10 +- src/simulatorDebugConfigurationProvider.ts | 10 +- src/view/translations/en.json | 8 +- 16 files changed, 154 insertions(+), 151 deletions(-) diff --git a/LICENSE b/LICENSE index b20c0a16e..1a7e30ed5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ - Project Pacifica + Project Device Simulator Express Copyright (c) Microsoft Corporation. All rights reserved. diff --git a/PRIVACY.md b/PRIVACY.md index 41e1f30ca..c97adaf9a 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -6,7 +6,7 @@ The software may collect information about you and your use of the software and ## Disable Telemetry -The Microsoft Pacifica Extension for Visual Studio Code collects usage +The Microsoft Device Simulator Express Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/privacystatement) to diff --git a/README.md b/README.md index a1bd260be..8b80714c8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Project Pacifica +# Project Device Simulator Express This project is a VS Code extension for makers to write for their microcontrollers and provide them a simulator to test their code. This extension currently supports some features of the Adafruit Circuit Playground Express. diff --git a/docs/developers-setup.md b/docs/developers-setup.md index 7235b2ce6..e3e6b054d 100644 --- a/docs/developers-setup.md +++ b/docs/developers-setup.md @@ -55,7 +55,7 @@ - Debugging the extension opens a new VS Code window with the extension installed - From the original VS Code window (opened in our repository) you can see outputs in the Debug Console - In the new VS Code window, you can access the commands provided by the extension from the Commands Palette (Ctrl+Shift+P) - listed as 'Pacifica : ...' + listed as 'Device Simulator Express : ...' - If you change some files you'll need to run the 'npm run compile' command again and restart debugging ## Repository Structure (important files) diff --git a/docs/how-to-use.md b/docs/how-to-use.md index a4f3c68ba..fb224702c 100644 --- a/docs/how-to-use.md +++ b/docs/how-to-use.md @@ -2,7 +2,7 @@ Commands are accessible through : -- **The command palette** (`Ctrl+shift+P` or `View->Command Palette`) and type 'Pacifica : `command_name`' +- **The command palette** (`Ctrl+shift+P` or `View->Command Palette`) and type 'Device Simulator Express : `command_name`' - **The extension buttons** available on the top right of the Text Editor Panel when you have a Python file open (1) ## Available commands @@ -61,9 +61,9 @@ Commands are accessible through : - Motion sensors - Tap detection -## Pacifica configuration +## Device Simulator Express configuration -Here are the settings you can change in the Pacifica configuration: +Here are the settings you can change in the Device Simulator Express configuration: - **Debugger Server Port:** allows you to change the port used to communicate with the debugger. Default value is _5577_. (4) @@ -84,11 +84,11 @@ Here are the settings you can change in the Pacifica configuration: - To open the output panel again after closing it go to VS Code menu : `View->Output`. - If you have pylint enabled, it might underline the import of the adafruit_circuitplayground library, but it will work correctly. - If you try to deploy to the device while it's plugged in but you still get an error saying it cannot find the board, make sure your Circuit Playground Express is formatted correctly and that its name matches `CIRCUITPY`. -- If you can't get the Simulator communication working while debugging, try to open you `Settings` and check the port used under `'Pacifica: Debugger Server Port'`. You can either change it (usually ports above 5000 could work) or try to free it, then start debugging again. +- If you can't get the Simulator communication working while debugging, try to open you `Settings` and check the port used under `'Device Simulator Express: Debugger Server Port'`. You can either change it (usually ports above 5000 could work) or try to free it, then start debugging again. ### Notes (1) Can be changed in settings. (2) To use the Serial Monitor commands, you'll need to open a folder because this saves the configuration file for the serial communication. You can still use the rest of the extension without opening a folder. (3) Sensors currently not supported by the official adafruit_circuit_playground.express library (v2.1.2). -(4) The regular communication is using the stdout and stdin of the Python process. But when you debug your code, it will communicate over sockets on port 5577. This is the default port that you can change in your `Settings` : `'Pacifica: Debugger Server Port'`. +(4) The regular communication is using the stdout and stdin of the Python process. But when you debug your code, it will communicate over sockets on port 5577. This is the default port that you can change in your `Settings` : `'Device Simulator Express: Debugger Server Port'`. diff --git a/docs/telemetry.md b/docs/telemetry.md index de9268d1e..e9a22941e 100644 --- a/docs/telemetry.md +++ b/docs/telemetry.md @@ -1,6 +1,6 @@ -# Pacifica Telemetry +# Device Simulator Express Telemetry -Pacifica logs usage data and diagnostics telemetry through [Application Insights](https://azure.microsoft.com/en-us/services/monitor/). +The Device Simulator Express logs usage data and diagnostics telemetry through [Application Insights](https://azure.microsoft.com/en-us/services/monitor/). ## Telemetry Gathered @@ -11,15 +11,15 @@ This extension collects basic diagnostics telemetry and usage data: ## Usage Telemetry -Through the Application Insights API, telemetry events are collected on Pacifica extension usage. The follow table describes the Telemetry events we collect: +Through the Application Insights API, telemetry events are collected on The Device Simulator Express extension usage. The follow table describes the Telemetry events we collect: -| **Property** | **Note** | -| :-------------------: | ---------------------------------------------------------------------------------------------------- | -| **Event Name** | Unique event name/descriptor for the event. For ex: Pacifica/COMMAND_NEW_FILE | -| **VS Code Session ID** | A unique identifier for the current session (changes each time the editor is started) | -| **VS Code Machine ID** | A unique identifier for the computer | -| **VS Code Version** | VS Code version being used by the user | -| **Extension Version** | Pacifica extension version being used | -| **OS** | User's operating system | -| **Performance** | A number indicating how long the command or API call took to execute | -| **Result** | If the event succeeded or not | +| **Property** | **Note** | +| :--------------------: | --------------------------------------------------------------------------------------------- | +| **Event Name** | Unique event name/descriptor for the event. For ex: Device Simulator Express/COMMAND_NEW_FILE | +| **VS Code Session ID** | A unique identifier for the current session (changes each time the editor is started) | +| **VS Code Machine ID** | A unique identifier for the computer | +| **VS Code Version** | VS Code version being used by the user | +| **Extension Version** | The Device Simulator Express extension version being used | +| **OS** | User's operating system | +| **Performance** | A number indicating how long the command or API call took to execute | +| **Result** | If the event succeeded or not | diff --git a/gulpfile.js b/gulpfile.js index a4e68bbcf..e34d4d25e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -62,7 +62,7 @@ gulp.task("vsce:publish", () => { gulp.task("vsce:package", () => { return vsce.createVSIX({ - packagePath: "../../dist/pacifica-0.0.0-UNTRACKEDVERSION.vsix" + packagePath: "../../dist/deviceSimulatorExpress-0.0.0-UNTRACKEDVERSION.vsix" }); }); diff --git a/locales/en/out/constants.i18n.json b/locales/en/out/constants.i18n.json index 010f27146..25534ab75 100644 --- a/locales/en/out/constants.i18n.json +++ b/locales/en/out/constants.i18n.json @@ -9,7 +9,7 @@ "dialogResponses.installNow": "Install Now", "dialogResponses.dontInstall": "Don't Install", "dialogResponses.tutorials": "Tutorials on Adafruit", - "error.debuggerServerInitFailed": "Warning : The Debugger Server cannot be opened. Please try to free the port {0} if it's already in use or select another one in your Settings 'Pacifica: Debugger Server Port' and start another debug session.\n You can still debug your code but you won't be able to use the Simulator.", + "error.debuggerServerInitFailed": "Warning : The Debugger Server cannot be opened. Please try to free the port {0} if it's already in use or select another one in your Settings 'Device Simulator Express: Debugger Server Port' and start another debug session.\n You can still debug your code but you won't be able to use the Simulator.", "error.debuggingSessionInProgress": "[ERROR] A debugging session is currently in progress, please stop it before running your code. \n", "error.incorrectFileNameForDevice": "[ERROR] Can\\'t deploy to your Circuit Playground Express device, please rename your file to \"code.py\" or \"main.py\". \n", "error.incorrectFileNameForDevicePopup": "Seems like you have a different file name than what the CPX requires, please rename it to \"code.py\" or \"main.py\".", @@ -36,7 +36,7 @@ "info.successfulInstall": "Successfully installed Python dependencies.", "info.thirdPartyWebsite": "By clicking \"Agree and Proceed\" you will be redirected to adafruit.com, a third party website not managed by Microsoft. Please note that your activity on adafruit.com is subject to Adafruit's privacy policy", "info.welcomeOutputTab": "Welcome to the Adafruit Simulator output tab !\n\n", - "label.webviewPanel": "Adafruit CPX", - "name": "Pacifica Simulator", + "label.webviewPanel": "Device Simulator Express", + "name": "Device Simulator Express", "warning.agreeAndRun": "By selecting ‘Agree and Run’, you understand the extension executes Python code on your local computer, which may be a potential security risk." -} \ No newline at end of file +} diff --git a/locales/en/package.i18n.json b/locales/en/package.i18n.json index 88e726942..49d2906a0 100644 --- a/locales/en/package.i18n.json +++ b/locales/en/package.i18n.json @@ -1,16 +1,16 @@ { - "pacificaExtension.commands.changeBaudRate": "Change Baud Rate", - "pacificaExtension.commands.closeSerialMonitor": "Close Serial Monitor", - "pacificaExtension.commands.label": "Pacifica", - "pacificaExtension.commands.openSerialMonitor": "Open Serial Monitor", - "pacificaExtension.commands.openSimulator": "Open Simulator", - "pacificaExtension.commands.runSimulator": "Run Simulator", - "pacificaExtension.commands.newFile": "New File", - "pacificaExtension.commands.runDevice": "Deploy to Device", - "pacificaExtension.commands.selectSerialPort": "Select Serial Port", - "pacificaExtension.configuration.title": "Pacfica configuration", - "pacificaExtension.configuration.properties.open": "Whether to show 'Open Simulator' icon in editor title menu.", - "pacificaExtension.configuration.properties.device": "Whether to show 'Run Device' icon in editor title menu.", - "pacificaExtension.configuration.properties.simulator": "Whether to show 'Run Simulator' icon in editor title menu.", - "pacificaExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger." + "deviceSimulatorExpressExtension.commands.changeBaudRate": "Change Baud Rate", + "deviceSimulatorExpressExtension.commands.closeSerialMonitor": "Close Serial Monitor", + "deviceSimulatorExpressExtension.commands.label": "Device Simulator Express", + "deviceSimulatorExpressExtension.commands.openSerialMonitor": "Open Serial Monitor", + "deviceSimulatorExpressExtension.commands.openSimulator": "Open Simulator", + "deviceSimulatorExpressExtension.commands.runSimulator": "Run Simulator", + "deviceSimulatorExpressExtension.commands.newFile": "New File", + "deviceSimulatorExpressExtension.commands.runDevice": "Deploy to Device", + "deviceSimulatorExpressExtension.commands.selectSerialPort": "Select Serial Port", + "deviceSimulatorExpressExtension.configuration.title": "Device Simulator Express configuration", + "deviceSimulatorExpressExtension.configuration.properties.open": "Whether to show 'Open Simulator' icon in editor title menu.", + "deviceSimulatorExpressExtension.configuration.properties.device": "Whether to show 'Run Device' icon in editor title menu.", + "deviceSimulatorExpressExtension.configuration.properties.simulator": "Whether to show 'Run Simulator' icon in editor title menu.", + "deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger." } diff --git a/package.json b/package.json index f92486586..8db069daa 100644 --- a/package.json +++ b/package.json @@ -25,74 +25,74 @@ "vscode-nls": "^4.0.0" }, "activationEvents": [ - "onCommand:pacifica.openSerialMonitor", - "onCommand:pacifica.openSimulator", - "onCommand:pacifica.runSimulator", - "onCommand:pacifica.newFile", - "onCommand:pacifica.runDevice", - "onCommand:pacifica.runSimulatorEditorButton", - "onCommand:pacifica.selectSerialPort", + "onCommand:deviceSimulatorExpress.openSerialMonitor", + "onCommand:deviceSimulatorExpress.openSimulator", + "onCommand:deviceSimulatorExpress.runSimulator", + "onCommand:deviceSimulatorExpress.newFile", + "onCommand:deviceSimulatorExpress.runDevice", + "onCommand:deviceSimulatorExpress.runSimulatorEditorButton", + "onCommand:deviceSimulatorExpress.selectSerialPort", "onDebug" ], "main": "./out/extension.js", "contributes": { "commands": [ { - "command": "pacifica.changeBaudRate", - "title": "%pacificaExtension.commands.changeBaudRate%", - "category": "%pacificaExtension.commands.label%" + "command": "deviceSimulatorExpress.changeBaudRate", + "title": "%deviceSimulatorExpressExtension.commands.changeBaudRate%", + "category": "%deviceSimulatorExpressExtension.commands.label%" }, { - "command": "pacifica.closeSerialMonitor", - "title": "%pacificaExtension.commands.closeSerialMonitor%", - "category": "%pacificaExtension.commands.label%" + "command": "deviceSimulatorExpress.closeSerialMonitor", + "title": "%deviceSimulatorExpressExtension.commands.closeSerialMonitor%", + "category": "%deviceSimulatorExpressExtension.commands.label%" }, { - "command": "pacifica.openSerialMonitor", - "title": "%pacificaExtension.commands.openSerialMonitor%", - "category": "%pacificaExtension.commands.label%" + "command": "deviceSimulatorExpress.openSerialMonitor", + "title": "%deviceSimulatorExpressExtension.commands.openSerialMonitor%", + "category": "%deviceSimulatorExpressExtension.commands.label%" }, { - "command": "pacifica.openSimulator", - "title": "%pacificaExtension.commands.openSimulator%", - "category": "%pacificaExtension.commands.label%", + "command": "deviceSimulatorExpress.openSimulator", + "title": "%deviceSimulatorExpressExtension.commands.openSimulator%", + "category": "%deviceSimulatorExpressExtension.commands.label%", "icon": { "light": "./assets/light-theme/open-simulator.svg", "dark": "./assets/dark-theme/open-simulator.svg" } }, { - "command": "pacifica.runSimulator", - "title": "%pacificaExtension.commands.runSimulator%", - "category": "%pacificaExtension.commands.label%" + "command": "deviceSimulatorExpress.runSimulator", + "title": "%deviceSimulatorExpressExtension.commands.runSimulator%", + "category": "%deviceSimulatorExpressExtension.commands.label%" }, { - "command": "pacifica.runSimulatorEditorButton", - "title": "%pacificaExtension.commands.runSimulator%", - "category": "%pacificaExtension.commands.label%", + "command": "deviceSimulatorExpress.runSimulatorEditorButton", + "title": "%deviceSimulatorExpressExtension.commands.runSimulator%", + "category": "%deviceSimulatorExpressExtension.commands.label%", "icon": { "light": "./assets/light-theme/run-on-simulator.svg", "dark": "./assets/dark-theme/run-on-simulator.svg" } }, { - "command": "pacifica.newFile", - "title": "%pacificaExtension.commands.newFile%", - "category": "%pacificaExtension.commands.label%" + "command": "deviceSimulatorExpress.newFile", + "title": "%deviceSimulatorExpressExtension.commands.newFile%", + "category": "%deviceSimulatorExpressExtension.commands.label%" }, { - "command": "pacifica.runDevice", - "title": "%pacificaExtension.commands.runDevice%", - "category": "%pacificaExtension.commands.label%", + "command": "deviceSimulatorExpress.runDevice", + "title": "%deviceSimulatorExpressExtension.commands.runDevice%", + "category": "%deviceSimulatorExpressExtension.commands.label%", "icon": { "light": "./assets/light-theme/save-to-board.svg", "dark": "./assets/dark-theme/save-to-board.svg" } }, { - "command": "pacifica.selectSerialPort", - "title": "%pacificaExtension.commands.selectSerialPort%", - "category": "%pacificaExtension.commands.label%" + "command": "deviceSimulatorExpress.selectSerialPort", + "title": "%deviceSimulatorExpressExtension.commands.selectSerialPort%", + "category": "%deviceSimulatorExpressExtension.commands.label%" } ], "colors": [ @@ -118,63 +118,63 @@ "menus": { "commandPalette": [ { - "command": "pacifica.runSimulatorEditorButton", + "command": "deviceSimulatorExpress.runSimulatorEditorButton", "when": "false" } ], "editor/title": [ { - "when": "editorLangId==python && config.pacifica.showOpenIconInEditorTitleMenu", - "command": "pacifica.openSimulator", + "when": "editorLangId==python && config.deviceSimulatorExpress.showOpenIconInEditorTitleMenu", + "command": "deviceSimulatorExpress.openSimulator", "group": "navigation@1" }, { - "when": "editorLangId==python && config.pacifica.showSimulatorIconInEditorTitleMenu", - "command": "pacifica.runSimulatorEditorButton", + "when": "editorLangId==python && config.deviceSimulatorExpress.showSimulatorIconInEditorTitleMenu", + "command": "deviceSimulatorExpress.runSimulatorEditorButton", "group": "navigation@2" }, { - "when": "editorLangId==python && config.pacifica.showDeviceIconInEditorTitleMenu", - "command": "pacifica.runDevice", + "when": "editorLangId==python && config.deviceSimulatorExpress.showDeviceIconInEditorTitleMenu", + "command": "deviceSimulatorExpress.runDevice", "group": "navigation@3" } ] }, "configuration": { "type": "object", - "title": "%pacificaExtension.configuration.title%", + "title": "%deviceSimulatorExpressExtension.configuration.title%", "properties": { - "pacifica.enableUSBDetection": { + "deviceSimulatorExpress.enableUSBDetection": { "type": "boolean", "default": true }, - "pacifica.showOpenIconInEditorTitleMenu": { + "deviceSimulatorExpress.showOpenIconInEditorTitleMenu": { "type": "boolean", "default": true, - "description": "%pacificaExtension.configuration.properties.open%", + "description": "%deviceSimulatorExpressExtension.configuration.properties.open%", "scope": "resource" }, - "pacifica.showSimulatorIconInEditorTitleMenu": { + "deviceSimulatorExpress.showSimulatorIconInEditorTitleMenu": { "type": "boolean", "default": true, - "description": "%pacificaExtension.configuration.properties.simulator%", + "description": "%deviceSimulatorExpressExtension.configuration.properties.simulator%", "scope": "resource" }, - "pacifica.showDeviceIconInEditorTitleMenu": { + "deviceSimulatorExpress.showDeviceIconInEditorTitleMenu": { "type": "boolean", "default": true, - "description": "%pacificaExtension.configuration.properties.device%", + "description": "%deviceSimulatorExpressExtension.configuration.properties.device%", "scope": "resource" }, - "pacifica.showDependencyInstall": { + "deviceSimulatorExpress.showDependencyInstall": { "type": "boolean", "default": true, "scope": "resource" }, - "pacifica.debuggerServerPort": { + "deviceSimulatorExpress.debuggerServerPort": { "type": "number", "default": 5577, - "description": "%pacificaExtension.configuration.properties.debuggerPort%", + "description": "%deviceSimulatorExpressExtension.configuration.properties.debuggerPort%", "scope": "resource" } } @@ -186,8 +186,8 @@ ], "debuggers": [ { - "type": "pacifica", - "label": "Pacifica Simulator Debugger", + "type": "deviceSimulatorExpress", + "label": "Device Simulator Express Debugger", "languages": [ "python" ], @@ -236,20 +236,20 @@ }, "initialConfigurations": [ { - "type": "pacifica", + "type": "deviceSimulatorExpress", "request": "launch", - "name": "Pacifica Simulator Debugger", + "name": "Device Simulator Express Debugger", "console": "integratedTerminal" } ], "configurationSnippets": [ { - "label": "Pacifica Simulator Debugger : Launch", - "description": "Pacifica Simulator Debugger - A configuration for debugging a python code file for the Pacifica simulator.", + "label": "Device Simulator Express Debugger : Launch", + "description": "Device Simulator Express Debugger - A configuration for debugging a python code file for the Device Simulator Express simulator.", "body": { - "type": "pacifica", + "type": "deviceSimulatorExpress", "request": "launch", - "name": "Pacifica Simulator Debugger", + "name": "Device Simulator Express Debugger", "console": "integratedTerminal" } } diff --git a/package.nls.json b/package.nls.json index 88e726942..49d2906a0 100644 --- a/package.nls.json +++ b/package.nls.json @@ -1,16 +1,16 @@ { - "pacificaExtension.commands.changeBaudRate": "Change Baud Rate", - "pacificaExtension.commands.closeSerialMonitor": "Close Serial Monitor", - "pacificaExtension.commands.label": "Pacifica", - "pacificaExtension.commands.openSerialMonitor": "Open Serial Monitor", - "pacificaExtension.commands.openSimulator": "Open Simulator", - "pacificaExtension.commands.runSimulator": "Run Simulator", - "pacificaExtension.commands.newFile": "New File", - "pacificaExtension.commands.runDevice": "Deploy to Device", - "pacificaExtension.commands.selectSerialPort": "Select Serial Port", - "pacificaExtension.configuration.title": "Pacfica configuration", - "pacificaExtension.configuration.properties.open": "Whether to show 'Open Simulator' icon in editor title menu.", - "pacificaExtension.configuration.properties.device": "Whether to show 'Run Device' icon in editor title menu.", - "pacificaExtension.configuration.properties.simulator": "Whether to show 'Run Simulator' icon in editor title menu.", - "pacificaExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger." + "deviceSimulatorExpressExtension.commands.changeBaudRate": "Change Baud Rate", + "deviceSimulatorExpressExtension.commands.closeSerialMonitor": "Close Serial Monitor", + "deviceSimulatorExpressExtension.commands.label": "Device Simulator Express", + "deviceSimulatorExpressExtension.commands.openSerialMonitor": "Open Serial Monitor", + "deviceSimulatorExpressExtension.commands.openSimulator": "Open Simulator", + "deviceSimulatorExpressExtension.commands.runSimulator": "Run Simulator", + "deviceSimulatorExpressExtension.commands.newFile": "New File", + "deviceSimulatorExpressExtension.commands.runDevice": "Deploy to Device", + "deviceSimulatorExpressExtension.commands.selectSerialPort": "Select Serial Port", + "deviceSimulatorExpressExtension.configuration.title": "Device Simulator Express configuration", + "deviceSimulatorExpressExtension.configuration.properties.open": "Whether to show 'Open Simulator' icon in editor title menu.", + "deviceSimulatorExpressExtension.configuration.properties.device": "Whether to show 'Run Device' icon in editor title menu.", + "deviceSimulatorExpressExtension.configuration.properties.simulator": "Whether to show 'Run Simulator' icon in editor title menu.", + "deviceSimulatorExpressExtension.configuration.properties.debuggerPort": "The port the Server will listen on for communication with the debugger." } diff --git a/src/constants.ts b/src/constants.ts index 2dff4dabc..9b6fc2596 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -9,7 +9,7 @@ import { MessageItem } from "vscode"; export const SERVER_INFO = { DEFAULT_SERVER_PORT: 5577, ERROR_CODE_INIT_SERVER: "ERROR_INIT_SERVER", - SERVER_PORT_CONFIGURATION: "pacifica.debuggerServerPort" + SERVER_PORT_CONFIGURATION: "deviceSimulatorExpress.debuggerServerPort" }; const localize: nls.LocalizeFunc = nls.config({ @@ -17,11 +17,11 @@ const localize: nls.LocalizeFunc = nls.config({ })(); export const CONFIG = { - SHOW_DEPENDENCY_INSTALL: "pacifica.showDependencyInstall" -} + SHOW_DEPENDENCY_INSTALL: "deviceSimulatorExpress.showDependencyInstall" +}; export const CONSTANTS = { - DEBUG_CONFIGURATION_TYPE: "pacifica", + DEBUG_CONFIGURATION_TYPE: "deviceSimulatorExpress", DEPENDENCY_CHECKER: { PIP3: "pip3", PYTHON: "python", @@ -38,7 +38,7 @@ export const CONSTANTS = { DEBUGGER_SERVER_INIT_FAILED: (port: number) => { return localize( "error.debuggerServerInitFailed", - `Warning : The Debugger Server cannot be opened. Please try to free the port ${port} if it's already in use or select another one in your Settings 'Pacifica: Debugger Server Port' and start another debug session.\n You can still debug your code but you won't be able to use the Simulator.` + `Warning : The Debugger Server cannot be opened. Please try to free the port ${port} if it's already in use or select another one in your Settings 'Device Simulator Express: Debugger Server Port' and start another debug session.\n You can still debug your code but you won't be able to use the Simulator.` ); }, DEBUGGING_SESSION_IN_PROGESS: localize( @@ -173,7 +173,10 @@ export const CONSTANTS = { ), REDIRECT: localize("info.redirect", "You are being redirected."), RUNNING_CODE: localize("info.runningCode", "Running user code"), - SUCCESSFUL_INSTALL: localize("info.successfulInstall", "Successfully installed Python dependencies."), + SUCCESSFUL_INSTALL: localize( + "info.successfulInstall", + "Successfully installed Python dependencies." + ), THIRD_PARTY_WEBSITE: localize( "info.thirdPartyWebsite", 'By clicking "Agree and Proceed" you will be redirected to adafruit.com, a third party website not managed by Microsoft. Please note that your activity on adafruit.com is subject to Adafruit\'s privacy policy' @@ -184,7 +187,7 @@ export const CONSTANTS = { ) }, LABEL: { - WEBVIEW_PANEL: localize("label.webviewPanel", "Adafruit CPX") + WEBVIEW_PANEL: localize("label.webviewPanel", "Device Simulator Express") }, LINKS: { DOWNLOAD_PYTHON: "https://www.python.org/downloads/", @@ -203,10 +206,10 @@ export const CONSTANTS = { ), SERIAL_MONITOR_NAME: localize( "misc.serialMonitorName", - "Pacifica Serial Monitor" + "Device Simulator Express Serial Monitor" ) }, - NAME: localize("name", "Pacifica Simulator"), + NAME: localize("name", "Device Simulator Express"), WARNING: { ACCEPT_AND_RUN: localize( "warning.agreeAndRun", @@ -242,7 +245,7 @@ export const CONSTANTS = { }; export enum CONFIG_KEYS { - ENABLE_USB_DETECTION = "pacifica.enableUSBDetection" + ENABLE_USB_DETECTION = "deviceSimulatorExpress.enableUSBDetection" } export enum TelemetryEventName { diff --git a/src/extension.ts b/src/extension.ts index 37a6a3365..012954ff8 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -224,7 +224,7 @@ export async function activate(context: vscode.ExtensionContext) { // Open Simulator on the webview const openSimulator: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.openSimulator", + "deviceSimulatorExpress.openSimulator", () => { telemetryAI.trackFeatureUsage(TelemetryEventName.COMMAND_OPEN_SIMULATOR); telemetryAI.runWithLatencyMeasure( @@ -288,7 +288,7 @@ export async function activate(context: vscode.ExtensionContext) { }; const newFile: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.newFile", + "deviceSimulatorExpress.newFile", () => { telemetryAI.trackFeatureUsage(TelemetryEventName.COMMAND_NEW_FILE); telemetryAI.runWithLatencyMeasure( @@ -488,7 +488,7 @@ export async function activate(context: vscode.ExtensionContext) { }; const runSimulatorEditorButton: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.runSimulatorEditorButton", + "deviceSimulatorExpress.runSimulatorEditorButton", () => { telemetryAI.trackFeatureUsage(TelemetryEventName.COMMAND_RUN_EDITOR_ICON); runSimulatorCommand(); @@ -497,7 +497,7 @@ export async function activate(context: vscode.ExtensionContext) { // Send message to the webview const runSimulator: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.runSimulator", + "deviceSimulatorExpress.runSimulator", () => { telemetryAI.trackFeatureUsage(TelemetryEventName.COMMAND_RUN_PALETTE); runSimulatorCommand(); @@ -624,7 +624,7 @@ export async function activate(context: vscode.ExtensionContext) { }; const runDevice: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.runDevice", + "deviceSimulatorExpress.runDevice", () => { telemetryAI.trackFeatureUsage(TelemetryEventName.COMMAND_DEPLOY_DEVICE); telemetryAI.runWithLatencyMeasure( @@ -641,7 +641,7 @@ export async function activate(context: vscode.ExtensionContext) { } const selectSerialPort: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.selectSerialPort", + "deviceSimulatorExpress.selectSerialPort", () => { if (serialMonitor) { telemetryAI.runWithLatencyMeasure( @@ -656,7 +656,7 @@ export async function activate(context: vscode.ExtensionContext) { ); const openSerialMonitor: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.openSerialMonitor", + "deviceSimulatorExpress.openSerialMonitor", () => { if (serialMonitor) { telemetryAI.runWithLatencyMeasure( @@ -671,7 +671,7 @@ export async function activate(context: vscode.ExtensionContext) { ); const changeBaudRate: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.changeBaudRate", + "deviceSimulatorExpress.changeBaudRate", () => { if (serialMonitor) { telemetryAI.runWithLatencyMeasure( @@ -686,7 +686,7 @@ export async function activate(context: vscode.ExtensionContext) { ); const closeSerialMonitor: vscode.Disposable = vscode.commands.registerCommand( - "pacifica.closeSerialMonitor", + "deviceSimulatorExpress.closeSerialMonitor", (port, showWarning = true) => { if (serialMonitor) { telemetryAI.runWithLatencyMeasure( @@ -722,7 +722,7 @@ export async function activate(context: vscode.ExtensionContext) { // On Debug Session Start: Init comunication const debugSessionsStarted = vscode.debug.onDidStartDebugSession(() => { - if (simulatorDebugConfiguration.pacificaDebug) { + if (simulatorDebugConfiguration.deviceSimulatorExpressDebug) { // Reinitialize process killProcessIfRunning(); console.log("Debug Started"); @@ -761,10 +761,10 @@ export async function activate(context: vscode.ExtensionContext) { // On Debug Session Stop: Stop communiation const debugSessionStopped = vscode.debug.onDidTerminateDebugSession(() => { - if (simulatorDebugConfiguration.pacificaDebug) { + if (simulatorDebugConfiguration.deviceSimulatorExpressDebug) { console.log("Debug Stopped"); inDebugMode = false; - simulatorDebugConfiguration.pacificaDebug = false; + simulatorDebugConfiguration.deviceSimulatorExpressDebug = false; if (debuggerCommunicationHandler) { debuggerCommunicationHandler.closeConnection(); debuggerCommunicationHandler = undefined; diff --git a/src/serialMonitor.ts b/src/serialMonitor.ts index 46d94ffb6..a022ddb1b 100644 --- a/src/serialMonitor.ts +++ b/src/serialMonitor.ts @@ -59,18 +59,18 @@ export class SerialMonitor implements vscode.Disposable { this._outputChannel = vscode.window.createOutputChannel(CONSTANTS.MISC.SERIAL_MONITOR_NAME); this._currentBaudRate = defaultBaudRate; this._portsStatusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, STATUS_BAR_PRIORITY.PORT); - this._portsStatusBar.command = "pacifica.selectSerialPort"; + this._portsStatusBar.command = "deviceSimulatorExpress.selectSerialPort"; this._portsStatusBar.tooltip = "Select Serial Port"; this._portsStatusBar.show(); this._openPortStatusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, STATUS_BAR_PRIORITY.OPEN_PORT); - this._openPortStatusBar.command = "pacifica.openSerialMonitor"; + this._openPortStatusBar.command = "deviceSimulatorExpress.openSerialMonitor"; this._openPortStatusBar.text = `$(plug)`; this._openPortStatusBar.tooltip = "Open Serial Monitor"; this._openPortStatusBar.show(); this._baudRateStatusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, STATUS_BAR_PRIORITY.BAUD_RATE); - this._baudRateStatusBar.command = "pacifica.changeBaudRate"; + this._baudRateStatusBar.command = "deviceSimulatorExpress.changeBaudRate"; this._baudRateStatusBar.tooltip = "Baud Rate"; this._baudRateStatusBar.text = defaultBaudRate.toString(); this.updatePortListStatus(null); @@ -202,12 +202,12 @@ export class SerialMonitor implements vscode.Disposable { private updatePortStatus(isOpened: boolean) { if (isOpened) { - this._openPortStatusBar.command = "pacifica.closeSerialMonitor"; + this._openPortStatusBar.command = "deviceSimulatorExpress.closeSerialMonitor"; this._openPortStatusBar.text = `$(x)`; this._openPortStatusBar.tooltip = "Close Serial Monitor"; this._baudRateStatusBar.show(); } else { - this._openPortStatusBar.command = "pacifica.openSerialMonitor"; + this._openPortStatusBar.command = "deviceSimulatorExpress.openSerialMonitor"; this._openPortStatusBar.text = `$(plug)`; this._openPortStatusBar.tooltip = "Open Serial Monitor"; this._baudRateStatusBar.hide(); diff --git a/src/simulatorDebugConfigurationProvider.ts b/src/simulatorDebugConfigurationProvider.ts index 8e167539a..50c7f02c4 100644 --- a/src/simulatorDebugConfigurationProvider.ts +++ b/src/simulatorDebugConfigurationProvider.ts @@ -12,10 +12,10 @@ let shouldShowInvalidFileNamePopup: boolean = true; export class SimulatorDebugConfigurationProvider implements vscode.DebugConfigurationProvider { - public pacificaDebug: boolean; + public deviceSimulatorExpressDebug: boolean; constructor(private pathToScript: string) { - this.pacificaDebug = false; + this.deviceSimulatorExpressDebug = false; } /** @@ -34,15 +34,15 @@ export class SimulatorDebugConfigurationProvider activeTextEditor && activeTextEditor.document.languageId === "python" ) { - config.type = "pacifica"; + config.type = "deviceSimulatorExpress"; config.request = "launch"; - config.name = "Pacifica Simulator Debugger"; + config.name = "Device Simulator Express Debugger"; config.console = "integratedTerminal"; } } // Check config type if (config.type === CONSTANTS.DEBUG_CONFIGURATION_TYPE) { - this.pacificaDebug = true; + this.deviceSimulatorExpressDebug = true; if (activeTextEditor) { const currentFilePath = activeTextEditor.document.fileName; diff --git a/src/view/translations/en.json b/src/view/translations/en.json index 2c98af38d..f69c49564 100644 --- a/src/view/translations/en.json +++ b/src/view/translations/en.json @@ -4,14 +4,14 @@ "toolbar-gpio.tryItDescription": "Use your mouse to interact with the pin A1 - A7 or use your keyboard SHIFT+”1” - “7”", "toolbar-ir-sensor.description": "Allows you to send commands to the CPX with a remote control, or even send messages between multiple CPXs! You can also do very simple proximity sensing since it reads the reflected light.", "toolbar-ir-sensor.title": "IR Transmit & Receiver", - "toolbar-ir-sensor.tryItDescription": "We’re working hard to support this sensor on the simulator in the Pacifica. You can try it on MakeCode!", - "toolbar-ir-sensor.tryItTitle": "We’re working hard to support this sensor on the simulator in the Pacifica. You can try it on MakeCode!", + "toolbar-ir-sensor.tryItDescription": "We’re working hard to support this sensor on the simulator in the Device Simulator Express. You can try it on MakeCode!", + "toolbar-ir-sensor.tryItTitle": "We’re working hard to support this sensor on the simulator in the Device Simulator Express. You can try it on MakeCode!", "toolbar-light-sensor.description": "An analog light sensor can be used to detect ambient light, with similar spectral response to the human eye.", "toolbar-light-sensor.title": "Light Sensor", "toolbar-light-sensor.tryItDescription": "Change the brightness from 0 - 255 here!", "toolbar-motion-sensor.description": "Detects acceleration in XYZ orientations. And can also detect 'tap' and 'double tap' strikes on the board and when the board is shaken.", "toolbar-motion-sensor.title": "Motion Sensor", - "toolbar-motion-sensor.tryItDescription": "Change the acceleration here and click or click on the button to simulate a shake.The tap feature is not supported by pacifica. You can try it on MakeCode!", + "toolbar-motion-sensor.tryItDescription": "Change the acceleration here and click or click on the button to simulate a shake.The tap feature is not supported by the Device Simulator Express. You can try it on MakeCode!", "toolbar-neo-pixels.description": "The 10 full color RGB LEDs surrounding the outer edge of the boards can be set to any color. Great for beautiful lighting effects!", "toolbar-neo-pixels.title": "NeoPixels", "toolbar-neo-pixels.tryItDescription": "Run your code and see the cool effects on the simulator!", @@ -23,7 +23,7 @@ "toolbar-red-led.tryItDescription": "Run your code and see the cool effects on the simulator!", "toolbar-sound-sensor.description": "A digital microphone can detect audio volume and even perform basic FFT functions but cannot read it like an analog voltage.", "toolbar-sound-sensor.title": "Sound Sensor", - "toolbar-sound-sensor.tryItDescription": "We’re working hard to support this sensor on the simulator in the Pacifica. You can try it on MakeCode!", + "toolbar-sound-sensor.tryItDescription": "We’re working hard to support this sensor on the simulator in the Device Simulator Express. You can try it on MakeCode!", "toolbar-slider-switch.description": "This slide switch returns True or False depending on whether it's ON or OFF and can be used as a toggle switch in your code!", "toolbar-slider-switch.title": "Slider Switch", "toolbar-slider-switch.tryItDescription": "Click it with your mouse or press 'S' on your keyboard to switch it ON and OFF!",