Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: missing translations of remote built-in extensions#249430

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
TylerLeonhardt merged 4 commits intomicrosoft:mainfromhyrious:patch-2
Jun 27, 2025

Conversation

hyrious
Copy link
Contributor

@hyrioushyrious commentedMay 21, 2025
edited
Loading

@BlackHole1 noticed that some translations are missing when develop in remote mode. After digging a bit, we found that only built-in extensions' NLS messages are missing. For example, the Source Control view (contributed by the built-in 'Git' extension) and built-in extensions' configurations are in English.

Despite that the remote server will download and install the corresponding language pack extension, it does not pick the language pack up because of 2 problems:

  1. There's nonls.keys.json in the server build, causingclp/{hash}.{lang}/* failed to generate.
  2. When scanning built-in extensions, the UI language was not passed correctly to the backend.

This PR fixes the 2 problems.

Note about problem 1: The original codePromise.all([mkdir, read keys, read messages]) will fail when the keys file is missing, but the mkdir task would succeed and leave an empty folder which prevents it regenerate in the next calling. So I changed the testing logic from the folder to the file in it.

Fixes#250579

@hyrious
Copy link
ContributorAuthor

@microsoft-github-policy-service agree

@sandy081
Copy link
Member

Can you please share more information here - what is the bug? Are there steps to reproduce? Any screenshots would be helpful. Before that please file an issue first with all this information. Thanks

@hyrious
Copy link
ContributorAuthor

@sandy081 Hi thanks for showing up. I have created an issue linked to this PR:#250579

@sandy081sandy081 self-requested a reviewJune 4, 2025 11:27
@sandy081sandy081 removed their request for reviewJune 4, 2025 11:28
@TylerLeonhardt
Copy link
Member

TylerLeonhardt commentedJun 11, 2025
edited
Loading

@hyrious how did you test this change, because I just tested it (by building a local build of VS Code) and it sadly does not work (I'm using a pseudolanguage pack since I know only English)

image

@TylerLeonhardt
Copy link
Member

@sandy081 your guidance would be nice here. The steps are easy to reproduce:

  • Install a language pack
  • Do any Remote connection (like Dev Containers)
  • Check the source control view for localization

These strings are localized in the manifest so I'm not sure why, when there's a remote, the manifest strings would stick to English.

@hyrious
Copy link
ContributorAuthor

hyrious commentedJun 11, 2025
edited
Loading

@TylerLeonhardt A little tricky to test because the remote host should also be built by yourself. If you're using the official reh build in the remote host it wouldn't work.

I actually tested it by manually port changes to the code-server. You may have a try:

  1. Find the code server's source code in the remote OS, it should be inside ~/.vscode-server.
  2. Copy the nls.keys.json from your local vscode to the same folder as nls.messages.json in the remote OS.
  3. Delete theclp folder from the remote OS if it was generated before.
  4. Port changes to the server's source code. If you're just lazy, you can hard code a language option in the scan extensions method (see this pr's diff).
  5. Reconnect to it, this means a full restart of the code-server process. The client should have been modified to send correct IPC messages. Note that in this step, you have to make sure the local commit does not change otherwise the server may refuse to connect.

@BlackHole1
Copy link
Contributor

Delete the clp folder from the remote OS if it was generated before.

clp location:~/.vscode-server-insiders/data/clp

@TylerLeonhardt
Copy link
Member

I built an Insiders build off of this branch and can confirm that this fixes the problem :)

TylerLeonhardt
TylerLeonhardt previously approved these changesJun 12, 2025
dbaeumer
dbaeumer previously requested changesJun 13, 2025
TylerLeonhardt
TylerLeonhardt previously approved these changesJun 13, 2025
try {
const userScanOptions: UserExtensionsScanOptions = { includeInvalid: true, profileLocation, productVersion };
let scannedExtensions: IScannedExtension[] = [];
if (type === null || type === ExtensionType.System) {
let scanAllExtensionsPromise = this.scanAllExtensionPromise.get(profileLocation);
if (!scanAllExtensionsPromise) {
scanAllExtensionsPromise = this.extensionsScannerService.scanAllExtensions({}, userScanOptions)
scanAllExtensionsPromise = this.extensionsScannerService.scanAllExtensions({ language}, userScanOptions)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is not this promise should be cached by language?

Copy link
ContributorAuthor

@hyrioushyriousJun 13, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Oh.. yes. Maybe I will just use${profileLocation}?${language} for key of thescanAllExtensionPromise map?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Yes, you need to change both scanned extensions promises map

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@sandy081 Sorry, just noticed the comment. Code updated.

roblourens
roblourens previously approved these changesJun 13, 2025
TylerLeonhardt
TylerLeonhardt previously approved these changesJun 14, 2025
@TylerLeonhardt
Copy link
Member

@sandy081 I defer to you for final approval

@sandy081
Copy link
Member

@TylerLeonhardt Approved from my side. Should we merge?

Copy link
Member

@TylerLeonhardtTylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

🎉

@TylerLeonhardtTylerLeonhardtenabled auto-merge (squash)June 27, 2025 13:14
@TylerLeonhardtTylerLeonhardt merged commit7dd2343 intomicrosoft:mainJun 27, 2025
7 checks passed
@TylerLeonhardt
Copy link
Member

@hyrious this fix is going to make a lot of devs happy. Thank you for contributing!

hyrious, BlackHole1, and Cheerego7 reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@bpaserobpaserobpasero left review comments

@TylerLeonhardtTylerLeonhardtTylerLeonhardt approved these changes

@sandy081sandy081sandy081 approved these changes

@alexr00alexr00alexr00 approved these changes

@roblourensroblourensroblourens left review comments

@dbaeumerdbaeumerdbaeumer left review comments

Assignees

@TylerLeonhardtTylerLeonhardt

Labels
None yet
Projects
None yet
Milestone
June 2025
Development

Successfully merging this pull request may close these issues.

Translations for built-in extensions are missing in remote mode
9 participants
@hyrious@sandy081@TylerLeonhardt@BlackHole1@roblourens@bpasero@dbaeumer@alexr00@benibenj

[8]ページ先頭

©2009-2025 Movatter.jp