Skip to content

[loc] The custom configure preset is not translated in the VS Code Command Palette drop-down options #3803

@v-frankwang

Description

@v-frankwang

Brief Issue Summary

Repro steps:

  1. Create a new folder named 'Test' and open it with vscode.
  2. Create a file named CMakeLists.txt with the following content:
        cmake_minimum_required(VERSION 3.8) 
        project(Test)
        add_executable(Test "main.cpp")

  1. Create a file named test.cpp with the following content:
         #include <iostream> 
         auto main() -> int { std::cout << "hello world" << std::endl; }
  1. Create a file named CMakePresets.json with the following content:
 {
            "version": 3,
            "configurePresets": [
                  {
                       "name": "windows-base",
                       "hidden": true,
                       "generator": "Ninja",
                       "binaryDir": "${sourceDir}/out/build/${presetName}",
                       "installDir": "${sourceDir}/out/install/${presetName}",
                       "cacheVariables": {
                       "CMAKE_C_COMPILER": "cl.exe",
                       "CMAKE_CXX_COMPILER": "cl.exe"
                       },
                      "condition": {
                      "type": "equals",
                      "lhs": "${hostSystemName}",
                      "rhs": "Windows"
                    }
                 },
                {
                     "name": "x64-debug",
                     "displayName": "x64 Debug",
                     "inherits": "windows-base",
                     "architecture": {
                     "value": "x64",
                      "strategy": "external"
                 },
                      "cacheVariables": {
                       "CMAKE_BUILD_TYPE": "Debug"
                }
             },
                  {
                      "name": "x64-release",
                      "displayName": "x64 Release",
                      "inherits": "x64-debug",
                      "cacheVariables": {
                      "CMAKE_BUILD_TYPE": "Release"
               }
            },
           {
                 "name": "x86-debug",
                 "displayName": "x86 Debug",
                 "inherits": "windows-base",
                 "architecture": {
                 "value": "x86",
                 "strategy": "external"
            },
                 "cacheVariables": {
                 "CMAKE_BUILD_TYPE": "Debug"
              }
              },
              {
                  "name": "x86-release",
                  "displayName": "x86 Release",
                  "inherits": "x86-debug",
                  "cacheVariables": {
                  "CMAKE_BUILD_TYPE": "Release"
                }
           }
       ]
 }

5 . Run command: “CMake:configure
6. Run command: “CMake: Add configure preset
7. Select “custom
8. Enter the name of the preset:”Custom configure preset
9. Run command: “CMake:Select configure preset
10. Watch drop-down list

Actual results:
image

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

Metadata

Metadata

Labels

buga bug in the product

Type

No type

Projects

Status

Completed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions