microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.46k stars 449 forks source link

Extension display language not right #3791

Open xxxbrian opened 4 months ago

xxxbrian commented 4 months ago

Brief Issue Summary

The same issue as #3691 , the cmake extension displays the wrong language.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

xxxbrian commented 4 months ago

Did some digging, this is due to Code

export function getLocaleId(): string {
    if (typeof (process.env.VSCODE_NLS_CONFIG) === "string") {
        const vscodeNlsConfigJson: any = JSON.parse(process.env.VSCODE_NLS_CONFIG);
        if (typeof (vscodeNlsConfigJson.locale) === "string") {
            return vscodeNlsConfigJson.locale;
        }
    }
    return "en";
}

process.env.VSCODE_NLS_CONFIG is used to retrieve VSCode NLS. This is an incorrect usage and it seems that this environment variable has been deprecated (as the value it obtains is completely wrong).

gcampbell-msft commented 4 months ago

@xxxbrian Thanks for the issue. I took a look at the PR, and based on the API reading I just did, that seems like it will work for that method. However, that almost certainly won't fix the overall issue because we only use that method for the presentation of the pinned commands.

Have you tried the workaround mentioned in this bug? #3691

Could you confirm whether the above is the case?