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

Need help with automated language pack installation in code-server docker wrapper #7141

Closed
2 tasks done
olegchir opened this issue Dec 28, 2024 · 2 comments
Closed
2 tasks done
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@olegchir
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

Steps to Reproduce

We've developed an in-house wrapper for code-server that includes a feature allowing developers to set their IDE language through their user profile, rather than having to change it repeatedly in the IDE itself. It's a quite important thing for an international team. We implement this along with other customizations through Docker images built for each developer.

Currently, I'm trying to install language packs using this command in the Dockerfile:

code-server --install-extension ms-ceintl.vscode-language-pack-es

And setting the locale configuration in:

/home/coder/.local/share/code-server/User/argv.json

With the contents:

{
  "locale": "es"
}

However, I'm encountering several issues:

  1. The IDE still defaults to English when launched
  2. When attempting to reinstall the plugin via console, it shows as already installed
  3. This occurs whether installing from the marketplace ID or a local file
  4. In Command Palette -> Configure Display Language, only English appears in the list of downloaded languages
  5. After the marketplace API call completes, the Spanish language pack shows as *NOT DOWNLOADED
  6. Interestingly, when manually navigating to the marketplace page and clicking "install," something gets installed that makes the language pack work

The key question is: What is this additional component that makes it work, and how can I install it programmatically? While I could eventually debug this myself, an immediate solution would be extremely helpful.

Has anyone encountered this issue or knows what might be missing from the automated installation process?

Expected

The language pack should be available right from the start.

Actual

English language only.

Logs

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

This cannot be tested in native VS Code

Does this bug reproduce in GitHub Codespaces?

This cannot be tested in GitHub Codespaces

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

No response

@olegchir olegchir added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Dec 28, 2024
@liruohan399
Copy link

meet this issue too,this is my workaround

install the language extension and change language from UI,this step will generate a json file called “languagepacks.json”,copy this json file,and exe the following cmds in a new env

code-server --install-extension ms-ceintl.vscode-language-pack-es
cp argv.json /home/coder/.local/share/code-server/User/
cp languagepacks.json /home/coder/.local/share/code-server/

@code-asher
Copy link
Member

Yeah the problem is that the required language files are not generated when installing from the command line (only happens from the UI). I think this is a bug with VS Code itself though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
Development

No branches or pull requests

3 participants