Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MacOS 14.5]Why the CMake-Tools extension does not display in English? #3691

Closed
nolongerwait opened this issue Apr 6, 2024 · 10 comments
Closed

Comments

@nolongerwait
Copy link

Brief Issue Summary

image image

why these areas display in Chinese language? and I need it in English.

image

I confirm that my "Configurate Display Language" is "English"(see the latest image).

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

No response

@github-actions github-actions bot added the triage label Apr 6, 2024
@nolongerwait
Copy link
Author

Can anyone help me to change the cmake-tools extension display language to English?

@nolongerwait
Copy link
Author

I find this issue microsoft/vscode#82791 , but I didnot download any language pack.

so, why the cmake-tools extension still display in Chinese? All the other extensions display in English and work normally.

@nolongerwait
Copy link
Author

in .vscode/extensions/ms-vscode.cmake-tools-1.17.17/dist/main.js

class SchemaProvider {
    async provideTextDocumentContent(uri) {
        console.assert(uri.path[0] === '/', "A preceeding slash is expected on schema uri path");
        const fileName = uri.path.substr(1);
        const locale = util.getLocaleId();
        let localizedFilePath = path.join(util.thisExtensionPath(), "dist/schema/", locale, fileName);
        const fileExists = await util.checkFileExists(localizedFilePath);
        if (!fileExists) {
            localizedFilePath = path.join(util.thisExtensionPath(), fileName);
        }
        return pr_1.fs.readFile(localizedFilePath, "utf8");
    }
}

util.getLocaleId(); what value will return after call this method, and does it get locale from vscode display language or local device?

@nolongerwait nolongerwait changed the title Why the CMake-Tools extension does not display in English? [MacOS 14.5]Why the CMake-Tools extension does not display in English? Apr 7, 2024
@nolongerwait
Copy link
Author

fine, when I upgrade my vscode to latest version(1.88) in my another macbook pro, the cmake-tools extension display language also change to Chinese.

@gcampbell-msft
Copy link
Collaborator

@nolongerwait To confirm, this happens only for this extension?

We use the vscode-nls extension for localization, which should handle this appropriately, I wonder if there is a bug with that?

@nolongerwait
Copy link
Author

@gcampbell-msft yep, only cmake-tools extension display in Chinese not English.

@gcampbell-msft
Copy link
Collaborator

It seems like there was an issue here as well for a different extension: microsoft/vscode-cpptools#10632, and it seems like it should be fixed based on this: microsoft/vscode-cpptools#10632 (comment).

@TylerLeonhardt Is there any known bugs on VS Code with this still?

@nolongerwait
Copy link
Author

Based on the content of the issue you provided, I have made the following discoveries:
When I download and use other language packs, all displays are correct. For instance, when I download the Japanese language pack and restart vscode, the entire interface, including the notification UI of cmake-tools, is displayed in Japanese. At this point, if I switch back to English through Configure Display Language, everything returns to normal, and cmake-tools also displays UI notifications in English.

image image

So, I suspect that vscode-nls might still have a BUG, which causes the locale to retrieve the local device's regional language instead of the display language set by vscode in an initial environment (where only the default English display is available).

@gcampbell-msft
Copy link
Collaborator

@nolongerwait I'm glad to hear that you were able to workaround this issue. @TylerLeohardt Can you confirm whether this issue is still present in VS Code or if it is in vscode-nls?

Thanks

@gcampbell-msft
Copy link
Collaborator

Closing since this seems external and there is a workaround. Once we get confirmation about where the external issue might be we'll create a bug in the correct location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

No branches or pull requests

2 participants