From 887998ecd203141446c2474f74298f00768a29bc Mon Sep 17 00:00:00 2001 From: William Vinnicombe Date: Wed, 8 Jan 2025 18:01:20 +0000 Subject: [PATCH] Add initial translation support Attempt to add support for translations, with an initial pseudo-language translation Uses l10n, which is the recommended latest tooling for VS Code localization --- l10n/bundle.l10n.json | 256 +++++++++++++++++ l10n/bundle.l10n.qps-ploc.json | 256 +++++++++++++++++ package.json | 1 + scripts/genTranslations.py | 23 ++ src/commands/clearGithubApiCache.mts | 4 +- src/commands/compileProject.mts | 4 +- src/commands/configureCmake.mts | 22 +- src/commands/flashProjectSwd.mts | 4 +- src/commands/launchTargetPath.mts | 6 +- src/commands/newProject.mts | 6 +- src/commands/openSdkDocumentation.mts | 13 +- src/commands/runProject.mts | 4 +- src/commands/switchBoard.mts | 33 ++- src/commands/switchSDK.mts | 113 ++++---- src/commands/uninstallPicoSDK.mts | 17 +- src/extension.mts | 49 ++-- src/ui.mts | 22 +- src/utils/cmakeUtil.mts | 12 +- src/utils/download.mts | 4 +- src/utils/gitUtil.mts | 11 +- src/utils/githubREST.mts | 6 +- src/utils/pythonHelper.mts | 23 +- src/utils/requirementsUtil.mts | 28 +- src/webview/activityBar.mts | 35 +-- src/webview/newMicroPythonProjectPanel.mts | 70 +++-- src/webview/newProjectPanel.mts | 308 +++++++++++---------- web/main.js | 4 +- web/nav.js | 8 +- 28 files changed, 944 insertions(+), 398 deletions(-) create mode 100644 l10n/bundle.l10n.json create mode 100644 l10n/bundle.l10n.qps-ploc.json create mode 100644 scripts/genTranslations.py diff --git a/l10n/bundle.l10n.json b/l10n/bundle.l10n.json new file mode 100644 index 00000000..a5db06b7 --- /dev/null +++ b/l10n/bundle.l10n.json @@ -0,0 +1,256 @@ +{ + "$(file-binary) Compile": "$(file-binary) Compile", + "Compile Project": "Compile Project", + "$(run) Run": "$(run) Run", + "Run Project": "Run Project", + "Pico SDK: ": "Pico SDK: ", + "Select Pico SDK": "Select Pico SDK", + "Board: ": "Board: ", + "Select Board": "Select Board", + "Do you want to import this project as Raspberry Pi Pico project?": "Do you want to import this project as Raspberry Pi Pico project?", + "Yes": "Yes", + "No": "No", + "Downloading and installing Pico SDK as selected.": "Downloading and installing Pico SDK as selected.", + "This may take a while...": "This may take a while...", + "Failed to install project SDK version.": "Failed to install project SDK version.", + "Failed to detect project toolchain version.": "Failed to detect project toolchain version.", + "Downloading and installing toolchain as selected.": "Downloading and installing toolchain as selected.", + "Failed to install project toolchain version.": "Failed to install project toolchain version.", + "Downloading and installing tools as selected.": "Downloading and installing tools as selected.", + "Downloading and installing picotool as selected.": "Downloading and installing picotool as selected.", + "Failed to install picotool.": "Failed to install picotool.", + "Downloading and installing OpenOCD.": "Downloading and installing OpenOCD.", + "Failed to download and install OpenOCD.": "Failed to download and install OpenOCD.", + "OpenOCD found/installed successfully.": "OpenOCD found/installed successfully.", + "Downloading and installing Ninja.": "Downloading and installing Ninja.", + "Downloading and installing CMake.": "Downloading and installing CMake.", + "Select": "Select", + "Select a project folder to import": "Select a project folder to import", + "Select a project root to create the new project folder in": "Select a project root to create the new project folder in", + "Import Pico Project": "Import Pico Project", + "New Pico Project": "New Pico Project", + "Failed to load settings. Please restart VS Code or reload the window.": "Failed to load settings. Please restart VS Code or reload the window.", + "Reload Window": "Reload Window", + "Failed to load settings. Please restart VSCode.": "Failed to load settings. Please restart VSCode.", + "No project to import selected. Please select a project folder.": "No project to import selected. Please select a project folder.", + "No project root selected. Please select a project root.": "No project root selected. Please select a project root.", + "Project folder name cannot contain spaces.": "Project folder name cannot contain spaces.", + "The project you are trying to import does not exist.": "The project you are trying to import does not exist.", + "Project already exists. Please select a different project root or example.": "Project already exists. Please select a different project root or example.", + "Failed to find example. Try reinstalling the extension.": "Failed to find example. Try reinstalling the extension.", + "Failed to setup example.": "Failed to setup example.", + "Generating project based on the {0} example in {1}.": "Generating project based on the {0} example in {1}.", + "Project name cannot be empty.": "Project name cannot be empty.", + "Project already exists. Please select a different project name or root.": "Project already exists. Please select a different project name or root.", + "Generating project {0} in {1}.": "Generating project {0} in {1}.", + "Failed to find selected toolchain.": "Failed to find selected toolchain.", + "Failed": "Failed", + "Failed to find selected SDK version.": "Failed to find selected SDK version.", + "Downloading and installing SDK": "Downloading and installing SDK", + "Failed - Make sure all requirements are met.": "Failed - Make sure all requirements are met.", + "Failed to download and install SDK. Make sure all requirements are met.": "Failed to download and install SDK. Make sure all requirements are met.", + "Downloading and installing toolchain": "Downloading and installing toolchain", + "Failed to download and install toolchain.": "Failed to download and install toolchain.", + "Downloading and installing tools": "Downloading and installing tools", + "Failed to download and install tools.": "Failed to download and install tools.", + "Downloading and installing picotool": "Downloading and installing picotool", + "Failed to download and install picotool.": "Failed to download and install picotool.", + "Downloading and installing OpenOCD": "Downloading and installing OpenOCD", + "Failed to get ninja version for the selected Pico SDK version.": "Failed to get ninja version for the selected Pico SDK version.", + "Download and install Ninja": "Download and install Ninja", + "Successfully downloaded and installed Ninja.": "Successfully downloaded and installed Ninja.", + "Failed to download and install ninja. Make sure all requirements are met.": "Failed to download and install ninja. Make sure all requirements are met.", + "Unknown ninja selection.": "Unknown ninja selection.", + "Download and install CMake": "Download and install CMake", + "Successfully downloaded and installed CMake.": "Successfully downloaded and installed CMake.", + "Failed to download and install CMake. Make sure all requirements are met.": "Failed to download and install CMake. Make sure all requirements are met.", + "Unknown cmake selection.": "Unknown cmake selection.", + "Unknown project type.": "Unknown project type.", + "New Example Pico Project": "New Example Pico Project", + "Failed to load available Pico SDKs and/or supported toolchains. This may be due to an outdated personal access token for GitHub or a exceeded rate limit.": "Failed to load available Pico SDKs and/or supported toolchains. This may be due to an outdated personal access token for GitHub or a exceeded rate limit.", + "Error while retrieving SDK and toolchain versions.": "Error while retrieving SDK and toolchain versions.", + "Not all requirements are met. Automatic ninja installation is currently not supported on aarch64 Linux systems. Please install ninja manually.": "Not all requirements are met. Automatic ninja installation is currently not supported on aarch64 Linux systems. Please install ninja manually.", + "Show Advanced Options": "Show Advanced Options", + "Hide Advanced Options": "Hide Advanced Options", + "Select an example": "Select an example", + "Project name": "Project name", + "Custom": "Custom", + "Example": "Example", + "Basic Settings": "Basic Settings", + "Features": "Features", + "Stdio support": "Stdio support", + "Pico wireless options": "Pico wireless options", + "Code generation options": "Code generation options", + "Debugger": "Debugger", + "Name": "Name", + "Create from example": "Create from example", + "Error": "Error", + "Please enter a valid project name.": "Please enter a valid project name.", + "Board type": "Board type", + "Other": "Other", + "Architecture (Pico 2)": "Architecture (Pico 2)", + "Warning: Project Import Wizard may not work for all projects, and will often require manual correction after the import": "Warning: Project Import Wizard may not work for all projects, and will often require manual correction after the import", + "Location": "Location", + "Change": "Change", + "Select Pico SDK version": "Select Pico SDK version", + "Select ARM/RISCV Embeded Toolchain version": "Select ARM/RISCV Embeded Toolchain version", + "Select picotool version": "Select picotool version", + "Ninja Version:": "Ninja Version:", + "Default version": "Default version", + "Use system version": "Use system version", + "Select version:": "Select version:", + "Path to executable:": "Path to executable:", + "CMake Version:": "CMake Version:", + "SPI": "SPI", + "I2C interface": "I2C interface", + "UART": "UART", + "PIO interface": "PIO interface", + "DMA support": "DMA support", + "HW interpolation": "HW interpolation", + "HW watchdog": "HW watchdog", + "HW timer": "HW timer", + "HW clocks": "HW clocks", + "Console over UART": "Console over UART", + "Console over USB (disables other USB use)": "Console over USB (disables other USB use)", + "None": "None", + "Pico W onboard LED": "Pico W onboard LED", + "Polled lwIP": "Polled lwIP", + "Background lwIP": "Background lwIP", + "Run the program from RAM rather than flash": "Run the program from RAM rather than flash", + "Use project name as entry point file name": "Use project name as entry point file name", + "Generate C++ code": "Generate C++ code", + "Enable C++ RTTI (Uses more memory)": "Enable C++ RTTI (Uses more memory)", + "Enable C++ exceptions (Uses more memory)": "Enable C++ exceptions (Uses more memory)", + "DebugProbe (CMSIS-DAP) [Default]": "DebugProbe (CMSIS-DAP) [Default]", + "SWD (Pi host, on Pi 5 it requires Linux Kernel >= 6.6.47)": "SWD (Pi host, on Pi 5 it requires Linux Kernel >= 6.6.47)", + "CMake Tools": "CMake Tools", + "Enable CMake-Tools extension integration": "Enable CMake-Tools extension integration", + "Cancel": "Cancel", + "Import": "Import", + "Create": "Create", + "Unknown board type:": "Unknown board type:", + "Successfully generated new project: {0}": "Successfully generated new project: {0}", + "Could not import new project": "Could not import new project", + "Could not create new project": "Could not create new project", + "New MicroPython Pico Project": "New MicroPython Pico Project", + "The project name is empty. Please enter a project name.": "The project name is empty. Please enter a project name.", + "Generating MicroPico project {0} in {1}...": "Generating MicroPico project {0} in {1}...", + "Failed to generate MicroPython project.": "Failed to generate MicroPython project.", + "Please try again and check your settings.": "Please try again and check your settings.", + "Failed to find python3 executable.": "Failed to find python3 executable.", + "Creating project folder {0}": "Creating project folder {0}", + "Failed to create project folder {0}": "Failed to create project folder {0}", + "Project initialized": "Project initialized", + "Failed to load webview for new MicroPython project": "Failed to load webview for new MicroPython project", + "New Pico MicroPython Project": "New Pico MicroPython Project", + "Python Version:": "Python Version:", + "From Python extension": "From Python extension", + "General": "General", + "Project": "Project", + "Documentation": "Documentation", + "New C/C++ Project": "New C/C++ Project", + "New MicroPython Project": "New MicroPython Project", + "Import Project": "Import Project", + "New Project From Example": "New Project From Example", + "Switch SDK": "Switch SDK", + "Switch Board": "Switch Board", + "Run Project (USB)": "Run Project (USB)", + "Flash Project (SWD)": "Flash Project (SWD)", + "Configure CMake": "Configure CMake", + "Clean CMake": "Clean CMake", + "Debug Project": "Debug Project", + "Debug Layout": "Debug Layout", + "N/A": "N/A", + "Development for the Pico requires {0} to be installed and available in PATH. Please install and restart VS Code.": "Development for the Pico requires {0} to be installed and available in PATH. Please install and restart VS Code.", + "The installation of the Pico SDK requires Git version {0} or higher to be installed and available in the PATH - you have version {1}.": "The installation of the Pico SDK requires Git version {0} or higher to be installed and available in the PATH - you have version {1}.", + "The installation of the Pico SDK requires Git to be installed and available in the PATH.": "The installation of the Pico SDK requires Git to be installed and available in the PATH.", + " You can install it by running `xcode-select --install` in the terminal and restarting your computer.": " You can install it by running `xcode-select --install` in the terminal and restarting your computer.", + "Searching for Python.": "Searching for Python.", + "This may take a while if it has to be downloaded.": "This may take a while if it has to be downloaded.", + "Downloading Python": "Downloading Python", + "Unsupported architecture for Windows: ": "Unsupported architecture for Windows: ", + "Failed to find any valid Python installation. Make sure Python >=3.9 is installed. You can set a Python executable directly in your user settings or select in the Python extension.": "Failed to find any valid Python installation. Make sure Python >=3.9 is installed. You can set a Python executable directly in your user settings or select in the Python extension.", + "Open Python Extension": "Open Python Extension", + "Edit Settings": "Edit Settings", + "Found Git version {0}, but requires {1}.": "Found Git version {0}, but requires {1}.", + "Please install and add to PATH or set the path to the git executable in global settings.": "Please install and add to PATH or set the path to the git executable in global settings.", + "Git not found.": "Git not found.", + "Your GitHub Personal Access Token might be invalid or expired.": "Your GitHub Personal Access Token might be invalid or expired.", + "It has now been removed from the settings.": "It has now been removed from the settings.", + "Python3 is not installed and in PATH.": "Python3 is not installed and in PATH.", + "CMake currently does not support folder names with backslashes.": "CMake currently does not support folder names with backslashes.", + "Failed to configure cmake for the current project.": "Failed to configure cmake for the current project.", + "Configuring CMake...": "Configuring CMake...", + "The new SDK version does not support your current board": "The new SDK version does not support your current board", + "Please select a new board type": "Please select a new board type", + "Uninstalling Pico SDK - Are you sure you want to continue?": "Uninstalling Pico SDK - Are you sure you want to continue?", + "This will delete the Pico SDK and all its automatically installed dependencies from the system. This action cannot be undone.": "This will delete the Pico SDK and all its automatically installed dependencies from the system. This action cannot be undone.", + "Pico SDK uninstalled successfully": "Pico SDK uninstalled successfully", + "Failed to uninstall Pico SDK": "Failed to uninstall Pico SDK", + "Specific version": "Specific version", + "Custom path": "Custom path", + "Default": "Default", + "Use system CMake": "Use system CMake", + "Failed to get CMake releases.": "Failed to get CMake releases.", + "Make sure you are connected to the internet.": "Make sure you are connected to the internet.", + "Select CMake version": "Select CMake version", + "Select a cmake executable to use for this project": "Select a cmake executable to use for this project", + "Use system Ninja": "Use system Ninja", + "Failed to get Ninja releases.": "Failed to get Ninja releases.", + "Select Ninja version": "Select Ninja version", + "Select a ninja executable to use for this project": "Select a ninja executable to use for this project", + "Failed to get supported toolchain versions.": "Failed to get supported toolchain versions.", + "Failed to get SDK releases.": "Failed to get SDK releases.", + "Select SDK version": "Select SDK version", + "Please open a Pico project folder first.": "Please open a Pico project folder first.", + "Switch Tools": "Switch Tools", + "Configure advanced options?": "Configure advanced options?", + "Installing SDK...": "Installing SDK...", + "Successfully installed SDK {0}.": "Successfully installed SDK {0}.", + "Failed to install SDK {0}.": "Failed to install SDK {0}.", + "Make sure all requirements are met.": "Make sure all requirements are met.", + "Installing toolchain...": "Installing toolchain...", + "Successfully installed toolchain {0}.": "Successfully installed toolchain {0}.", + "Failed to install toolchain {0}.": "Failed to install toolchain {0}.", + "Installing tools...": "Installing tools...", + "Successfully installed tools.": "Successfully installed tools.", + "Failed to install tools.": "Failed to install tools.", + "Downloading and installing Ninja...": "Downloading and installing Ninja...", + "Successfully installed Ninja.": "Successfully installed Ninja.", + "Failed to install Ninja.": "Failed to install Ninja.", + "Downloading and installing CMake...": "Downloading and installing CMake...", + "Successfully installed CMake.": "Successfully installed CMake.", + "Failed to install CMake.": "Failed to install CMake.", + "Updating project configuration...": "Updating project configuration...", + "Project configuration updated.": "Project configuration updated.", + "CMakeLists.txt updated.": "CMakeLists.txt updated.", + "Failed to update CMakeLists.txt for new SDK version.": "Failed to update CMakeLists.txt for new SDK version.", + "Reload the window to update intellisense with the new SDK version.": "Reload the window to update intellisense with the new SDK version.", + "Use Risc-V?": "Use Risc-V?", + "Failed to get sdk version - cannot update board": "Failed to get sdk version - cannot update board", + "Cannot switch board automatically with SDK version {0}": "Cannot switch board automatically with SDK version {0}", + "Error switching to Risc-V toolchain": "Error switching to Risc-V toolchain", + "Installing toolchain {0}": "Installing toolchain {0}", + "Failed to update CMakeLists.txt for new toolchain version.": "Failed to update CMakeLists.txt for new toolchain version.", + "Reload the window to update intellisense with the new board.": "Reload the window to update intellisense with the new board.", + "Task {0} not found.": "Task {0} not found.", + "Hardware APIs": "Hardware APIs", + "High Level APIs": "High Level APIs", + "Networking Libraries": "Networking Libraries", + "Runtime Infrastructure": "Runtime Infrastructure", + "Select Category": "Select Category", + "Pico SDK Documentation": "Pico SDK Documentation", + "Select which language to use for your new project": "Select which language to use for your new project", + "Threadsafe Background": "Threadsafe Background", + "Poll": "Poll", + "Select PicoW Architecture": "Select PicoW Architecture", + "No workspace folder found.": "No workspace folder found.", + "You must use the CMake Tools extension to configure your build. To use this extension instead, change the useCmakeTools setting.": "You must use the CMake Tools extension to configure your build. To use this extension instead, change the useCmakeTools setting.", + "CMake has configured your build.": "CMake has configured your build.", + "CMake failed to configure your build.": "CMake failed to configure your build.", + "You must use the CMake Tools extension to clean your build. To use this extension instead, change the useCmakeTools setting.": "You must use the CMake Tools extension to clean your build. To use this extension instead, change the useCmakeTools setting.", + "Error cleaning build directory.": "Error cleaning build directory.", + "CMake has been cleaned and reconfigured.": "CMake has been cleaned and reconfigured.", + "CMake could not be reconfigured. See log for details.": "CMake could not be reconfigured. See log for details.", + "Github API cache cleared.": "Github API cache cleared." +} \ No newline at end of file diff --git a/l10n/bundle.l10n.qps-ploc.json b/l10n/bundle.l10n.qps-ploc.json new file mode 100644 index 00000000..dcb7a2e3 --- /dev/null +++ b/l10n/bundle.l10n.qps-ploc.json @@ -0,0 +1,256 @@ +{ + "$(file-binary) Compile": "$(file-binary) Ƈǿǿḿƥīŀḗḗ", + "Compile Project": "Ƈǿǿḿƥīŀḗḗ Ƥřǿǿĵḗḗƈŧ", + "$(run) Run": "$(run) Řŭŭƞ", + "Run Project": "Řŭŭƞ Ƥřǿǿĵḗḗƈŧ", + "Pico SDK: ": "Ƥīƈǿǿ ŞḒĶ: <ṽḗḗřşīǿǿƞ>", + "Select Pico SDK": "Şḗḗŀḗḗƈŧ Ƥīƈǿǿ ŞḒĶ", + "Board: ": "Ɓǿǿȧȧřḓ: <ƀǿǿȧȧřḓ>", + "Select Board": "Şḗḗŀḗḗƈŧ Ɓǿǿȧȧřḓ", + "Do you want to import this project as Raspberry Pi Pico project?": "Ḓǿǿ ẏǿǿŭŭ ẇȧȧƞŧ ŧǿǿ īḿƥǿǿřŧ ŧħīş ƥřǿǿĵḗḗƈŧ ȧȧş Řȧȧşƥƀḗḗřřẏ Ƥī Ƥīƈǿǿ ƥřǿǿĵḗḗƈŧ?", + "Yes": "Ẏḗḗş", + "No": "Ƞǿǿ", + "Downloading and installing Pico SDK as selected.": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ Ƥīƈǿǿ ŞḒĶ ȧȧş şḗḗŀḗḗƈŧḗḗḓ.", + "This may take a while...": "Ŧħīş ḿȧȧẏ ŧȧȧķḗḗ ȧȧ ẇħīŀḗḗ...", + "Failed to install project SDK version.": "Ƒȧȧīŀḗḗḓ ŧǿǿ īƞşŧȧȧŀŀ ƥřǿǿĵḗḗƈŧ ŞḒĶ ṽḗḗřşīǿǿƞ.", + "Failed to detect project toolchain version.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ḓḗḗŧḗḗƈŧ ƥřǿǿĵḗḗƈŧ ŧǿǿǿǿŀƈħȧȧīƞ ṽḗḗřşīǿǿƞ.", + "Downloading and installing toolchain as selected.": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ŧǿǿǿǿŀƈħȧȧīƞ ȧȧş şḗḗŀḗḗƈŧḗḗḓ.", + "Failed to install project toolchain version.": "Ƒȧȧīŀḗḗḓ ŧǿǿ īƞşŧȧȧŀŀ ƥřǿǿĵḗḗƈŧ ŧǿǿǿǿŀƈħȧȧīƞ ṽḗḗřşīǿǿƞ.", + "Downloading and installing tools as selected.": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ŧǿǿǿǿŀş ȧȧş şḗḗŀḗḗƈŧḗḗḓ.", + "Downloading and installing picotool as selected.": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ƥīƈǿǿŧǿǿǿǿŀ ȧȧş şḗḗŀḗḗƈŧḗḗḓ.", + "Failed to install picotool.": "Ƒȧȧīŀḗḗḓ ŧǿǿ īƞşŧȧȧŀŀ ƥīƈǿǿŧǿǿǿǿŀ.", + "Downloading and installing OpenOCD.": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ǾǾƥḗḗƞǾǾƇḒ.", + "Failed to download and install OpenOCD.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ ǾǾƥḗḗƞǾǾƇḒ.", + "OpenOCD found/installed successfully.": "ǾǾƥḗḗƞǾǾƇḒ ƒǿǿŭŭƞḓ/īƞşŧȧȧŀŀḗḗḓ şŭŭƈƈḗḗşşƒŭŭŀŀẏ.", + "Downloading and installing Ninja.": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ Ƞīƞĵȧȧ.", + "Downloading and installing CMake.": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ƇḾȧȧķḗḗ.", + "Select": "Şḗḗŀḗḗƈŧ", + "Select a project folder to import": "Şḗḗŀḗḗƈŧ ȧȧ ƥřǿǿĵḗḗƈŧ ƒǿǿŀḓḗḗř ŧǿǿ īḿƥǿǿřŧ", + "Select a project root to create the new project folder in": "Şḗḗŀḗḗƈŧ ȧȧ ƥřǿǿĵḗḗƈŧ řǿǿǿǿŧ ŧǿǿ ƈřḗḗȧȧŧḗḗ ŧħḗḗ ƞḗḗẇ ƥřǿǿĵḗḗƈŧ ƒǿǿŀḓḗḗř īƞ", + "Import Pico Project": "Īḿƥǿǿřŧ Ƥīƈǿǿ Ƥřǿǿĵḗḗƈŧ", + "New Pico Project": "Ƞḗḗẇ Ƥīƈǿǿ Ƥřǿǿĵḗḗƈŧ", + "Failed to load settings. Please restart VS Code or reload the window.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ŀǿǿȧȧḓ şḗḗŧŧīƞɠş. Ƥŀḗḗȧȧşḗḗ řḗḗşŧȧȧřŧ ṼŞ Ƈǿǿḓḗḗ ǿǿř řḗḗŀǿǿȧȧḓ ŧħḗḗ ẇīƞḓǿǿẇ.", + "Reload Window": "Řḗḗŀǿǿȧȧḓ Ẇīƞḓǿǿẇ", + "Failed to load settings. Please restart VSCode.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ŀǿǿȧȧḓ şḗḗŧŧīƞɠş. Ƥŀḗḗȧȧşḗḗ řḗḗşŧȧȧřŧ ṼŞƇǿǿḓḗḗ.", + "No project to import selected. Please select a project folder.": "Ƞǿǿ ƥřǿǿĵḗḗƈŧ ŧǿǿ īḿƥǿǿřŧ şḗḗŀḗḗƈŧḗḗḓ. Ƥŀḗḗȧȧşḗḗ şḗḗŀḗḗƈŧ ȧȧ ƥřǿǿĵḗḗƈŧ ƒǿǿŀḓḗḗř.", + "No project root selected. Please select a project root.": "Ƞǿǿ ƥřǿǿĵḗḗƈŧ řǿǿǿǿŧ şḗḗŀḗḗƈŧḗḗḓ. Ƥŀḗḗȧȧşḗḗ şḗḗŀḗḗƈŧ ȧȧ ƥřǿǿĵḗḗƈŧ řǿǿǿǿŧ.", + "Project folder name cannot contain spaces.": "Ƥřǿǿĵḗḗƈŧ ƒǿǿŀḓḗḗř ƞȧȧḿḗḗ ƈȧȧƞƞǿǿŧ ƈǿǿƞŧȧȧīƞ şƥȧȧƈḗḗş.", + "The project you are trying to import does not exist.": "Ŧħḗḗ ƥřǿǿĵḗḗƈŧ ẏǿǿŭŭ ȧȧřḗḗ ŧřẏīƞɠ ŧǿǿ īḿƥǿǿřŧ ḓǿǿḗḗş ƞǿǿŧ ḗḗẋīşŧ.", + "Project already exists. Please select a different project root or example.": "Ƥřǿǿĵḗḗƈŧ ȧȧŀřḗḗȧȧḓẏ ḗḗẋīşŧş. Ƥŀḗḗȧȧşḗḗ şḗḗŀḗḗƈŧ ȧȧ ḓīƒƒḗḗřḗḗƞŧ ƥřǿǿĵḗḗƈŧ řǿǿǿǿŧ ǿǿř ḗḗẋȧȧḿƥŀḗḗ.", + "Failed to find example. Try reinstalling the extension.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ƒīƞḓ ḗḗẋȧȧḿƥŀḗḗ. Ŧřẏ řḗḗīƞşŧȧȧŀŀīƞɠ ŧħḗḗ ḗḗẋŧḗḗƞşīǿǿƞ.", + "Failed to setup example.": "Ƒȧȧīŀḗḗḓ ŧǿǿ şḗḗŧŭŭƥ ḗḗẋȧȧḿƥŀḗḗ.", + "Generating project based on the {0} example in {1}.": "Ɠḗḗƞḗḗřȧȧŧīƞɠ ƥřǿǿĵḗḗƈŧ ƀȧȧşḗḗḓ ǿǿƞ ŧħḗḗ {0} ḗḗẋȧȧḿƥŀḗḗ īƞ {1}.", + "Project name cannot be empty.": "Ƥřǿǿĵḗḗƈŧ ƞȧȧḿḗḗ ƈȧȧƞƞǿǿŧ ƀḗḗ ḗḗḿƥŧẏ.", + "Project already exists. Please select a different project name or root.": "Ƥřǿǿĵḗḗƈŧ ȧȧŀřḗḗȧȧḓẏ ḗḗẋīşŧş. Ƥŀḗḗȧȧşḗḗ şḗḗŀḗḗƈŧ ȧȧ ḓīƒƒḗḗřḗḗƞŧ ƥřǿǿĵḗḗƈŧ ƞȧȧḿḗḗ ǿǿř řǿǿǿǿŧ.", + "Generating project {0} in {1}.": "Ɠḗḗƞḗḗřȧȧŧīƞɠ ƥřǿǿĵḗḗƈŧ {0} īƞ {1}.", + "Failed to find selected toolchain.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ƒīƞḓ şḗḗŀḗḗƈŧḗḗḓ ŧǿǿǿǿŀƈħȧȧīƞ.", + "Failed": "Ƒȧȧīŀḗḗḓ", + "Failed to find selected SDK version.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ƒīƞḓ şḗḗŀḗḗƈŧḗḗḓ ŞḒĶ ṽḗḗřşīǿǿƞ.", + "Downloading and installing SDK": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ŞḒĶ", + "Failed - Make sure all requirements are met.": "Ƒȧȧīŀḗḗḓ - Ḿȧȧķḗḗ şŭŭřḗḗ ȧȧŀŀ řḗḗɋŭŭīřḗḗḿḗḗƞŧş ȧȧřḗḗ ḿḗḗŧ.", + "Failed to download and install SDK. Make sure all requirements are met.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ ŞḒĶ. Ḿȧȧķḗḗ şŭŭřḗḗ ȧȧŀŀ řḗḗɋŭŭīřḗḗḿḗḗƞŧş ȧȧřḗḗ ḿḗḗŧ.", + "Downloading and installing toolchain": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ŧǿǿǿǿŀƈħȧȧīƞ", + "Failed to download and install toolchain.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ ŧǿǿǿǿŀƈħȧȧīƞ.", + "Downloading and installing tools": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ŧǿǿǿǿŀş", + "Failed to download and install tools.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ ŧǿǿǿǿŀş.", + "Downloading and installing picotool": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ƥīƈǿǿŧǿǿǿǿŀ", + "Failed to download and install picotool.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ ƥīƈǿǿŧǿǿǿǿŀ.", + "Downloading and installing OpenOCD": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ǾǾƥḗḗƞǾǾƇḒ", + "Failed to get ninja version for the selected Pico SDK version.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ɠḗḗŧ ƞīƞĵȧȧ ṽḗḗřşīǿǿƞ ƒǿǿř ŧħḗḗ şḗḗŀḗḗƈŧḗḗḓ Ƥīƈǿǿ ŞḒĶ ṽḗḗřşīǿǿƞ.", + "Download and install Ninja": "Ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ Ƞīƞĵȧȧ", + "Successfully downloaded and installed Ninja.": "Şŭŭƈƈḗḗşşƒŭŭŀŀẏ ḓǿǿẇƞŀǿǿȧȧḓḗḗḓ ȧȧƞḓ īƞşŧȧȧŀŀḗḗḓ Ƞīƞĵȧȧ.", + "Failed to download and install ninja. Make sure all requirements are met.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ ƞīƞĵȧȧ. Ḿȧȧķḗḗ şŭŭřḗḗ ȧȧŀŀ řḗḗɋŭŭīřḗḗḿḗḗƞŧş ȧȧřḗḗ ḿḗḗŧ.", + "Unknown ninja selection.": "ŬŬƞķƞǿǿẇƞ ƞīƞĵȧȧ şḗḗŀḗḗƈŧīǿǿƞ.", + "Download and install CMake": "Ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ ƇḾȧȧķḗḗ", + "Successfully downloaded and installed CMake.": "Şŭŭƈƈḗḗşşƒŭŭŀŀẏ ḓǿǿẇƞŀǿǿȧȧḓḗḗḓ ȧȧƞḓ īƞşŧȧȧŀŀḗḗḓ ƇḾȧȧķḗḗ.", + "Failed to download and install CMake. Make sure all requirements are met.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ḓǿǿẇƞŀǿǿȧȧḓ ȧȧƞḓ īƞşŧȧȧŀŀ ƇḾȧȧķḗḗ. Ḿȧȧķḗḗ şŭŭřḗḗ ȧȧŀŀ řḗḗɋŭŭīřḗḗḿḗḗƞŧş ȧȧřḗḗ ḿḗḗŧ.", + "Unknown cmake selection.": "ŬŬƞķƞǿǿẇƞ ƈḿȧȧķḗḗ şḗḗŀḗḗƈŧīǿǿƞ.", + "Unknown project type.": "ŬŬƞķƞǿǿẇƞ ƥřǿǿĵḗḗƈŧ ŧẏƥḗḗ.", + "New Example Pico Project": "Ƞḗḗẇ ḖḖẋȧȧḿƥŀḗḗ Ƥīƈǿǿ Ƥřǿǿĵḗḗƈŧ", + "Failed to load available Pico SDKs and/or supported toolchains. This may be due to an outdated personal access token for GitHub or a exceeded rate limit.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ŀǿǿȧȧḓ ȧȧṽȧȧīŀȧȧƀŀḗḗ Ƥīƈǿǿ ŞḒĶş ȧȧƞḓ/ǿǿř şŭŭƥƥǿǿřŧḗḗḓ ŧǿǿǿǿŀƈħȧȧīƞş. Ŧħīş ḿȧȧẏ ƀḗḗ ḓŭŭḗḗ ŧǿǿ ȧȧƞ ǿǿŭŭŧḓȧȧŧḗḗḓ ƥḗḗřşǿǿƞȧȧŀ ȧȧƈƈḗḗşş ŧǿǿķḗḗƞ ƒǿǿř ƓīŧĦŭŭƀ ǿǿř ȧȧ ḗḗẋƈḗḗḗḗḓḗḗḓ řȧȧŧḗḗ ŀīḿīŧ.", + "Error while retrieving SDK and toolchain versions.": "ḖḖřřǿǿř ẇħīŀḗḗ řḗḗŧřīḗḗṽīƞɠ ŞḒĶ ȧȧƞḓ ŧǿǿǿǿŀƈħȧȧīƞ ṽḗḗřşīǿǿƞş.", + "Not all requirements are met. Automatic ninja installation is currently not supported on aarch64 Linux systems. Please install ninja manually.": "Ƞǿǿŧ ȧȧŀŀ řḗḗɋŭŭīřḗḗḿḗḗƞŧş ȧȧřḗḗ ḿḗḗŧ. ȦȦŭŭŧǿǿḿȧȧŧīƈ ƞīƞĵȧȧ īƞşŧȧȧŀŀȧȧŧīǿǿƞ īş ƈŭŭřřḗḗƞŧŀẏ ƞǿǿŧ şŭŭƥƥǿǿřŧḗḗḓ ǿǿƞ ȧȧȧȧřƈħ64 Ŀīƞŭŭẋ şẏşŧḗḗḿş. Ƥŀḗḗȧȧşḗḗ īƞşŧȧȧŀŀ ƞīƞĵȧȧ ḿȧȧƞŭŭȧȧŀŀẏ.", + "Show Advanced Options": "Şħǿǿẇ ȦȦḓṽȧȧƞƈḗḗḓ ǾǾƥŧīǿǿƞş", + "Hide Advanced Options": "Ħīḓḗḗ ȦȦḓṽȧȧƞƈḗḗḓ ǾǾƥŧīǿǿƞş", + "Select an example": "Şḗḗŀḗḗƈŧ ȧȧƞ ḗḗẋȧȧḿƥŀḗḗ", + "Project name": "Ƥřǿǿĵḗḗƈŧ ƞȧȧḿḗḗ", + "Custom": "Ƈŭŭşŧǿǿḿ", + "Example": "ḖḖẋȧȧḿƥŀḗḗ", + "Basic Settings": "Ɓȧȧşīƈ Şḗḗŧŧīƞɠş", + "Features": "Ƒḗḗȧȧŧŭŭřḗḗş", + "Stdio support": "Şŧḓīǿǿ şŭŭƥƥǿǿřŧ", + "Pico wireless options": "Ƥīƈǿǿ ẇīřḗḗŀḗḗşş ǿǿƥŧīǿǿƞş", + "Code generation options": "Ƈǿǿḓḗḗ ɠḗḗƞḗḗřȧȧŧīǿǿƞ ǿǿƥŧīǿǿƞş", + "Debugger": "Ḓḗḗƀŭŭɠɠḗḗř", + "Name": "Ƞȧȧḿḗḗ", + "Create from example": "Ƈřḗḗȧȧŧḗḗ ƒřǿǿḿ ḗḗẋȧȧḿƥŀḗḗ", + "Error": "ḖḖřřǿǿř", + "Please enter a valid project name.": "Ƥŀḗḗȧȧşḗḗ ḗḗƞŧḗḗř ȧȧ ṽȧȧŀīḓ ƥřǿǿĵḗḗƈŧ ƞȧȧḿḗḗ.", + "Board type": "Ɓǿǿȧȧřḓ ŧẏƥḗḗ", + "Other": "ǾǾŧħḗḗř", + "Architecture (Pico 2)": "ȦȦřƈħīŧḗḗƈŧŭŭřḗḗ (Ƥīƈǿǿ 2)", + "Warning: Project Import Wizard may not work for all projects, and will often require manual correction after the import": "Ẇȧȧřƞīƞɠ: Ƥřǿǿĵḗḗƈŧ Īḿƥǿǿřŧ Ẇīẑȧȧřḓ ḿȧȧẏ ƞǿǿŧ ẇǿǿřķ ƒǿǿř ȧȧŀŀ ƥřǿǿĵḗḗƈŧş, ȧȧƞḓ ẇīŀŀ ǿǿƒŧḗḗƞ řḗḗɋŭŭīřḗḗ ḿȧȧƞŭŭȧȧŀ ƈǿǿřřḗḗƈŧīǿǿƞ ȧȧƒŧḗḗř ŧħḗḗ īḿƥǿǿřŧ", + "Location": "Ŀǿǿƈȧȧŧīǿǿƞ", + "Change": "Ƈħȧȧƞɠḗḗ", + "Select Pico SDK version": "Şḗḗŀḗḗƈŧ Ƥīƈǿǿ ŞḒĶ ṽḗḗřşīǿǿƞ", + "Select ARM/RISCV Embeded Toolchain version": "Şḗḗŀḗḗƈŧ ȦȦŘḾ/ŘĪŞƇṼ ḖḖḿƀḗḗḓḗḗḓ Ŧǿǿǿǿŀƈħȧȧīƞ ṽḗḗřşīǿǿƞ", + "Select picotool version": "Şḗḗŀḗḗƈŧ ƥīƈǿǿŧǿǿǿǿŀ ṽḗḗřşīǿǿƞ", + "Ninja Version:": "Ƞīƞĵȧȧ Ṽḗḗřşīǿǿƞ:", + "Default version": "Ḓḗḗƒȧȧŭŭŀŧ ṽḗḗřşīǿǿƞ", + "Use system version": "ŬŬşḗḗ şẏşŧḗḗḿ ṽḗḗřşīǿǿƞ", + "Select version:": "Şḗḗŀḗḗƈŧ ṽḗḗřşīǿǿƞ:", + "Path to executable:": "Ƥȧȧŧħ ŧǿǿ ḗḗẋḗḗƈŭŭŧȧȧƀŀḗḗ:", + "CMake Version:": "ƇḾȧȧķḗḗ Ṽḗḗřşīǿǿƞ:", + "SPI": "ŞƤĪ", + "I2C interface": "Ī2Ƈ īƞŧḗḗřƒȧȧƈḗḗ", + "UART": "ŬŬȦȦŘŦ", + "PIO interface": "ƤĪǾǾ īƞŧḗḗřƒȧȧƈḗḗ", + "DMA support": "ḒḾȦȦ şŭŭƥƥǿǿřŧ", + "HW interpolation": "ĦẆ īƞŧḗḗřƥǿǿŀȧȧŧīǿǿƞ", + "HW watchdog": "ĦẆ ẇȧȧŧƈħḓǿǿɠ", + "HW timer": "ĦẆ ŧīḿḗḗř", + "HW clocks": "ĦẆ ƈŀǿǿƈķş", + "Console over UART": "Ƈǿǿƞşǿǿŀḗḗ ǿǿṽḗḗř ŬŬȦȦŘŦ", + "Console over USB (disables other USB use)": "Ƈǿǿƞşǿǿŀḗḗ ǿǿṽḗḗř ŬŬŞƁ (ḓīşȧȧƀŀḗḗş ǿǿŧħḗḗř ŬŬŞƁ ŭŭşḗḗ)", + "None": "Ƞǿǿƞḗḗ", + "Pico W onboard LED": "Ƥīƈǿǿ Ẇ ǿǿƞƀǿǿȧȧřḓ ĿḖḖḒ", + "Polled lwIP": "Ƥǿǿŀŀḗḗḓ ŀẇĪƤ", + "Background lwIP": "Ɓȧȧƈķɠřǿǿŭŭƞḓ ŀẇĪƤ", + "Run the program from RAM rather than flash": "Řŭŭƞ ŧħḗḗ ƥřǿǿɠřȧȧḿ ƒřǿǿḿ ŘȦȦḾ řȧȧŧħḗḗř ŧħȧȧƞ ƒŀȧȧşħ", + "Use project name as entry point file name": "ŬŬşḗḗ ƥřǿǿĵḗḗƈŧ ƞȧȧḿḗḗ ȧȧş ḗḗƞŧřẏ ƥǿǿīƞŧ ƒīŀḗḗ ƞȧȧḿḗḗ", + "Generate C++ code": "Ɠḗḗƞḗḗřȧȧŧḗḗ Ƈ++ ƈǿǿḓḗḗ", + "Enable C++ RTTI (Uses more memory)": "ḖḖƞȧȧƀŀḗḗ Ƈ++ ŘŦŦĪ (ŬŬşḗḗş ḿǿǿřḗḗ ḿḗḗḿǿǿřẏ)", + "Enable C++ exceptions (Uses more memory)": "ḖḖƞȧȧƀŀḗḗ Ƈ++ ḗḗẋƈḗḗƥŧīǿǿƞş (ŬŬşḗḗş ḿǿǿřḗḗ ḿḗḗḿǿǿřẏ)", + "DebugProbe (CMSIS-DAP) [Default]": "ḒḗḗƀŭŭɠƤřǿǿƀḗḗ (ƇḾŞĪŞ-ḒȦȦƤ) [Ḓḗḗƒȧȧŭŭŀŧ]", + "SWD (Pi host, on Pi 5 it requires Linux Kernel >= 6.6.47)": "ŞẆḒ (Ƥī ħǿǿşŧ, ǿǿƞ Ƥī 5 īŧ řḗḗɋŭŭīřḗḗş Ŀīƞŭŭẋ Ķḗḗřƞḗḗŀ >= 6.6.47)", + "CMake Tools": "ƇḾȧȧķḗḗ Ŧǿǿǿǿŀş", + "Enable CMake-Tools extension integration": "ḖḖƞȧȧƀŀḗḗ ƇḾȧȧķḗḗ-Ŧǿǿǿǿŀş ḗḗẋŧḗḗƞşīǿǿƞ īƞŧḗḗɠřȧȧŧīǿǿƞ", + "Cancel": "Ƈȧȧƞƈḗḗŀ", + "Import": "Īḿƥǿǿřŧ", + "Create": "Ƈřḗḗȧȧŧḗḗ", + "Unknown board type:": "ŬŬƞķƞǿǿẇƞ ƀǿǿȧȧřḓ ŧẏƥḗḗ:", + "Successfully generated new project: {0}": "Şŭŭƈƈḗḗşşƒŭŭŀŀẏ ɠḗḗƞḗḗřȧȧŧḗḗḓ ƞḗḗẇ ƥřǿǿĵḗḗƈŧ: {0}", + "Could not import new project": "Ƈǿǿŭŭŀḓ ƞǿǿŧ īḿƥǿǿřŧ ƞḗḗẇ ƥřǿǿĵḗḗƈŧ", + "Could not create new project": "Ƈǿǿŭŭŀḓ ƞǿǿŧ ƈřḗḗȧȧŧḗḗ ƞḗḗẇ ƥřǿǿĵḗḗƈŧ", + "New MicroPython Pico Project": "Ƞḗḗẇ ḾīƈřǿǿƤẏŧħǿǿƞ Ƥīƈǿǿ Ƥřǿǿĵḗḗƈŧ", + "The project name is empty. Please enter a project name.": "Ŧħḗḗ ƥřǿǿĵḗḗƈŧ ƞȧȧḿḗḗ īş ḗḗḿƥŧẏ. Ƥŀḗḗȧȧşḗḗ ḗḗƞŧḗḗř ȧȧ ƥřǿǿĵḗḗƈŧ ƞȧȧḿḗḗ.", + "Generating MicroPico project {0} in {1}...": "Ɠḗḗƞḗḗřȧȧŧīƞɠ ḾīƈřǿǿƤīƈǿǿ ƥřǿǿĵḗḗƈŧ {0} īƞ {1}...", + "Failed to generate MicroPython project.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ɠḗḗƞḗḗřȧȧŧḗḗ ḾīƈřǿǿƤẏŧħǿǿƞ ƥřǿǿĵḗḗƈŧ.", + "Please try again and check your settings.": "Ƥŀḗḗȧȧşḗḗ ŧřẏ ȧȧɠȧȧīƞ ȧȧƞḓ ƈħḗḗƈķ ẏǿǿŭŭř şḗḗŧŧīƞɠş.", + "Failed to find python3 executable.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ƒīƞḓ ƥẏŧħǿǿƞ3 ḗḗẋḗḗƈŭŭŧȧȧƀŀḗḗ.", + "Creating project folder {0}": "Ƈřḗḗȧȧŧīƞɠ ƥřǿǿĵḗḗƈŧ ƒǿǿŀḓḗḗř {0}", + "Failed to create project folder {0}": "Ƒȧȧīŀḗḗḓ ŧǿǿ ƈřḗḗȧȧŧḗḗ ƥřǿǿĵḗḗƈŧ ƒǿǿŀḓḗḗř {0}", + "Project initialized": "Ƥřǿǿĵḗḗƈŧ īƞīŧīȧȧŀīẑḗḗḓ", + "Failed to load webview for new MicroPython project": "Ƒȧȧīŀḗḗḓ ŧǿǿ ŀǿǿȧȧḓ ẇḗḗƀṽīḗḗẇ ƒǿǿř ƞḗḗẇ ḾīƈřǿǿƤẏŧħǿǿƞ ƥřǿǿĵḗḗƈŧ", + "New Pico MicroPython Project": "Ƞḗḗẇ Ƥīƈǿǿ ḾīƈřǿǿƤẏŧħǿǿƞ Ƥřǿǿĵḗḗƈŧ", + "Python Version:": "Ƥẏŧħǿǿƞ Ṽḗḗřşīǿǿƞ:", + "From Python extension": "Ƒřǿǿḿ Ƥẏŧħǿǿƞ ḗḗẋŧḗḗƞşīǿǿƞ", + "General": "Ɠḗḗƞḗḗřȧȧŀ", + "Project": "Ƥřǿǿĵḗḗƈŧ", + "Documentation": "Ḓǿǿƈŭŭḿḗḗƞŧȧȧŧīǿǿƞ", + "New C/C++ Project": "Ƞḗḗẇ Ƈ/Ƈ++ Ƥřǿǿĵḗḗƈŧ", + "New MicroPython Project": "Ƞḗḗẇ ḾīƈřǿǿƤẏŧħǿǿƞ Ƥřǿǿĵḗḗƈŧ", + "Import Project": "Īḿƥǿǿřŧ Ƥřǿǿĵḗḗƈŧ", + "New Project From Example": "Ƞḗḗẇ Ƥřǿǿĵḗḗƈŧ Ƒřǿǿḿ ḖḖẋȧȧḿƥŀḗḗ", + "Switch SDK": "Şẇīŧƈħ ŞḒĶ", + "Switch Board": "Şẇīŧƈħ Ɓǿǿȧȧřḓ", + "Run Project (USB)": "Řŭŭƞ Ƥřǿǿĵḗḗƈŧ (ŬŬŞƁ)", + "Flash Project (SWD)": "Ƒŀȧȧşħ Ƥřǿǿĵḗḗƈŧ (ŞẆḒ)", + "Configure CMake": "Ƈǿǿƞƒīɠŭŭřḗḗ ƇḾȧȧķḗḗ", + "Clean CMake": "Ƈŀḗḗȧȧƞ ƇḾȧȧķḗḗ", + "Debug Project": "Ḓḗḗƀŭŭɠ Ƥřǿǿĵḗḗƈŧ", + "Debug Layout": "Ḓḗḗƀŭŭɠ Ŀȧȧẏǿǿŭŭŧ", + "N/A": "Ƞ/ȦȦ", + "Development for the Pico requires {0} to be installed and available in PATH. Please install and restart VS Code.": "Ḓḗḗṽḗḗŀǿǿƥḿḗḗƞŧ ƒǿǿř ŧħḗḗ Ƥīƈǿǿ řḗḗɋŭŭīřḗḗş {0} ŧǿǿ ƀḗḗ īƞşŧȧȧŀŀḗḗḓ ȧȧƞḓ ȧȧṽȧȧīŀȧȧƀŀḗḗ īƞ ƤȦȦŦĦ. Ƥŀḗḗȧȧşḗḗ īƞşŧȧȧŀŀ ȧȧƞḓ řḗḗşŧȧȧřŧ ṼŞ Ƈǿǿḓḗḗ.", + "The installation of the Pico SDK requires Git version {0} or higher to be installed and available in the PATH - you have version {1}.": "Ŧħḗḗ īƞşŧȧȧŀŀȧȧŧīǿǿƞ ǿǿƒ ŧħḗḗ Ƥīƈǿǿ ŞḒĶ řḗḗɋŭŭīřḗḗş Ɠīŧ ṽḗḗřşīǿǿƞ {0} ǿǿř ħīɠħḗḗř ŧǿǿ ƀḗḗ īƞşŧȧȧŀŀḗḗḓ ȧȧƞḓ ȧȧṽȧȧīŀȧȧƀŀḗḗ īƞ ŧħḗḗ ƤȦȦŦĦ - ẏǿǿŭŭ ħȧȧṽḗḗ ṽḗḗřşīǿǿƞ {1}.", + "The installation of the Pico SDK requires Git to be installed and available in the PATH.": "Ŧħḗḗ īƞşŧȧȧŀŀȧȧŧīǿǿƞ ǿǿƒ ŧħḗḗ Ƥīƈǿǿ ŞḒĶ řḗḗɋŭŭīřḗḗş Ɠīŧ ŧǿǿ ƀḗḗ īƞşŧȧȧŀŀḗḗḓ ȧȧƞḓ ȧȧṽȧȧīŀȧȧƀŀḗḗ īƞ ŧħḗḗ ƤȦȦŦĦ.", + " You can install it by running `xcode-select --install` in the terminal and restarting your computer.": " Ẏǿǿŭŭ ƈȧȧƞ īƞşŧȧȧŀŀ īŧ ƀẏ řŭŭƞƞīƞɠ `ẋƈǿǿḓḗḗ-şḗḗŀḗḗƈŧ --īƞşŧȧȧŀŀ` īƞ ŧħḗḗ ŧḗḗřḿīƞȧȧŀ ȧȧƞḓ řḗḗşŧȧȧřŧīƞɠ ẏǿǿŭŭř ƈǿǿḿƥŭŭŧḗḗř.", + "Searching for Python.": "Şḗḗȧȧřƈħīƞɠ ƒǿǿř Ƥẏŧħǿǿƞ.", + "This may take a while if it has to be downloaded.": "Ŧħīş ḿȧȧẏ ŧȧȧķḗḗ ȧȧ ẇħīŀḗḗ īƒ īŧ ħȧȧş ŧǿǿ ƀḗḗ ḓǿǿẇƞŀǿǿȧȧḓḗḗḓ.", + "Downloading Python": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ Ƥẏŧħǿǿƞ", + "Unsupported architecture for Windows: ": "ŬŬƞşŭŭƥƥǿǿřŧḗḗḓ ȧȧřƈħīŧḗḗƈŧŭŭřḗḗ ƒǿǿř Ẇīƞḓǿǿẇş: ", + "Failed to find any valid Python installation. Make sure Python >=3.9 is installed. You can set a Python executable directly in your user settings or select in the Python extension.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ƒīƞḓ ȧȧƞẏ ṽȧȧŀīḓ Ƥẏŧħǿǿƞ īƞşŧȧȧŀŀȧȧŧīǿǿƞ. Ḿȧȧķḗḗ şŭŭřḗḗ Ƥẏŧħǿǿƞ >=3.9 īş īƞşŧȧȧŀŀḗḗḓ. Ẏǿǿŭŭ ƈȧȧƞ şḗḗŧ ȧȧ Ƥẏŧħǿǿƞ ḗḗẋḗḗƈŭŭŧȧȧƀŀḗḗ ḓīřḗḗƈŧŀẏ īƞ ẏǿǿŭŭř ŭŭşḗḗř şḗḗŧŧīƞɠş ǿǿř şḗḗŀḗḗƈŧ īƞ ŧħḗḗ Ƥẏŧħǿǿƞ ḗḗẋŧḗḗƞşīǿǿƞ.", + "Open Python Extension": "ǾǾƥḗḗƞ Ƥẏŧħǿǿƞ ḖḖẋŧḗḗƞşīǿǿƞ", + "Edit Settings": "ḖḖḓīŧ Şḗḗŧŧīƞɠş", + "Found Git version {0}, but requires {1}.": "Ƒǿǿŭŭƞḓ Ɠīŧ ṽḗḗřşīǿǿƞ {0}, ƀŭŭŧ řḗḗɋŭŭīřḗḗş {1}.", + "Please install and add to PATH or set the path to the git executable in global settings.": "Ƥŀḗḗȧȧşḗḗ īƞşŧȧȧŀŀ ȧȧƞḓ ȧȧḓḓ ŧǿǿ ƤȦȦŦĦ ǿǿř şḗḗŧ ŧħḗḗ ƥȧȧŧħ ŧǿǿ ŧħḗḗ ɠīŧ ḗḗẋḗḗƈŭŭŧȧȧƀŀḗḗ īƞ ɠŀǿǿƀȧȧŀ şḗḗŧŧīƞɠş.", + "Git not found.": "Ɠīŧ ƞǿǿŧ ƒǿǿŭŭƞḓ.", + "Your GitHub Personal Access Token might be invalid or expired.": "Ẏǿǿŭŭř ƓīŧĦŭŭƀ Ƥḗḗřşǿǿƞȧȧŀ ȦȦƈƈḗḗşş Ŧǿǿķḗḗƞ ḿīɠħŧ ƀḗḗ īƞṽȧȧŀīḓ ǿǿř ḗḗẋƥīřḗḗḓ.", + "It has now been removed from the settings.": "Īŧ ħȧȧş ƞǿǿẇ ƀḗḗḗḗƞ řḗḗḿǿǿṽḗḗḓ ƒřǿǿḿ ŧħḗḗ şḗḗŧŧīƞɠş.", + "Python3 is not installed and in PATH.": "Ƥẏŧħǿǿƞ3 īş ƞǿǿŧ īƞşŧȧȧŀŀḗḗḓ ȧȧƞḓ īƞ ƤȦȦŦĦ.", + "CMake currently does not support folder names with backslashes.": "ƇḾȧȧķḗḗ ƈŭŭřřḗḗƞŧŀẏ ḓǿǿḗḗş ƞǿǿŧ şŭŭƥƥǿǿřŧ ƒǿǿŀḓḗḗř ƞȧȧḿḗḗş ẇīŧħ ƀȧȧƈķşŀȧȧşħḗḗş.", + "Failed to configure cmake for the current project.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ƈǿǿƞƒīɠŭŭřḗḗ ƈḿȧȧķḗḗ ƒǿǿř ŧħḗḗ ƈŭŭřřḗḗƞŧ ƥřǿǿĵḗḗƈŧ.", + "Configuring CMake...": "Ƈǿǿƞƒīɠŭŭřīƞɠ ƇḾȧȧķḗḗ...", + "The new SDK version does not support your current board": "Ŧħḗḗ ƞḗḗẇ ŞḒĶ ṽḗḗřşīǿǿƞ ḓǿǿḗḗş ƞǿǿŧ şŭŭƥƥǿǿřŧ ẏǿǿŭŭř ƈŭŭřřḗḗƞŧ ƀǿǿȧȧřḓ", + "Please select a new board type": "Ƥŀḗḗȧȧşḗḗ şḗḗŀḗḗƈŧ ȧȧ ƞḗḗẇ ƀǿǿȧȧřḓ ŧẏƥḗḗ", + "Uninstalling Pico SDK - Are you sure you want to continue?": "ŬŬƞīƞşŧȧȧŀŀīƞɠ Ƥīƈǿǿ ŞḒĶ - ȦȦřḗḗ ẏǿǿŭŭ şŭŭřḗḗ ẏǿǿŭŭ ẇȧȧƞŧ ŧǿǿ ƈǿǿƞŧīƞŭŭḗḗ?", + "This will delete the Pico SDK and all its automatically installed dependencies from the system. This action cannot be undone.": "Ŧħīş ẇīŀŀ ḓḗḗŀḗḗŧḗḗ ŧħḗḗ Ƥīƈǿǿ ŞḒĶ ȧȧƞḓ ȧȧŀŀ īŧş ȧȧŭŭŧǿǿḿȧȧŧīƈȧȧŀŀẏ īƞşŧȧȧŀŀḗḗḓ ḓḗḗƥḗḗƞḓḗḗƞƈīḗḗş ƒřǿǿḿ ŧħḗḗ şẏşŧḗḗḿ. Ŧħīş ȧȧƈŧīǿǿƞ ƈȧȧƞƞǿǿŧ ƀḗḗ ŭŭƞḓǿǿƞḗḗ.", + "Pico SDK uninstalled successfully": "Ƥīƈǿǿ ŞḒĶ ŭŭƞīƞşŧȧȧŀŀḗḗḓ şŭŭƈƈḗḗşşƒŭŭŀŀẏ", + "Failed to uninstall Pico SDK": "Ƒȧȧīŀḗḗḓ ŧǿǿ ŭŭƞīƞşŧȧȧŀŀ Ƥīƈǿǿ ŞḒĶ", + "Specific version": "Şƥḗḗƈīƒīƈ ṽḗḗřşīǿǿƞ", + "Custom path": "Ƈŭŭşŧǿǿḿ ƥȧȧŧħ", + "Default": "Ḓḗḗƒȧȧŭŭŀŧ", + "Use system CMake": "ŬŬşḗḗ şẏşŧḗḗḿ ƇḾȧȧķḗḗ", + "Failed to get CMake releases.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ɠḗḗŧ ƇḾȧȧķḗḗ řḗḗŀḗḗȧȧşḗḗş.", + "Make sure you are connected to the internet.": "Ḿȧȧķḗḗ şŭŭřḗḗ ẏǿǿŭŭ ȧȧřḗḗ ƈǿǿƞƞḗḗƈŧḗḗḓ ŧǿǿ ŧħḗḗ īƞŧḗḗřƞḗḗŧ.", + "Select CMake version": "Şḗḗŀḗḗƈŧ ƇḾȧȧķḗḗ ṽḗḗřşīǿǿƞ", + "Select a cmake executable to use for this project": "Şḗḗŀḗḗƈŧ ȧȧ ƈḿȧȧķḗḗ ḗḗẋḗḗƈŭŭŧȧȧƀŀḗḗ ŧǿǿ ŭŭşḗḗ ƒǿǿř ŧħīş ƥřǿǿĵḗḗƈŧ", + "Use system Ninja": "ŬŬşḗḗ şẏşŧḗḗḿ Ƞīƞĵȧȧ", + "Failed to get Ninja releases.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ɠḗḗŧ Ƞīƞĵȧȧ řḗḗŀḗḗȧȧşḗḗş.", + "Select Ninja version": "Şḗḗŀḗḗƈŧ Ƞīƞĵȧȧ ṽḗḗřşīǿǿƞ", + "Select a ninja executable to use for this project": "Şḗḗŀḗḗƈŧ ȧȧ ƞīƞĵȧȧ ḗḗẋḗḗƈŭŭŧȧȧƀŀḗḗ ŧǿǿ ŭŭşḗḗ ƒǿǿř ŧħīş ƥřǿǿĵḗḗƈŧ", + "Failed to get supported toolchain versions.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ɠḗḗŧ şŭŭƥƥǿǿřŧḗḗḓ ŧǿǿǿǿŀƈħȧȧīƞ ṽḗḗřşīǿǿƞş.", + "Failed to get SDK releases.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ɠḗḗŧ ŞḒĶ řḗḗŀḗḗȧȧşḗḗş.", + "Select SDK version": "Şḗḗŀḗḗƈŧ ŞḒĶ ṽḗḗřşīǿǿƞ", + "Please open a Pico project folder first.": "Ƥŀḗḗȧȧşḗḗ ǿǿƥḗḗƞ ȧȧ Ƥīƈǿǿ ƥřǿǿĵḗḗƈŧ ƒǿǿŀḓḗḗř ƒīřşŧ.", + "Switch Tools": "Şẇīŧƈħ Ŧǿǿǿǿŀş", + "Configure advanced options?": "Ƈǿǿƞƒīɠŭŭřḗḗ ȧȧḓṽȧȧƞƈḗḗḓ ǿǿƥŧīǿǿƞş?", + "Installing SDK...": "Īƞşŧȧȧŀŀīƞɠ ŞḒĶ...", + "Successfully installed SDK {0}.": "Şŭŭƈƈḗḗşşƒŭŭŀŀẏ īƞşŧȧȧŀŀḗḗḓ ŞḒĶ {0}.", + "Failed to install SDK {0}.": "Ƒȧȧīŀḗḗḓ ŧǿǿ īƞşŧȧȧŀŀ ŞḒĶ {0}.", + "Make sure all requirements are met.": "Ḿȧȧķḗḗ şŭŭřḗḗ ȧȧŀŀ řḗḗɋŭŭīřḗḗḿḗḗƞŧş ȧȧřḗḗ ḿḗḗŧ.", + "Installing toolchain...": "Īƞşŧȧȧŀŀīƞɠ ŧǿǿǿǿŀƈħȧȧīƞ...", + "Successfully installed toolchain {0}.": "Şŭŭƈƈḗḗşşƒŭŭŀŀẏ īƞşŧȧȧŀŀḗḗḓ ŧǿǿǿǿŀƈħȧȧīƞ {0}.", + "Failed to install toolchain {0}.": "Ƒȧȧīŀḗḗḓ ŧǿǿ īƞşŧȧȧŀŀ ŧǿǿǿǿŀƈħȧȧīƞ {0}.", + "Installing tools...": "Īƞşŧȧȧŀŀīƞɠ ŧǿǿǿǿŀş...", + "Successfully installed tools.": "Şŭŭƈƈḗḗşşƒŭŭŀŀẏ īƞşŧȧȧŀŀḗḗḓ ŧǿǿǿǿŀş.", + "Failed to install tools.": "Ƒȧȧīŀḗḗḓ ŧǿǿ īƞşŧȧȧŀŀ ŧǿǿǿǿŀş.", + "Downloading and installing Ninja...": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ Ƞīƞĵȧȧ...", + "Successfully installed Ninja.": "Şŭŭƈƈḗḗşşƒŭŭŀŀẏ īƞşŧȧȧŀŀḗḗḓ Ƞīƞĵȧȧ.", + "Failed to install Ninja.": "Ƒȧȧīŀḗḗḓ ŧǿǿ īƞşŧȧȧŀŀ Ƞīƞĵȧȧ.", + "Downloading and installing CMake...": "Ḓǿǿẇƞŀǿǿȧȧḓīƞɠ ȧȧƞḓ īƞşŧȧȧŀŀīƞɠ ƇḾȧȧķḗḗ...", + "Successfully installed CMake.": "Şŭŭƈƈḗḗşşƒŭŭŀŀẏ īƞşŧȧȧŀŀḗḗḓ ƇḾȧȧķḗḗ.", + "Failed to install CMake.": "Ƒȧȧīŀḗḗḓ ŧǿǿ īƞşŧȧȧŀŀ ƇḾȧȧķḗḗ.", + "Updating project configuration...": "ŬŬƥḓȧȧŧīƞɠ ƥřǿǿĵḗḗƈŧ ƈǿǿƞƒīɠŭŭřȧȧŧīǿǿƞ...", + "Project configuration updated.": "Ƥřǿǿĵḗḗƈŧ ƈǿǿƞƒīɠŭŭřȧȧŧīǿǿƞ ŭŭƥḓȧȧŧḗḗḓ.", + "CMakeLists.txt updated.": "ƇḾȧȧķḗḗĿīşŧş.ŧẋŧ ŭŭƥḓȧȧŧḗḗḓ.", + "Failed to update CMakeLists.txt for new SDK version.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ŭŭƥḓȧȧŧḗḗ ƇḾȧȧķḗḗĿīşŧş.ŧẋŧ ƒǿǿř ƞḗḗẇ ŞḒĶ ṽḗḗřşīǿǿƞ.", + "Reload the window to update intellisense with the new SDK version.": "Řḗḗŀǿǿȧȧḓ ŧħḗḗ ẇīƞḓǿǿẇ ŧǿǿ ŭŭƥḓȧȧŧḗḗ īƞŧḗḗŀŀīşḗḗƞşḗḗ ẇīŧħ ŧħḗḗ ƞḗḗẇ ŞḒĶ ṽḗḗřşīǿǿƞ.", + "Use Risc-V?": "ŬŬşḗḗ Řīşƈ-Ṽ?", + "Failed to get sdk version - cannot update board": "Ƒȧȧīŀḗḗḓ ŧǿǿ ɠḗḗŧ şḓķ ṽḗḗřşīǿǿƞ - ƈȧȧƞƞǿǿŧ ŭŭƥḓȧȧŧḗḗ ƀǿǿȧȧřḓ", + "Cannot switch board automatically with SDK version {0}": "Ƈȧȧƞƞǿǿŧ şẇīŧƈħ ƀǿǿȧȧřḓ ȧȧŭŭŧǿǿḿȧȧŧīƈȧȧŀŀẏ ẇīŧħ ŞḒĶ ṽḗḗřşīǿǿƞ {0}", + "Error switching to Risc-V toolchain": "ḖḖřřǿǿř şẇīŧƈħīƞɠ ŧǿǿ Řīşƈ-Ṽ ŧǿǿǿǿŀƈħȧȧīƞ", + "Installing toolchain {0}": "Īƞşŧȧȧŀŀīƞɠ ŧǿǿǿǿŀƈħȧȧīƞ {0}", + "Failed to update CMakeLists.txt for new toolchain version.": "Ƒȧȧīŀḗḗḓ ŧǿǿ ŭŭƥḓȧȧŧḗḗ ƇḾȧȧķḗḗĿīşŧş.ŧẋŧ ƒǿǿř ƞḗḗẇ ŧǿǿǿǿŀƈħȧȧīƞ ṽḗḗřşīǿǿƞ.", + "Reload the window to update intellisense with the new board.": "Řḗḗŀǿǿȧȧḓ ŧħḗḗ ẇīƞḓǿǿẇ ŧǿǿ ŭŭƥḓȧȧŧḗḗ īƞŧḗḗŀŀīşḗḗƞşḗḗ ẇīŧħ ŧħḗḗ ƞḗḗẇ ƀǿǿȧȧřḓ.", + "Task {0} not found.": "Ŧȧȧşķ {0} ƞǿǿŧ ƒǿǿŭŭƞḓ.", + "Hardware APIs": "Ħȧȧřḓẇȧȧřḗḗ ȦȦƤĪş", + "High Level APIs": "Ħīɠħ Ŀḗḗṽḗḗŀ ȦȦƤĪş", + "Networking Libraries": "Ƞḗḗŧẇǿǿřķīƞɠ Ŀīƀřȧȧřīḗḗş", + "Runtime Infrastructure": "Řŭŭƞŧīḿḗḗ Īƞƒřȧȧşŧřŭŭƈŧŭŭřḗḗ", + "Select Category": "Şḗḗŀḗḗƈŧ Ƈȧȧŧḗḗɠǿǿřẏ", + "Pico SDK Documentation": "Ƥīƈǿǿ ŞḒĶ Ḓǿǿƈŭŭḿḗḗƞŧȧȧŧīǿǿƞ", + "Select which language to use for your new project": "Şḗḗŀḗḗƈŧ ẇħīƈħ ŀȧȧƞɠŭŭȧȧɠḗḗ ŧǿǿ ŭŭşḗḗ ƒǿǿř ẏǿǿŭŭř ƞḗḗẇ ƥřǿǿĵḗḗƈŧ", + "Threadsafe Background": "Ŧħřḗḗȧȧḓşȧȧƒḗḗ Ɓȧȧƈķɠřǿǿŭŭƞḓ", + "Poll": "Ƥǿǿŀŀ", + "Select PicoW Architecture": "Şḗḗŀḗḗƈŧ ƤīƈǿǿẆ ȦȦřƈħīŧḗḗƈŧŭŭřḗḗ", + "No workspace folder found.": "Ƞǿǿ ẇǿǿřķşƥȧȧƈḗḗ ƒǿǿŀḓḗḗř ƒǿǿŭŭƞḓ.", + "You must use the CMake Tools extension to configure your build. To use this extension instead, change the useCmakeTools setting.": "Ẏǿǿŭŭ ḿŭŭşŧ ŭŭşḗḗ ŧħḗḗ ƇḾȧȧķḗḗ Ŧǿǿǿǿŀş ḗḗẋŧḗḗƞşīǿǿƞ ŧǿǿ ƈǿǿƞƒīɠŭŭřḗḗ ẏǿǿŭŭř ƀŭŭīŀḓ. Ŧǿǿ ŭŭşḗḗ ŧħīş ḗḗẋŧḗḗƞşīǿǿƞ īƞşŧḗḗȧȧḓ, ƈħȧȧƞɠḗḗ ŧħḗḗ ŭŭşḗḗƇḿȧȧķḗḗŦǿǿǿǿŀş şḗḗŧŧīƞɠ.", + "CMake has configured your build.": "ƇḾȧȧķḗḗ ħȧȧş ƈǿǿƞƒīɠŭŭřḗḗḓ ẏǿǿŭŭř ƀŭŭīŀḓ.", + "CMake failed to configure your build.": "ƇḾȧȧķḗḗ ƒȧȧīŀḗḗḓ ŧǿǿ ƈǿǿƞƒīɠŭŭřḗḗ ẏǿǿŭŭř ƀŭŭīŀḓ.", + "You must use the CMake Tools extension to clean your build. To use this extension instead, change the useCmakeTools setting.": "Ẏǿǿŭŭ ḿŭŭşŧ ŭŭşḗḗ ŧħḗḗ ƇḾȧȧķḗḗ Ŧǿǿǿǿŀş ḗḗẋŧḗḗƞşīǿǿƞ ŧǿǿ ƈŀḗḗȧȧƞ ẏǿǿŭŭř ƀŭŭīŀḓ. Ŧǿǿ ŭŭşḗḗ ŧħīş ḗḗẋŧḗḗƞşīǿǿƞ īƞşŧḗḗȧȧḓ, ƈħȧȧƞɠḗḗ ŧħḗḗ ŭŭşḗḗƇḿȧȧķḗḗŦǿǿǿǿŀş şḗḗŧŧīƞɠ.", + "Error cleaning build directory.": "ḖḖřřǿǿř ƈŀḗḗȧȧƞīƞɠ ƀŭŭīŀḓ ḓīřḗḗƈŧǿǿřẏ.", + "CMake has been cleaned and reconfigured.": "ƇḾȧȧķḗḗ ħȧȧş ƀḗḗḗḗƞ ƈŀḗḗȧȧƞḗḗḓ ȧȧƞḓ řḗḗƈǿǿƞƒīɠŭŭřḗḗḓ.", + "CMake could not be reconfigured. See log for details.": "ƇḾȧȧķḗḗ ƈǿǿŭŭŀḓ ƞǿǿŧ ƀḗḗ řḗḗƈǿǿƞƒīɠŭŭřḗḗḓ. Şḗḗḗḗ ŀǿǿɠ ƒǿǿř ḓḗḗŧȧȧīŀş.", + "Github API cache cleared.": "Ɠīŧħŭŭƀ ȦȦƤĪ ƈȧȧƈħḗḗ ƈŀḗḗȧȧřḗḗḓ." +} \ No newline at end of file diff --git a/package.json b/package.json index 86b88d56..f5e5c0e3 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "ms-python.python" ], "main": "./dist/extension.cjs", + "l10n": "./l10n", "markdown": "github", "minimumNodeVersion": 20, "capabilities": { diff --git a/scripts/genTranslations.py b/scripts/genTranslations.py new file mode 100644 index 00000000..cd5490b9 --- /dev/null +++ b/scripts/genTranslations.py @@ -0,0 +1,23 @@ +import shutil +import subprocess +import os + + +def copyMtsToTs(src, dst): + # Copy but change mts to ts + dst = dst.replace(".mts", ".ts") + shutil.copyfile(src, dst) + + +dir_path = os.path.dirname(os.path.realpath(__file__)) +os.chdir(f"{dir_path}/..") + +shutil.copytree("./src", "./tmp-translate", copy_function=copyMtsToTs) + +os.system("vscode-l10n-dev export --debug --verbose --outDir ./l10n ./tmp-translate") + +os.system( + "vscode-l10n-dev generate-pseudo --debug --verbose --outDir ./l10n ./l10n/bundle.l10n.json ./package.nls.json" +) + +shutil.rmtree("./tmp-translate") diff --git a/src/commands/clearGithubApiCache.mts b/src/commands/clearGithubApiCache.mts index efe499bb..8ec25f07 100644 --- a/src/commands/clearGithubApiCache.mts +++ b/src/commands/clearGithubApiCache.mts @@ -1,7 +1,7 @@ import { Command } from "./command.mjs"; import Logger from "../logger.mjs"; import GithubApiCache from "../utils/githubApiCache.mjs"; -import { window } from "vscode"; +import { window, l10n } from "vscode"; export default class ClearGithubApiCacheCommand extends Command { private _logger: Logger = new Logger("ClearGithubApiCacheCommand"); @@ -17,6 +17,6 @@ export default class ClearGithubApiCacheCommand extends Command { await GithubApiCache.getInstance().clear(); - await window.showInformationMessage("Github API cache cleared."); + await window.showInformationMessage(l10n.t("Github API cache cleared.")); } } diff --git a/src/commands/compileProject.mts b/src/commands/compileProject.mts index 7138472d..ba692b9a 100644 --- a/src/commands/compileProject.mts +++ b/src/commands/compileProject.mts @@ -1,4 +1,4 @@ -import { commands, tasks, window } from "vscode"; +import { commands, tasks, window, l10n } from "vscode"; import { EventEmitter } from "events"; import { CommandWithResult } from "./command.mjs"; import Logger from "../logger.mjs"; @@ -72,7 +72,7 @@ export default class CompileProjectCommand extends CommandWithResult { } else { // Task not found this._logger.error("Task 'Compile Project' not found."); - void window.showErrorMessage("Task 'Compile Project' not found."); + void window.showErrorMessage(l10n.t("Task {0} not found.", 'Compile Project')); return false; } diff --git a/src/commands/configureCmake.mts b/src/commands/configureCmake.mts index 32472045..4ed22bae 100644 --- a/src/commands/configureCmake.mts +++ b/src/commands/configureCmake.mts @@ -1,6 +1,6 @@ import { Command } from "./command.mjs"; import Logger from "../logger.mjs"; -import { window, workspace } from "vscode"; +import { window, workspace, l10n } from "vscode"; import { configureCmakeNinja } from "../utils/cmakeUtil.mjs"; import Settings, { SettingsKey } from "../settings.mjs"; import { join } from "path"; @@ -22,7 +22,7 @@ export default class ConfigureCmakeCommand extends Command { // check if is a pico project if (workspaceFolder === undefined) { this._logger.warn("No workspace folder found."); - void window.showWarningMessage("No workspace folder found."); + void window.showWarningMessage(l10n.t("No workspace folder found.")); return; } @@ -34,17 +34,16 @@ export default class ConfigureCmakeCommand extends Command { settings.getBoolean(SettingsKey.useCmakeTools) ) { void window.showErrorMessage( - "You must use the CMake Tools extension to configure your build. " + - "To use this extension instead, change the useCmakeTools setting." + l10n.t("You must use the CMake Tools extension to configure your build. To use this extension instead, change the useCmakeTools setting.") ); return; } if (await configureCmakeNinja(workspaceFolder.uri)) { - void window.showInformationMessage("CMake has configured your build."); + void window.showInformationMessage(l10n.t("CMake has configured your build.")); } else { - void window.showWarningMessage("CMake failed to configure your build."); + void window.showWarningMessage(l10n.t("CMake failed to configure your build.")); } } } @@ -63,7 +62,7 @@ export class CleanCMakeCommand extends Command { if (workspaceFolder === undefined) { this._logger.warn("No workspace folder found."); - void window.showWarningMessage("No workspace folder found."); + void window.showWarningMessage(l10n.t("No workspace folder found.")); return; } @@ -75,8 +74,7 @@ export class CleanCMakeCommand extends Command { settings.getBoolean(SettingsKey.useCmakeTools) ) { void window.showErrorMessage( - "You must use the CMake Tools extension to clean your build. " + - "To use this extension instead, change the useCmakeTools setting." + l10n.t("You must use the CMake Tools extension to clean your build. To use this extension instead, change the useCmakeTools setting.") ); return; @@ -91,18 +89,18 @@ export class CleanCMakeCommand extends Command { "Error cleaning build directory.", unknownErrorToString(error) ); - void window.showErrorMessage("Error cleaning build directory."); + void window.showErrorMessage(l10n.t("Error cleaning build directory.")); return; } if (await configureCmakeNinja(workspaceFolder.uri)) { void window.showInformationMessage( - "CMake has been cleaned and reconfigured." + l10n.t("CMake has been cleaned and reconfigured.") ); } else { void window.showWarningMessage( - "CMake could not be reconfigured. See log for details." + l10n.t("CMake could not be reconfigured. See log for details.") ); } } diff --git a/src/commands/flashProjectSwd.mts b/src/commands/flashProjectSwd.mts index 4b52eae4..57984670 100644 --- a/src/commands/flashProjectSwd.mts +++ b/src/commands/flashProjectSwd.mts @@ -1,6 +1,6 @@ import { CommandWithResult } from "./command.mjs"; import Logger from "../logger.mjs"; -import { tasks, window } from "vscode"; +import { tasks, window, l10n } from "vscode"; import { EventEmitter } from "stream"; export default class FlashProjectSWDCommand extends CommandWithResult { @@ -62,7 +62,7 @@ export default class FlashProjectSWDCommand extends CommandWithResult { } else { // Task not found this._logger.error("Task 'Flash' not found."); - void window.showErrorMessage("Task 'Flash' not found."); + void window.showErrorMessage(l10n.t("Task {0} not found.", 'Flash')); return false; } diff --git a/src/commands/launchTargetPath.mts b/src/commands/launchTargetPath.mts index 69951ba7..7d436ebd 100644 --- a/src/commands/launchTargetPath.mts +++ b/src/commands/launchTargetPath.mts @@ -1,6 +1,6 @@ import { readFileSync } from "fs"; import { CommandWithResult } from "./command.mjs"; -import { commands, window, workspace } from "vscode"; +import { commands, window, workspace, l10n } from "vscode"; import { join } from "path"; import Settings, { SettingsKey } from "../settings.mjs"; @@ -31,9 +31,9 @@ export default class LaunchTargetPathCommand extends CommandWithResult { if (matchBg && matchPoll) { // For examples with both background and poll, let user pick which to run - const quickPickItems = ["Threadsafe Background", "Poll"]; + const quickPickItems = [l10n.t("Threadsafe Background"), l10n.t("Poll")]; const backgroundOrPoll = await window.showQuickPick(quickPickItems, { - placeHolder: "Select PicoW Architecture", + placeHolder: l10n.t("Select PicoW Architecture"), }); if (backgroundOrPoll === undefined) { return projectName; diff --git a/src/commands/newProject.mts b/src/commands/newProject.mts index 45c01a74..e6789754 100644 --- a/src/commands/newProject.mts +++ b/src/commands/newProject.mts @@ -1,6 +1,6 @@ import { CommandWithArgs } from "./command.mjs"; import Logger from "../logger.mjs"; -import { window, type Uri } from "vscode"; +import { window, type Uri, l10n } from "vscode"; import { NewProjectPanel } from "../webview/newProjectPanel.mjs"; // eslint-disable-next-line max-len import { NewMicroPythonProjectPanel } from "../webview/newMicroPythonProjectPanel.mjs"; @@ -44,10 +44,10 @@ export default class NewProjectCommand extends CommandWithArgs { (await window.showQuickPick( [NewProjectCommand.cCppOption, NewProjectCommand.micropythonOption], { - placeHolder: "Select which language to use for your new project", + placeHolder: l10n.t("Select which language to use for your new project"), canPickMany: false, ignoreFocusOut: false, - title: "New Pico Project", + title: l10n.t("New Pico Project"), } )); diff --git a/src/commands/openSdkDocumentation.mts b/src/commands/openSdkDocumentation.mts index b3d7d795..58b0bb43 100644 --- a/src/commands/openSdkDocumentation.mts +++ b/src/commands/openSdkDocumentation.mts @@ -7,6 +7,7 @@ import { window, Uri, type WebviewPanel, + l10n } from "vscode"; import { readFileSync } from "fs"; @@ -18,10 +19,10 @@ export enum DocumentationId { } export const DOCUMENTATION_LABEL_BY_ID: string[] = [ - "Hardware APIs", - "High Level APIs", - "Networking Libraries", - "Runtime Infrastructure", + l10n.t("Hardware APIs"), + l10n.t("High Level APIs"), + l10n.t("Networking Libraries"), + l10n.t("Runtime Infrastructure"), ]; // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -65,7 +66,7 @@ export default class OpenSdkDocumentationCommand extends CommandWithArgs { ); const result = await window.showQuickPick(options, { - placeHolder: "Select Category", + placeHolder: l10n.t("Select Category"), canPickMany: false, ignoreFocusOut: false, }); @@ -83,7 +84,7 @@ export default class OpenSdkDocumentationCommand extends CommandWithArgs { Logger.log("New panel"); this._panel = window.createWebviewPanel( "pico-sdk-documentation", - "Pico SDK Documentation", + l10n.t("Pico SDK Documentation"), { viewColumn: ViewColumn.Two, preserveFocus: false }, { enableScripts: true, diff --git a/src/commands/runProject.mts b/src/commands/runProject.mts index dbe22750..0ae4ce8d 100644 --- a/src/commands/runProject.mts +++ b/src/commands/runProject.mts @@ -1,4 +1,4 @@ -import { tasks, window } from "vscode"; +import { tasks, window, l10n } from "vscode"; import { EventEmitter } from "events"; import { CommandWithResult } from "./command.mjs"; import Logger from "../logger.mjs"; @@ -60,7 +60,7 @@ export default class RunProjectCommand extends CommandWithResult { } else { // Task not found this._logger.error("Task 'Run Project' not found."); - void window.showErrorMessage("Task 'Run Project' not found."); + void window.showErrorMessage(l10n.t("Task {0} not found.", 'Run Project')); return false; } diff --git a/src/commands/switchBoard.mts b/src/commands/switchBoard.mts index 71e14890..a231dcd0 100644 --- a/src/commands/switchBoard.mts +++ b/src/commands/switchBoard.mts @@ -1,7 +1,7 @@ import { Command } from "./command.mjs"; import Logger from "../logger.mjs"; import { - commands, ProgressLocation, window, workspace, type Uri + commands, ProgressLocation, window, workspace, type Uri, l10n } from "vscode"; import { existsSync, readdirSync, readFileSync } from "fs"; import { @@ -108,7 +108,7 @@ export default class SwitchBoardCommand extends Command { // show quick pick for board type const board = await window.showQuickPick(quickPickItems, { - placeHolder: "Select Board", + placeHolder: l10n.t("Select Board"), }); if (board === undefined) { @@ -124,8 +124,8 @@ export default class SwitchBoardCommand extends Command { return [board, false]; } - const useRiscV = await window.showQuickPick(["No", "Yes"], { - placeHolder: "Use Risc-V?", + const useRiscV = await window.showQuickPick([l10n.t("No"), l10n.t("Yes")], { + placeHolder: l10n.t("Use Risc-V?"), }); if (useRiscV === undefined) { @@ -153,7 +153,7 @@ export default class SwitchBoardCommand extends Command { if (versions === null) { void window.showErrorMessage( - "Failed to get sdk version - cannot update board" + l10n.t("Failed to get sdk version - cannot update board") ); return; @@ -178,7 +178,9 @@ export default class SwitchBoardCommand extends Command { if (versionBundle === undefined) { void window.showErrorMessage( - `Cannot switch board automatically with SDK version ${versions[0]}` + l10n.t( + "Cannot switch board automatically with SDK version {0}", versions[0] + ) ); return; @@ -196,8 +198,8 @@ export default class SwitchBoardCommand extends Command { // internet is not required if locally cached version bundles are available // but in this case a use shouldn't see this message void window.showErrorMessage( - "Failed to get supported toolchain versions. " + - "Make sure you are connected to the internet." + l10n.t("Failed to get supported toolchain versions.") + " " + + l10n.t("Make sure you are connected to the internet.") ); return; @@ -209,7 +211,7 @@ export default class SwitchBoardCommand extends Command { if (selectedToolchain === undefined) { void window.showErrorMessage( - "Error switching to Risc-V toolchain" + l10n.t("Error switching to Risc-V toolchain") ); return; @@ -218,7 +220,7 @@ export default class SwitchBoardCommand extends Command { await window.withProgress( { title: - `Installing toolchain ${selectedToolchain.version} `, + l10n.t("Installing toolchain {0}", selectedToolchain.version), location: ProgressLocation.Notification, }, async progress => { @@ -248,7 +250,9 @@ export default class SwitchBoardCommand extends Command { if (!cmakeUpdateResult) { void window.showWarningMessage( - "Failed to update CMakeLists.txt for new toolchain version." + l10n.t( + "Failed to update CMakeLists.txt for new toolchain version." + ) ); } } @@ -260,12 +264,13 @@ export default class SwitchBoardCommand extends Command { if (success) { this._ui.updateBoard(board); - const reloadWindowBtn = "Reload Window"; + const reloadWindowBtn = l10n.t("Reload Window"); // notify user that reloading the window is // recommended to update intellisense const reload = await window.showInformationMessage( - "It is recommended to reload the window to update intellisense " + - "with the new board.", + l10n.t( + "Reload the window to update intellisense with the new board." + ), reloadWindowBtn ); diff --git a/src/commands/switchSDK.mts b/src/commands/switchSDK.mts index 12b54931..50018eba 100644 --- a/src/commands/switchSDK.mts +++ b/src/commands/switchSDK.mts @@ -5,6 +5,7 @@ import { window, workspace, commands, + l10n } from "vscode"; import type UI from "../ui.mjs"; import { updateVSCodeStaticConfigs } from "../utils/vscodeConfigUtil.mjs"; @@ -64,18 +65,18 @@ export default class SwitchSDKCommand extends Command { versionBundleAvailable: boolean ): Promise { const cmakeVersions = await getCmakeReleases(); - const quickPickItems = ["Specific version", "Custom path"]; + const quickPickItems = [l10n.t("Specific version"), l10n.t("Custom path")]; if (versionBundleAvailable) { - quickPickItems.unshift("Default"); + quickPickItems.unshift(l10n.t("Default")); } if (await SwitchSDKCommand.isSystemCMakeAvailable()) { - quickPickItems.push("Use system CMake"); + quickPickItems.push(l10n.t("Use system CMake")); } if (cmakeVersions.length === 0) { void window.showErrorMessage( - "Failed to get CMake releases. " + - "Make sure you are connected to the internet." + l10n.t("Failed to get CMake releases.") + " " + + l10n.t("Make sure you are connected to the internet.") ); return; @@ -83,7 +84,7 @@ export default class SwitchSDKCommand extends Command { // show quick pick for cmake version const selectedCmakeVersion = await window.showQuickPick(quickPickItems, { - placeHolder: "Select CMake version", + placeHolder: l10n.t("Select CMake version"), }); if (selectedCmakeVersion === undefined) { @@ -96,7 +97,7 @@ export default class SwitchSDKCommand extends Command { case quickPickItems[1]: { // show quick pick for cmake version const selectedCmakeVersion = await window.showQuickPick(cmakeVersions, { - placeHolder: "Select CMake version", + placeHolder: l10n.t("Select CMake version"), }); if (selectedCmakeVersion === undefined) { @@ -112,8 +113,8 @@ export default class SwitchSDKCommand extends Command { canSelectFiles: true, canSelectFolders: false, canSelectMany: false, - openLabel: "Select", - title: "Select a cmake executable to use for this project", + openLabel: l10n.t("Select"), + title: l10n.t("Select a cmake executable to use for this project"), }); if (cmakeExePath && cmakeExePath[0]) { @@ -130,18 +131,18 @@ export default class SwitchSDKCommand extends Command { versionBundleAvailable: boolean ): Promise { const ninjaVersions = await getNinjaReleases(); - const quickPickItems = ["Specific version", "Custom path"]; + const quickPickItems = [l10n.t("Specific version"), l10n.t("Custom path")]; if (versionBundleAvailable) { - quickPickItems.unshift("Default"); + quickPickItems.unshift(l10n.t("Default")); } if (await SwitchSDKCommand.isSystemNinjaAvailable()) { - quickPickItems.push("Use system Ninja"); + quickPickItems.push(l10n.t("Use system Ninja")); } if (ninjaVersions.length === 0) { void window.showErrorMessage( - "Failed to get Ninja releases. " + - "Make sure you are connected to the internet." + l10n.t("Failed to get Ninja releases.") + " " + + l10n.t("Make sure you are connected to the internet.") ); return; @@ -149,7 +150,7 @@ export default class SwitchSDKCommand extends Command { // show quick pick for ninja version const selectedNinjaVersion = await window.showQuickPick(quickPickItems, { - placeHolder: "Select Ninja version", + placeHolder: l10n.t("Select Ninja version"), }); if (selectedNinjaVersion === undefined) { @@ -162,7 +163,7 @@ export default class SwitchSDKCommand extends Command { case quickPickItems[1]: { // show quick pick for ninja version const selectedNinjaVersion = await window.showQuickPick(ninjaVersions, { - placeHolder: "Select Ninja version", + placeHolder: l10n.t("Select Ninja version"), }); if (selectedNinjaVersion === undefined) { @@ -178,8 +179,8 @@ export default class SwitchSDKCommand extends Command { canSelectFiles: true, canSelectFolders: false, canSelectMany: false, - openLabel: "Select", - title: "Select a cmake executable to use for this project", + openLabel: l10n.t("Select"), + title: l10n.t("Select a ninja executable to use for this project"), }); if (ninjaExePath && ninjaExePath[0]) { @@ -208,13 +209,13 @@ export default class SwitchSDKCommand extends Command { toolchain: toolchain, })), { - placeHolder: "Select ARM/RISCV Embeded Toolchain version", + placeHolder: l10n.t("Select ARM/RISCV Embeded Toolchain version"), } ); } catch { void window.showErrorMessage( - "Failed to get supported toolchain versions. " + - "Make sure you are connected to the internet." + l10n.t("Failed to get supported toolchain versions.") + " " + + l10n.t("Make sure you are connected to the internet.") ); return; @@ -230,8 +231,8 @@ export default class SwitchSDKCommand extends Command { if (sdks.length === 0) { void window.showErrorMessage( - "Failed to get SDK releases. " + - "Make sure you are connected to the internet." + l10n.t("Failed to get SDK releases.") + " " + + l10n.t("Make sure you are connected to the internet.") ); return; @@ -245,7 +246,7 @@ export default class SwitchSDKCommand extends Command { sdk: sdk, })), { - placeHolder: "Select SDK version", + placeHolder: l10n.t("Select SDK version"), } ); @@ -310,7 +311,7 @@ export default class SwitchSDKCommand extends Command { workspace.workspaceFolders === undefined || workspace.workspaceFolders.length === 0 ) { - void window.showErrorMessage("Please open a Pico project folder first."); + void window.showErrorMessage(l10n.t("Please open a Pico project folder first.")); return; } @@ -331,9 +332,9 @@ export default class SwitchSDKCommand extends Command { const selectedPicotool = versionBundle?.picotool; - const configureAdvancedOptions = await window.showQuickPick(["No", "Yes"], { - title: "Switch Tools", - placeHolder: "Configure advanced options?", + const configureAdvancedOptions = await window.showQuickPick([l10n.t("No"), l10n.t("Yes")], { + title: l10n.t("Switch Tools"), + placeHolder: l10n.t("Configure advanced options?"), }); if (configureAdvancedOptions === undefined) { @@ -346,15 +347,15 @@ export default class SwitchSDKCommand extends Command { // internet is not required if locally cached version bundles are available // but in this case a use shouldn't see this message void window.showErrorMessage( - "Failed to get supported toolchain versions. " + - "Make sure you are connected to the internet." + l10n.t("Failed to get supported toolchain versions.") + " " + + l10n.t("Make sure you are connected to the internet.") ); return; } // TODO: || versionBundle === undefined - if (configureAdvancedOptions === "Yes") { + if (configureAdvancedOptions === l10n.t("Yes")) { const advancedOptions = await SwitchSDKCommand.getAdvancedOptions( supportedToolchainVersions, versionBundle @@ -367,7 +368,7 @@ export default class SwitchSDKCommand extends Command { } const selectedToolchain = - configureAdvancedOptions === "No" + configureAdvancedOptions === l10n.t("No") ? versionBundle?.toolchain !== undefined && supportedToolchainVersions.find( t => t.version === versionBundle?.toolchain @@ -390,7 +391,7 @@ export default class SwitchSDKCommand extends Command { let result = await window.withProgress( { location: ProgressLocation.Notification, - title: "Installing SDK...", + title: l10n.t("Installing SDK..."), cancellable: false, }, async progress => { @@ -407,7 +408,7 @@ export default class SwitchSDKCommand extends Command { progress.report({ increment: 100, // TODO: maybe only finished or sth like that - message: `Successfully installed SDK ${selectedSDK.label}.`, + message: l10n.t("Successfully installed SDK {0}.", selectedSDK.label), }); return true; @@ -420,8 +421,8 @@ export default class SwitchSDKCommand extends Command { }); void window.showErrorMessage( - `Failed to install SDK ${selectedSDK.label}. ` + - "Make sure all requirements are met." + l10n.t("Failed to install SDK {0}.", selectedSDK.label) + + l10n.t("Make sure all requirements are met.") ); return false; @@ -436,7 +437,7 @@ export default class SwitchSDKCommand extends Command { result = await window.withProgress( { location: ProgressLocation.Notification, - title: "Installing toolchain...", + title: l10n.t("Installing toolchain..."), cancellable: false, }, async progress => { @@ -458,8 +459,7 @@ export default class SwitchSDKCommand extends Command { progress.report({ increment: 100, message: - "Successfully installed " + - `toolchain ${selectedToolchain.label}.`, + l10n.t("Successfully installed toolchain {0}.", selectedToolchain.label), }); return true; @@ -472,7 +472,7 @@ export default class SwitchSDKCommand extends Command { }); void window.showErrorMessage( - `Failed to install toolchain ${selectedToolchain.label}.` + l10n.t("Failed to install toolchain {0}.", selectedToolchain.label) ); return false; @@ -487,7 +487,7 @@ export default class SwitchSDKCommand extends Command { result = await window.withProgress( { location: ProgressLocation.Notification, - title: "Installing tools...", + title: l10n.t("Installing tools..."), cancellable: false, }, async progress => { @@ -508,7 +508,7 @@ export default class SwitchSDKCommand extends Command { progress.report({ increment: 100, - message: "Successfully installed tools.", + message: l10n.t("Successfully installed tools."), }); return true; @@ -520,7 +520,7 @@ export default class SwitchSDKCommand extends Command { increment: 100, }); - void window.showErrorMessage("Failed to install tools."); + void window.showErrorMessage(l10n.t("Failed to install tools.")); return false; } @@ -535,7 +535,7 @@ export default class SwitchSDKCommand extends Command { result = await window.withProgress( { location: ProgressLocation.Notification, - title: "Downloading and installing Ninja...", + title: l10n.t("Downloading and installing Ninja..."), cancellable: false, }, async progress => { @@ -553,7 +553,7 @@ export default class SwitchSDKCommand extends Command { if (result) { progress.report({ increment: 100, - message: "Successfully installed Ninja.", + message: l10n.t("Successfully installed Ninja."), }); return true; @@ -563,7 +563,7 @@ export default class SwitchSDKCommand extends Command { increment: 100, }); - void window.showWarningMessage("Failed to install Ninja."); + void window.showWarningMessage(l10n.t("Failed to install Ninja.")); return false; } @@ -600,7 +600,7 @@ export default class SwitchSDKCommand extends Command { result = await window.withProgress( { location: ProgressLocation.Notification, - title: "Downloading and installing CMake...", + title: l10n.t("Downloading and installing CMake..."), cancellable: false, }, async progress => { @@ -622,7 +622,7 @@ export default class SwitchSDKCommand extends Command { increment: 100, }); - void window.showInformationMessage("Successfully installed CMake."); + void window.showInformationMessage(l10n.t("Successfully installed CMake.")); return true; } @@ -633,7 +633,7 @@ export default class SwitchSDKCommand extends Command { increment: 100, }); - void window.showWarningMessage("Failed to install CMake."); + void window.showWarningMessage(l10n.t("Failed to install CMake.")); return false; } @@ -647,7 +647,7 @@ export default class SwitchSDKCommand extends Command { result = await window.withProgress( { location: ProgressLocation.Notification, - title: "Updating project configuration...", + title: l10n.t("Updating project configuration..."), cancellable: false, }, async progress => { @@ -661,7 +661,7 @@ export default class SwitchSDKCommand extends Command { progress.report({ increment: 50, - message: "Project configuration updated.", + message: l10n.t("Project configuration updated."), }); const cmakeUpdateResult = await cmakeUpdateSDK( @@ -673,12 +673,12 @@ export default class SwitchSDKCommand extends Command { progress.report({ increment: 50, - message: "CMakeLists.txt updated.", + message: l10n.t("CMakeLists.txt updated."), }); if (!cmakeUpdateResult) { void window.showWarningMessage( - "Failed to update CMakeLists.txt for new SDK version." + l10n.t("Failed to update CMakeLists.txt for new SDK version.") ); return false; @@ -691,12 +691,13 @@ export default class SwitchSDKCommand extends Command { if (result) { this._ui.updateSDKVersion(selectedSDK.label.replace("v", "")); - const reloadWindowBtn = "Reload Window"; + const reloadWindowBtn = l10n.t("Reload Window"); // notify user that reloading the window is // recommended to update intellisense const reload = await window.showInformationMessage( - "It is recommended to reload the window to update intellisense " + - "with the new SDK version.", + l10n.t( + "Reload the window to update intellisense with the new SDK version." + ), reloadWindowBtn ); diff --git a/src/commands/uninstallPicoSDK.mts b/src/commands/uninstallPicoSDK.mts index 60fda2d5..05cfed7c 100644 --- a/src/commands/uninstallPicoSDK.mts +++ b/src/commands/uninstallPicoSDK.mts @@ -1,6 +1,6 @@ import { Command } from "./command.mjs"; import Logger from "../logger.mjs"; -import { window } from "vscode"; +import { window, l10n } from "vscode"; import { rimraf } from "rimraf"; import { join } from "path"; import { homedir } from "os"; @@ -21,18 +21,17 @@ export default class UninstallPicoSDKCommand extends Command { // and ask for confirmation const response = await window.showWarningMessage( - "Uninstalling Pico SDK - Are you sure you want to continue?", + l10n.t("Uninstalling Pico SDK - Are you sure you want to continue?"), { modal: true, detail: - "This will delete the Pico SDK and all its automatically installed " + - "dependencies from the system. This action cannot be undone.", + l10n.t("This will delete the Pico SDK and all its automatically installed dependencies from the system. This action cannot be undone."), }, - "Yes", - "No" + l10n.t("Yes"), + l10n.t("No") ); - if (response === "Yes") { + if (response === l10n.t("Yes")) { // uninstall the Pico SDK and all its automatically installed dependencies this._logger.info("Uninstalling Pico SDK..."); @@ -45,13 +44,13 @@ export default class UninstallPicoSDKCommand extends Command { }); this._logger.info("Pico SDK uninstalled successfully"); - void window.showInformationMessage("Pico SDK uninstalled successfully"); + void window.showInformationMessage(l10n.t("Pico SDK uninstalled successfully")); } catch (error) { this._logger.error( "Failed to uninstall Pico SDK", unknownErrorToString(error) ); - void window.showErrorMessage("Failed to uninstall Pico SDK"); + void window.showErrorMessage(l10n.t("Failed to uninstall Pico SDK")); return; } diff --git a/src/extension.mts b/src/extension.mts index 83f276e5..cd17ae11 100644 --- a/src/extension.mts +++ b/src/extension.mts @@ -5,6 +5,7 @@ import { type WebviewPanel, commands, ProgressLocation, + l10n, } from "vscode"; import { extensionName, @@ -230,11 +231,11 @@ export async function activate(context: ExtensionContext): Promise { false ); const wantToImport = await window.showInformationMessage( - "Do you want to import this project as Raspberry Pi Pico project?", - "Yes", - "No" + l10n.t("Do you want to import this project as Raspberry Pi Pico project?"), + l10n.t("Yes"), + l10n.t("No") ); - if (wantToImport === "Yes") { + if (wantToImport === l10n.t("Yes")) { void commands.executeCommand( `${extensionName}.${ImportProjectCommand.id}`, workspaceFolder.uri @@ -266,8 +267,8 @@ export async function activate(context: ExtensionContext): Promise { { location: ProgressLocation.Notification, title: - "Downloading and installing Pico SDK as selected. " + - "This may take a while...", + l10n.t("Downloading and installing Pico SDK as selected.") + " " + + l10n.t("This may take a while..."), cancellable: false, }, async progress => { @@ -290,7 +291,7 @@ export async function activate(context: ExtensionContext): Promise { "Make sure all requirements are met." ); - void window.showErrorMessage("Failed to install project SDK version."); + void window.showErrorMessage(l10n.t("Failed to install project SDK version.")); return; } else { @@ -313,7 +314,7 @@ export async function activate(context: ExtensionContext): Promise { "Failed to detect project toolchain version." ); - void window.showErrorMessage("Failed to detect project toolchain version."); + void window.showErrorMessage(l10n.t("Failed to detect project toolchain version.")); return; } @@ -323,8 +324,8 @@ export async function activate(context: ExtensionContext): Promise { { location: ProgressLocation.Notification, title: - "Downloading and installing toolchain as selected. " + - "This may take a while...", + l10n.t("Downloading and installing toolchain as selected.") + " " + + l10n.t("This may take a while..."), cancellable: false, }, async progress => { @@ -353,7 +354,7 @@ export async function activate(context: ExtensionContext): Promise { ); void window.showErrorMessage( - "Failed to install project toolchain version." + l10n.t("Failed to install project toolchain version.") ); return; @@ -376,8 +377,8 @@ export async function activate(context: ExtensionContext): Promise { { location: ProgressLocation.Notification, title: - "Downloading and installing tools as selected. " + - "This may take a while...", + l10n.t("Downloading and installing tools as selected.") + " " + + l10n.t("This may take a while..."), cancellable: false, }, async progress => { @@ -406,7 +407,7 @@ export async function activate(context: ExtensionContext): Promise { "Make sure all requirements are met." ); - void window.showErrorMessage("Failed to install project SDK version."); + void window.showErrorMessage(l10n.t("Failed to install project SDK version.")); return; } else { @@ -428,8 +429,8 @@ export async function activate(context: ExtensionContext): Promise { { location: ProgressLocation.Notification, title: - "Downloading and installing picotool as selected. " + - "This may take a while...", + l10n.t("Downloading and installing picotool as selected.") + " " + + l10n.t("This may take a while..."), cancellable: false, }, async progress => { @@ -452,7 +453,7 @@ export async function activate(context: ExtensionContext): Promise { installSuccess = false; Logger.error(LoggerSource.extension, "Failed to install picotool."); - void window.showErrorMessage("Failed to install picotool."); + void window.showErrorMessage(l10n.t("Failed to install picotool.")); return; } else { @@ -469,7 +470,9 @@ export async function activate(context: ExtensionContext): Promise { await window.withProgress( { location: ProgressLocation.Notification, - title: "Downloading and installing OpenOCD. This may take a while...", + title: + l10n.t("Downloading and installing OpenOCD.") + " " + + l10n.t("This may take a while..."), cancellable: false, }, async progress => { @@ -494,13 +497,13 @@ export async function activate(context: ExtensionContext): Promise { "Failed to download and install OpenOCD." ); void window.showWarningMessage( - "Failed to download and install OpenOCD." + l10n.t("Failed to download and install OpenOCD.") ); } else { Logger.debug(LoggerSource.extension, "Found/installed OpenOCD."); void window.showInformationMessage( - "OpenOCD found/installed successfully." + l10n.t("OpenOCD found/installed successfully.") ); } } @@ -538,7 +541,8 @@ export async function activate(context: ExtensionContext): Promise { await window.withProgress( { location: ProgressLocation.Notification, - title: "Downloading and installing Ninja. This may take a while...", + title: l10n.t("Downloading and installing Ninja.") + " " + + l10n.t("This may take a while..."), cancellable: false, }, async progress => { @@ -607,7 +611,8 @@ export async function activate(context: ExtensionContext): Promise { await window.withProgress( { location: ProgressLocation.Notification, - title: "Downloading and installing CMake. This may take a while...", + title: l10n.t("Downloading and installing CMake.") + " " + + l10n.t("This may take a while..."), cancellable: false, }, async progress => { diff --git a/src/ui.mts b/src/ui.mts index 6f647b89..761f2af8 100644 --- a/src/ui.mts +++ b/src/ui.mts @@ -1,4 +1,4 @@ -import { window, type StatusBarItem, StatusBarAlignment } from "vscode"; +import { window, type StatusBarItem, StatusBarAlignment, l10n } from "vscode"; import Logger from "./logger.mjs"; import type { PicoProjectActivityBar } from "./webview/activityBar.mjs"; @@ -14,25 +14,25 @@ const STATUS_BAR_ITEMS: { } = { [StatusBarItemKey.compile]: { // alt. "$(gear) Compile" - text: "$(file-binary) Compile", + text: l10n.t("$(file-binary) Compile"), command: "raspberry-pi-pico.compileProject", - tooltip: "Compile Project", + tooltip: l10n.t("Compile Project"), }, [StatusBarItemKey.run]: { // alt. "$(gear) Compile" - text: "$(run) Run", + text: l10n.t("$(run) Run"), command: "raspberry-pi-pico.runProject", - tooltip: "Run Project", + tooltip: l10n.t("Run Project"), }, [StatusBarItemKey.picoSDKQuickPick]: { - text: "Pico SDK: ", + text: l10n.t("Pico SDK: "), command: "raspberry-pi-pico.switchSDK", - tooltip: "Select Pico SDK", + tooltip: l10n.t("Select Pico SDK"), }, [StatusBarItemKey.picoBoardQuickPick]: { - text: "Board: ", + text: l10n.t("Board: "), command: "raspberry-pi-pico.switchBoard", - tooltip: "Select Board", + tooltip: l10n.t("Select Board"), }, }; @@ -64,14 +64,14 @@ export default class UI { public updateSDKVersion(version: string): void { this._items[StatusBarItemKey.picoSDKQuickPick].text = STATUS_BAR_ITEMS[ StatusBarItemKey.picoSDKQuickPick - ].text.replace("", version); + ].text.replace(/<.*>/, version); this._activityBarProvider.refresh(version); } public updateBoard(board: string): void { this._items[StatusBarItemKey.picoBoardQuickPick].text = STATUS_BAR_ITEMS[ StatusBarItemKey.picoBoardQuickPick - ].text.replace("", board); + ].text.replace(/<.*>/, board); } /* diff --git a/src/utils/cmakeUtil.mts b/src/utils/cmakeUtil.mts index 0b986f1a..c9757335 100644 --- a/src/utils/cmakeUtil.mts +++ b/src/utils/cmakeUtil.mts @@ -1,5 +1,5 @@ import { exec } from "child_process"; -import { workspace, type Uri, window, ProgressLocation } from "vscode"; +import { workspace, type Uri, window, ProgressLocation, l10n } from "vscode"; import { showRequirementsNotMetErrorMessage } from "./requirementsUtil.mjs"; import { dirname, join, resolve } from "path"; import Settings from "../settings.mjs"; @@ -104,12 +104,12 @@ export async function getPath(): Promise { export async function configureCmakeNinja(folder: Uri): Promise { if (process.platform !== "win32" && folder.fsPath.includes("\\")) { const errorMsg = - "CMake currently does not support folder names with backslashes."; + l10n.t("CMake currently does not support folder names with backslashes."); Logger.error(LoggerSource.cmake, errorMsg); await window.showErrorMessage( - "Failed to configure cmake for the current project. " + errorMsg + l10n.t("Failed to configure cmake for the current project.") + " " + errorMsg ); return false; @@ -172,7 +172,7 @@ export async function configureCmakeNinja(folder: Uri): Promise { { location: ProgressLocation.Notification, cancellable: true, - title: "Configuring CMake...", + title: l10n.t("Configuring CMake..."), }, async (progress, token) => { const cmake = @@ -381,10 +381,10 @@ export async function cmakeUpdateSDK( quickPickItems.push("pico2_w"); } const result = await window.showQuickPick(quickPickItems, { - placeHolder: "The new SDK version does not support your current board", + placeHolder: l10n.t("The new SDK version does not support your current board"), canPickMany: false, ignoreFocusOut: true, - title: "Please select a new board type", + title: l10n.t("Please select a new board type"), }); if (result === undefined) { diff --git a/src/utils/download.mts b/src/utils/download.mts index 5be48ed8..be8494f9 100644 --- a/src/utils/download.mts +++ b/src/utils/download.mts @@ -20,7 +20,7 @@ import { checkForGit } from "./requirementsUtil.mjs"; import { HOME_VAR, SettingsKey } from "../settings.mjs"; import Settings from "../settings.mjs"; import which from "which"; -import { window } from "vscode"; +import { window, l10n } from "vscode"; import { fileURLToPath } from "url"; import { type GithubReleaseAssetData, @@ -551,7 +551,7 @@ export async function downloadAndInstallSDK( "Python3 is not installed and could not be downloaded." ); - void window.showErrorMessage("Python3 is not installed and in PATH."); + void window.showErrorMessage(l10n.t("Python3 is not installed and in PATH.")); return false; } diff --git a/src/utils/gitUtil.mts b/src/utils/gitUtil.mts index b073471d..b692ebed 100644 --- a/src/utils/gitUtil.mts +++ b/src/utils/gitUtil.mts @@ -6,7 +6,7 @@ import type Settings from "../settings.mjs"; import { SettingsKey, HOME_VAR } from "../settings.mjs"; import { homedir } from "os"; import which from "which"; -import { window } from "vscode"; +import { window, l10n } from "vscode"; import { compareGe } from "./semverUtil.mjs"; export const execAsync = promisify(exec); @@ -62,16 +62,15 @@ export async function getGit(settings: Settings): Promise { `requires ${MIN_GIT_VERSION}.`); await window.showErrorMessage( - `Found Git version ${gitVersion}, but requires ${MIN_GIT_VERSION}. ` + - "Please install and add to PATH or " + - "set the path to the git executable in global settings." + l10n.t("Found Git version {0}, but requires {1}.", gitVersion, MIN_GIT_VERSION) + " " + + l10n.t("Please install and add to PATH or set the path to the git executable in global settings.") ); } else { Logger.log("Error: Git not found."); await window.showErrorMessage( - "Git not found. Please install and add to PATH or " + - "set the path to the git executable in global settings." + l10n.t("Git not found.") + " " + + l10n.t("Please install and add to PATH or set the path to the git executable in global settings.") ); } diff --git a/src/utils/githubREST.mts b/src/utils/githubREST.mts index bc86c6f7..9bd53f5c 100644 --- a/src/utils/githubREST.mts +++ b/src/utils/githubREST.mts @@ -5,7 +5,7 @@ import GithubApiCache, { } from "./githubApiCache.mjs"; import { type RequestOptions, request } from "https"; import { unknownErrorToString, unknownToError } from "./errorHelper.mjs"; -import { window } from "vscode"; +import { window, l10n } from "vscode"; // TODO: move into web consts export const HTTP_STATUS_OK = 200; @@ -420,8 +420,8 @@ export async function githubApiUnauthorized(): Promise { ); // show a warning to the user void window.showWarningMessage( - "Your GitHub Personal Access Token might be invalid or expired. " + - "It has now been removed from the settings." + l10n.t("Your GitHub Personal Access Token might be invalid or expired.") + " " + + l10n.t("It has now been removed from the settings.") ); await Settings.getInstance()?.updateGlobal(SettingsKey.githubToken, ""); } diff --git a/src/utils/pythonHelper.mts b/src/utils/pythonHelper.mts index 28858436..76764e7b 100644 --- a/src/utils/pythonHelper.mts +++ b/src/utils/pythonHelper.mts @@ -2,7 +2,7 @@ import Settings, { HOME_VAR, SettingsKey } from "../settings.mjs"; import { PythonExtension } from "@vscode/python-extension"; import { downloadEmbedPython } from "./download.mjs"; import { pyenvInstallPython, setupPyenv } from "./pyenvUtil.mjs"; -import { commands, ProgressLocation, window } from "vscode"; +import { commands, ProgressLocation, window, l10n } from "vscode"; import Logger, { LoggerSource } from "../logger.mjs"; import { execSync } from "child_process"; import { unknownErrorToString } from "./errorHelper.mjs"; @@ -32,8 +32,8 @@ export default async function findPython(): Promise { { location: ProgressLocation.Notification, title: - "Searching for Python. " + - "This may take a while if it has to be downloaded.", + l10n.t("Searching for Python.") + " " + + l10n.t("This may take a while if it has to be downloaded."), cancellable: false, }, async progress => { @@ -93,7 +93,7 @@ export default async function findPython(): Promise { await window.withProgress( { location: ProgressLocation.Notification, - title: "Downloading Python", + title: l10n.t("Downloading Python"), cancellable: false, }, // TODO: add progress and maybe cancelable @@ -121,7 +121,7 @@ export default async function findPython(): Promise { process.arch ); void window.showErrorMessage( - "Unsupported architecture for Windows: " + process.arch + l10n.t("Unsupported architecture for Windows: ") + process.arch ); return undefined; @@ -239,17 +239,14 @@ async function findPythonInPythonExtension(): Promise { export function showPythonNotFoundError(): void { void window .showErrorMessage( - "Failed to find any valid Python installation. " + - "Make sure Python >=3.9 is installed. " + - "You can set a Python executable directly in your " + - "user settings or select in the Python extension.", - "Open Python Extension", - "Edit Settings" + l10n.t("Failed to find any valid Python installation. Make sure Python >=3.9 is installed. You can set a Python executable directly in your user settings or select in the Python extension."), + l10n.t("Open Python Extension"), + l10n.t("Edit Settings") ) .then(selected => { - if (selected === "Open Python Extension") { + if (selected === l10n.t("Open Python Extension")) { void commands.executeCommand("python.setInterpreter"); - } else if (selected === "Edit Settings") { + } else if (selected === l10n.t("Edit Settings")) { void commands.executeCommand( "workbench.action.openSettings", extensionName + "." + SettingsKey.python3Path diff --git a/src/utils/requirementsUtil.mts b/src/utils/requirementsUtil.mts index 80820b0b..69fc146d 100644 --- a/src/utils/requirementsUtil.mts +++ b/src/utils/requirementsUtil.mts @@ -1,4 +1,4 @@ -import { window } from "vscode"; +import { window, l10n } from "vscode"; import which from "which"; import type Settings from "../settings.mjs"; import { SettingsKey, HOME_VAR } from "../settings.mjs"; @@ -17,10 +17,10 @@ export async function showRequirementsNotMetErrorMessage( missing: string[] ): Promise { await window.showErrorMessage( - "Development for the Pico requires " + - missing.join(", ") + - " to be installed and available in PATH. " + - "Please install and restart VS Code." + l10n.t( + "Development for the Pico requires {0} to be installed and available in PATH. Please install and restart VS Code.", + missing.join(", ") + ) ); } @@ -58,10 +58,11 @@ export async function checkForGit(settings: Settings): Promise { "Installed Git is too old and a new version could not be downloaded." ); void window.showErrorMessage( - "The installation of the Pico SDK requires Git " + - `version ${MIN_GIT_VERSION} or higher ` + - "to be installed and available in the PATH - " + - `you have version ${gitVersion}.` + l10n.t( + "The installation of the Pico SDK requires Git version {0} or higher to be installed and available in the PATH - you have version {1}.", + MIN_GIT_VERSION, + gitVersion + ) ); } else { Logger.error( @@ -69,11 +70,10 @@ export async function checkForGit(settings: Settings): Promise { "Git is not installed and could not be downloaded." ); void window.showErrorMessage( - "The installation of the Pico SDK requires Git " + - "to be installed and available in the PATH." + - (process.platform === "darwin" - ? " You can install it by running `xcode-select --install`" + - " in the terminal and restart your computer." + l10n.t( + "The installation of the Pico SDK requires Git to be installed and available in the PATH." + ) + (process.platform === "darwin" + ? l10n.t(" You can install it by running `xcode-select --install` in the terminal and restarting your computer.") : "") ); } diff --git a/src/webview/activityBar.mts b/src/webview/activityBar.mts index de33cf32..bfbb94a1 100644 --- a/src/webview/activityBar.mts +++ b/src/webview/activityBar.mts @@ -6,6 +6,7 @@ import { type Event, TreeItemCollapsibleState, ThemeIcon, + l10n } from "vscode"; import Logger from "../logger.mjs"; import { extensionName } from "../commands/command.mjs"; @@ -37,29 +38,29 @@ export class QuickAccessCommand extends TreeItem { } } -const COMMON_COMMANDS_PARENT_LABEL = "General"; -const PROJECT_COMMANDS_PARENT_LABEL = "Project"; -const DOCUMENTATION_COMMANDS_PARENT_LABEL = "Documentation"; +const COMMON_COMMANDS_PARENT_LABEL = l10n.t("General"); +const PROJECT_COMMANDS_PARENT_LABEL = l10n.t("Project"); +const DOCUMENTATION_COMMANDS_PARENT_LABEL = l10n.t("Documentation"); -const NEW_C_CPP_PROJECT_LABEL = "New C/C++ Project"; -const NEW_MICROPYTHON_PROJECT_LABEL = "New MicroPython Project"; -const IMPORT_PROJECT_LABEL = "Import Project"; -const EXAMPLE_PROJECT_LABEL = "New Project From Example"; -const SWITCH_SDK_LABEL = "Switch SDK"; -const SWITCH_BOARD_LABEL = "Switch Board"; -const COMPILE_PROJECT_LABEL = "Compile Project"; -const RUN_PROJECT_LABEL = "Run Project (USB)"; -const FLASH_PROJECT_LABEL = "Flash Project (SWD)"; -const CONFIGURE_CMAKE_PROJECT_LABEL = "Configure CMake"; -const CLEAN_CMAKE_PROJECT_LABEL = "Clean CMake"; -const DEBUG_PROJECT_LABEL = "Debug Project"; -const DEBUG_LAYOUT_PROJECT_LABEL = "Debug Layout"; +const NEW_C_CPP_PROJECT_LABEL = l10n.t("New C/C++ Project"); +const NEW_MICROPYTHON_PROJECT_LABEL = l10n.t("New MicroPython Project"); +const IMPORT_PROJECT_LABEL = l10n.t("Import Project"); +const EXAMPLE_PROJECT_LABEL = l10n.t("New Project From Example"); +const SWITCH_SDK_LABEL = l10n.t("Switch SDK"); +const SWITCH_BOARD_LABEL = l10n.t("Switch Board"); +const COMPILE_PROJECT_LABEL = l10n.t("Compile Project"); +const RUN_PROJECT_LABEL = l10n.t("Run Project (USB)"); +const FLASH_PROJECT_LABEL = l10n.t("Flash Project (SWD)"); +const CONFIGURE_CMAKE_PROJECT_LABEL = l10n.t("Configure CMake"); +const CLEAN_CMAKE_PROJECT_LABEL = l10n.t("Clean CMake"); +const DEBUG_PROJECT_LABEL = l10n.t("Debug Project"); +const DEBUG_LAYOUT_PROJECT_LABEL = l10n.t("Debug Layout"); export class PicoProjectActivityBar implements TreeDataProvider { public static readonly viewType = "raspberry-pi-pico-project-quick-access"; - private _sdkVersion: string = "N/A"; + private _sdkVersion: string = l10n.t("N/A"); private _onDidChangeTreeData = new EventEmitter< QuickAccessCommand | undefined | void diff --git a/src/webview/newMicroPythonProjectPanel.mts b/src/webview/newMicroPythonProjectPanel.mts index c050fe5b..b41df3c1 100644 --- a/src/webview/newMicroPythonProjectPanel.mts +++ b/src/webview/newMicroPythonProjectPanel.mts @@ -10,6 +10,7 @@ import { workspace, ProgressLocation, commands, + l10n } from "vscode"; import Settings from "../settings.mjs"; import Logger from "../logger.mjs"; @@ -69,7 +70,7 @@ export class NewMicroPythonProjectPanel { const panel = window.createWebviewPanel( NewMicroPythonProjectPanel.viewType, - "New MicroPython Pico Project", + l10n.t("New MicroPython Pico Project"), column || ViewColumn.One, getWebviewOptions(extensionUri) ); @@ -80,11 +81,11 @@ export class NewMicroPythonProjectPanel { void window .showErrorMessage( - "Failed to load settings. Please restart VS Code or reload the window.", - "Reload Window" + l10n.t("Failed to load settings. Please restart VS Code or reload the window."), + l10n.t("Reload Window") ) .then(selected => { - if (selected === "Reload Window") { + if (selected === l10n.t("Reload Window")) { commands.executeCommand("workbench.action.reloadWindow"); } }); @@ -105,7 +106,7 @@ export class NewMicroPythonProjectPanel { if (settings === undefined) { // TODO: maybe add restart button void window.showErrorMessage( - "Failed to load settings. Please restart VSCode." + l10n.t("Failed to load settings. Please restart VSCode.") ); return; @@ -191,7 +192,7 @@ export class NewMicroPythonProjectPanel { this._projectRoot.fsPath === "" ) { void window.showErrorMessage( - "No project root selected. Please select a project root." + l10n.t("No project root selected. Please select a project root.") ); await this._panel.webview.postMessage({ command: "submitDenied", @@ -205,7 +206,7 @@ export class NewMicroPythonProjectPanel { data.projectName.length === 0 ) { void window.showWarningMessage( - "The project name is empty. Please enter a project name." + l10n.t("The project name is empty. Please enter a project name.") ); await this._panel.webview.postMessage({ command: "submitDenied", @@ -219,8 +220,7 @@ export class NewMicroPythonProjectPanel { existsSync(join(this._projectRoot.fsPath, data.projectName)) ) { void window.showErrorMessage( - "Project already exists. " + - "Please select a different project name or root." + l10n.t("Project already exists. Please select a different project name or root.") ); await this._panel.webview.postMessage({ command: "submitDenied", @@ -235,9 +235,7 @@ export class NewMicroPythonProjectPanel { await window.withProgress( { location: ProgressLocation.Notification, - title: `Generating MicroPico project ${ - data.projectName ?? "undefined" - } in ${this._projectRoot?.fsPath}...`, + title: l10n.t("Generating MicroPico project {0} in {1}...", data.projectName ?? "undefined", this._projectRoot?.fsPath), }, async progress => this._generateProjectOperation(progress, data, message) @@ -272,8 +270,8 @@ export class NewMicroPythonProjectPanel { projectPath.length === 0 ) { void window.showErrorMessage( - "Failed to generate MicroPython project. " + - "Please try again and check your settings." + l10n.t("Failed to generate MicroPython project.") + " " + + l10n.t("Please try again and check your settings.") ); return; @@ -299,7 +297,7 @@ export class NewMicroPythonProjectPanel { message: "Failed", increment: 100, }); - await window.showErrorMessage("Failed to find python3 executable."); + await window.showErrorMessage(l10n.t("Failed to find python3 executable.")); return; } @@ -313,7 +311,7 @@ export class NewMicroPythonProjectPanel { // create the project folder const projectFolder = join(projectPath, data.projectName); progress.report({ - message: `Creating project folder ${projectFolder}`, + message: l10n.t("Creating project folder {0}", projectFolder), increment: 10, }); @@ -341,11 +339,11 @@ print("Finished.")\r\n`; ); } catch { progress.report({ - message: "Failed", + message: l10n.t("Failed"), increment: 100, }); await window.showErrorMessage( - `Failed to create project folder ${projectFolder}` + l10n.t("Failed to create project folder {0}", projectFolder) ); return; @@ -353,7 +351,7 @@ print("Finished.")\r\n`; commands.executeCommand("micropico.initialise", projectFolder, python3Path); progress.report({ - message: "Project initialized", + message: l10n.t("Project initialized"), increment: 90, }); @@ -367,7 +365,7 @@ print("Finished.")\r\n`; } private async _update(): Promise { - this._panel.title = "New MicroPython Pico Project"; + this._panel.title = l10n.t("New MicroPython Pico Project"); this._panel.iconPath = Uri.joinPath( this._extensionUri, @@ -395,7 +393,7 @@ print("Finished.")\r\n`; await this._updateTheme(); } else { void window.showErrorMessage( - "Failed to load webview for new MicroPython project" + l10n.t("Failed to load webview for new MicroPython project") ); this.dispose(); } @@ -485,7 +483,7 @@ print("Finished.")\r\n`; - New Pico MicroPython Project + ${l10n.t("New Pico MicroPython Project")} @@ -1669,6 +1666,14 @@ export class NewProjectPanel { const riscvWhiteYellowSvgUri = "${riscvWhiteYellowSvgUri.toString()}"; const riscvBlackSvgUri = "${riscvBlackSvgUri.toString()}"; const riscvColorSvgUri = "${riscvColorSvgUri.toString()}"; + + // translated strings + const showAdvancedOptionsStr = "${l10n.t("Show Advanced Options")}"; + const hideAdvancedOptionsStr = "${l10n.t("Hide Advanced Options")}"; + const selExampleStr = "${l10n.t("Select an example")}"; + const projNameStr = "${l10n.t("Project name")}"; + const customStr = "${l10n.t("Custom")}"; + const exampleStr = "${l10n.t("Example")}"; @@ -1677,18 +1682,18 @@ export class NewProjectPanel {
-

Basic Settings

+

${l10n.t("Basic Settings")}

${ !this._isProjectImport ? `
- +
+
- +
` : `

- Warning: Project Import Wizard may not work for all projects, and will often require manual correction after the import + ${l10n.t("Warning: Project Import Wizard may not work for all projects, and will often require manual correction after the import")}

` }
- +
@@ -1869,27 +1874,27 @@ export class NewProjectPanel { type="button" class="relative inline-flex items-center justify-center standard-button-size p-1 ml-4 overflow-hidden text-sm font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-pink-500 to-orange-400 group-hover:from-pink-500 group-hover:to-orange-400 hover:text-white dark:text-white focus:ring-4 focus:outline-none focus:ring-pink-200 dark:focus:ring-pink-800"> - Change + ${l10n.t("Change")}
- +
@@ -2223,7 +2228,7 @@ export class NewProjectPanel { ); } catch { await window.showErrorMessage( - "Unknown board type: " + options.boardType + l10n.t("Unknown board type:") + " " + options.boardType ); return; @@ -2346,7 +2351,7 @@ export class NewProjectPanel { generatorExitCode === 0 ) { void window.showInformationMessage( - `Successfully generated new project: ${projectName}` + l10n.t("Successfully generated new project: {0}", projectName) ); const folderAlreadyOpen = workspace.workspaceFolders?.some( @@ -2377,9 +2382,10 @@ export class NewProjectPanel { ); void window.showErrorMessage( - `Could not ${ - this._isProjectImport ? "import" : "create" - } new project: ${projectName}` + `${this._isProjectImport ? + l10n.t("Could not import new project") : + l10n.t("Could not create new project") + }: ${projectName}` ); } } diff --git a/web/main.js b/web/main.js index f54de8e2..78027c11 100644 --- a/web/main.js +++ b/web/main.js @@ -601,9 +601,9 @@ var exampleSupportedBoards = []; } let hidden = advancedOptions[0].hidden; if (hidden) { - document.getElementById('btn-advanced-options').innerText = "Show Advanced Options"; + document.getElementById('btn-advanced-options').innerText = showAdvancedOptionsStr; } else { - document.getElementById('btn-advanced-options').innerText = "Hide Advanced Options"; + document.getElementById('btn-advanced-options').innerText = hideAdvancedOptionsStr; } }); document.getElementById('btn-create').addEventListener('click', submitBtnClick); diff --git a/web/nav.js b/web/nav.js index 0f2e0d55..6b0c9bad 100644 --- a/web/nav.js +++ b/web/nav.js @@ -120,7 +120,7 @@ window.toggleCreateFromExampleMode = function (forceOn, forceOff) { if (createFromExampleBtn) { createFromExampleBtn.setAttribute('data-example-mode', 'false'); - createFromExampleBtn.innerText = 'Example'; + createFromExampleBtn.innerText = exampleStr; // add md:grid-cols-2 from projectNameGrid projectNameGrid.classList.add('md:grid-cols-2'); // hide dropdown button @@ -163,7 +163,7 @@ window.toggleCreateFromExampleMode = function (forceOn, forceOff) { if (window.projectNameInputOnKeyup) { projectNameInput.removeEventListener('keyup', window.projectNameInputOnKeyup); } - projectNameInput.setAttribute('placeholder', 'Project name'); + projectNameInput.setAttribute('placeholder', projNameStr); } if (projectOptionsDivs) { @@ -175,7 +175,7 @@ window.toggleCreateFromExampleMode = function (forceOn, forceOff) { if (createFromExampleBtn) { createFromExampleBtn.setAttribute('data-example-mode', 'true'); - createFromExampleBtn.innerText = 'Custom'; + createFromExampleBtn.innerText = customStr; // remove md:grid-cols-2 from projectNameGrid projectNameGrid.classList.remove('md:grid-cols-2'); // show dropdown button @@ -191,7 +191,7 @@ window.toggleCreateFromExampleMode = function (forceOn, forceOff) { projectNameInput.value = ''; //projectNameInput.setAttribute('list', "examples-list"); - projectNameInput.setAttribute('placeholder', 'Select an example'); + projectNameInput.setAttribute('placeholder', selExampleStr); if (defaultBoardTypeOption) { defaultBoardTypeOption.hidden = false;