Compare commits

...

7 Commits

Author SHA1 Message Date
Olivier Benz
9f6d18ea26 Update Code to 1.102.2 (#7436) 2025-07-24 12:07:27 -08:00
Sheldon Tsen
fe7db4900a Update values.yaml to better support dind (#7431) 2025-07-22 09:17:44 -08:00
Asher
84728f0b21 Release v4.102.1 2025-07-17 13:25:16 -08:00
Asher
aaf2d91a21 Deleted unused and outdated afdesign file 2025-07-17 13:25:15 -08:00
Olivier Benz
47e9d43922 Update Code to 1.102.1 (#7424) 2025-07-17 10:55:37 -08:00
Asher
f26309a23c Release v4.102.0 2025-07-16 18:56:42 -08:00
Asher
0f9a0e8fb3 Revert escaping for i18n strings
Looks like the library already escapes, so we were getting double
escaping.
2025-07-16 18:10:11 -08:00
8 changed files with 78 additions and 39 deletions

View File

@@ -22,6 +22,30 @@ Code v99.99.999
## Unreleased ## Unreleased
## [4.102.1](https://github.com/coder/code-server/releases/tag/v4.102.1) - 2025-07-17
Code v1.102.1
### Changed
- Update to Code 1.102.1.
## [4.102.0](https://github.com/coder/code-server/releases/tag/v4.102.0) - 2025-07-16
Code v1.102.0
### Changed
- Update to Code 1.102.0.
### Added
- Custom strings can be configured using the `--i18n` flag set to a JSON
file. This can be used for either translation (and can be used alongside
`--locale`) or for customizing the strings. See
[./src/node/i18n/locales/en.json](./src/node/i18n/locales/en.json) for the
available keys.
## [4.101.2](https://github.com/coder/code-server/releases/tag/v4.101.2) - 2025-06-25 ## [4.101.2](https://github.com/coder/code-server/releases/tag/v4.101.2) - 2025-06-25
Code v1.101.2 Code v1.101.2

View File

@@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.28.1 version: 3.29.1
# This is the version number of the application being deployed. This version number should be # This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to # incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using. # follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 4.101.2 appVersion: 4.102.1

View File

@@ -6,7 +6,7 @@ replicaCount: 1
image: image:
repository: codercom/code-server repository: codercom/code-server
tag: '4.101.2' tag: '4.102.1'
pullPolicy: Always pullPolicy: Always
# Specifies one or more secrets to be used when pulling images from a # Specifies one or more secrets to be used when pulling images from a
@@ -75,8 +75,9 @@ extraArgs: []
extraVars: [] extraVars: []
# - name: DISABLE_TELEMETRY # - name: DISABLE_TELEMETRY
# value: "true" # value: "true"
# if dind is desired:
# - name: DOCKER_HOST # - name: DOCKER_HOST
# value: "tcp://localhost:2375" # value: "tcp://localhost:2376"
## ##
## Init containers parameters: ## Init containers parameters:
@@ -139,25 +140,39 @@ lifecycle:
# - -c # - -c
# - curl -s -L SOME_SCRIPT | bash # - curl -s -L SOME_SCRIPT | bash
# for dind, the following may be helpful
# postStart:
# exec:
# command:
# - /bin/sh
# - -c
# - |
# sudo apt-get update \
# && sudo apt-get install -y docker.io
## Enable an Specify container in extraContainers. ## Enable an Specify container in extraContainers.
## This is meant to allow adding code-server dependencies, like docker-dind. ## This is meant to allow adding code-server dependencies, like docker-dind.
extraContainers: | extraContainers: |
# If docker-dind is used, DOCKER_HOST env is mandatory to set in "extraVars" # If docker-dind is used, DOCKER_HOST env is mandatory to set in "extraVars"
#- name: docker-dind # - name: docker-dind
# image: docker:19.03-dind # image: docker:28.3.2-dind
# imagePullPolicy: IfNotPresent # imagePullPolicy: IfNotPresent
# resources: # resources:
# requests: # requests:
# cpu: 250m # cpu: 1
# memory: 256M # ephemeral-storage: "50Gi"
# securityContext: # memory: 10Gi
# privileged: true # securityContext:
# procMount: Default # privileged: true
# env: # procMount: Default
# - name: DOCKER_TLS_CERTDIR # env:
# value: "" # - name: DOCKER_TLS_CERTDIR
# - name: DOCKER_DRIVER # value: "" # disable TLS setup
# value: "overlay2" # command:
# - dockerd
# - --host=unix:///var/run/docker.sock
# - --host=tcp://0.0.0.0:2376
extraInitContainers: | extraInitContainers: |
# - name: customization # - name: customization

View File

@@ -383,6 +383,9 @@ mount into `/home/coder/myproject` from inside the `code-server` container. You
need to make sure the Docker daemon's `/home/coder/myproject` is the same as the need to make sure the Docker daemon's `/home/coder/myproject` is the same as the
one mounted inside the `code-server` container, and the mount will work. one mounted inside the `code-server` container, and the mount will work.
If you want Docker enabled when deploying on Kubernetes, look at the `values.yaml`
file for the 3 fields: `extraVars`, `lifecycle.postStart`, and `extraContainers`.
## How do I disable telemetry? ## How do I disable telemetry?
Use the `--disable-telemetry` flag to disable telemetry. Use the `--disable-telemetry` flag to disable telemetry.

View File

@@ -464,7 +464,8 @@ through the proxy without authentication, use `--skip-auth-preflight`.
## Internationalization and customization ## Internationalization and customization
code-server allows you to provide a JSON file to configure certain strings. This can be used for both internationalization and customization. code-server allows you to provide a JSON file to configure certain strings. This
can be used for both internationalization and customization.
Create a JSON file with your custom strings: Create a JSON file with your custom strings:
@@ -489,13 +490,19 @@ Or this can be done in the config file:
i18n: /path/to/custom-strings.json i18n: /path/to/custom-strings.json
``` ```
You can combine this with the `--locale` flag to configure language support for both code-server and VS Code in cases where code-server has no support but VS Code does. If you are using this for internationalization, please consider sending us a pull request to contribute it to `src/node/i18n/locales`. You can combine this with the `--locale` flag to configure language support for
both code-server and VS Code in cases where code-server has no support but VS
Code does. If you are using this for internationalization, please consider
sending us a pull request to contribute it to `src/node/i18n/locales`.
### Available keys and placeholders ### Available keys and placeholders
Refer to [../src/node/i18n/locales/en.json](../src/node/i18n/locales/en.json) for a full list of the available keys for translations. Note that the only placeholders supported for each key are the ones used in the default string. Refer to [../src/node/i18n/locales/en.json](../src/node/i18n/locales/en.json)
for a full list of the available keys for translations. Note that the only
placeholders supported for each key are the ones used in the default string.
The `--app-name` flag controls the `{{app}}` placeholder in templates. If you want to change the name, you can either: The `--app-name` flag controls the `{{app}}` placeholder in templates. If you
want to change the name, you can either:
1. Set `--app-name` (potentially alongside `--i18n`) 1. Set `--app-name` (potentially alongside `--i18n`)
2. Use `--i18n` and hardcode the name in your strings 2. Use `--i18n` and hardcode the name in your strings

Binary file not shown.

View File

@@ -31,7 +31,7 @@ const getRoot = async (req: Request, error?: Error): Promise<string> => {
const locale = req.args["locale"] || "en" const locale = req.args["locale"] || "en"
i18n.changeLanguage(locale) i18n.changeLanguage(locale)
const appName = req.args["app-name"] || "code-server" const appName = req.args["app-name"] || "code-server"
const welcomeText = escapeHtml(req.args["welcome-text"] || (i18n.t("WELCOME", { app: appName }) as string)) const welcomeText = req.args["welcome-text"] || (i18n.t("WELCOME", { app: appName }) as string)
// Determine password message using i18n // Determine password message using i18n
let passwordMsg = i18n.t("LOGIN_PASSWORD", { configFile: req.args.config }) let passwordMsg = i18n.t("LOGIN_PASSWORD", { configFile: req.args.config })
@@ -40,23 +40,16 @@ const getRoot = async (req: Request, error?: Error): Promise<string> => {
} else if (req.args.usingEnvHashedPassword) { } else if (req.args.usingEnvHashedPassword) {
passwordMsg = i18n.t("LOGIN_USING_HASHED_PASSWORD") passwordMsg = i18n.t("LOGIN_USING_HASHED_PASSWORD")
} }
passwordMsg = escapeHtml(passwordMsg)
// Get messages from i18n (with HTML escaping for security)
const loginTitle = escapeHtml(i18n.t("LOGIN_TITLE", { app: appName }))
const loginBelow = escapeHtml(i18n.t("LOGIN_BELOW"))
const passwordPlaceholder = escapeHtml(i18n.t("PASSWORD_PLACEHOLDER"))
const submitText = escapeHtml(i18n.t("SUBMIT"))
return replaceTemplates( return replaceTemplates(
req, req,
content content
.replace(/{{I18N_LOGIN_TITLE}}/g, loginTitle) .replace(/{{I18N_LOGIN_TITLE}}/g, i18n.t("LOGIN_TITLE", { app: appName }))
.replace(/{{WELCOME_TEXT}}/g, welcomeText) .replace(/{{WELCOME_TEXT}}/g, welcomeText)
.replace(/{{PASSWORD_MSG}}/g, passwordMsg) .replace(/{{PASSWORD_MSG}}/g, passwordMsg)
.replace(/{{I18N_LOGIN_BELOW}}/g, loginBelow) .replace(/{{I18N_LOGIN_BELOW}}/g, i18n.t("LOGIN_BELOW"))
.replace(/{{I18N_PASSWORD_PLACEHOLDER}}/g, passwordPlaceholder) .replace(/{{I18N_PASSWORD_PLACEHOLDER}}/g, i18n.t("PASSWORD_PLACEHOLDER"))
.replace(/{{I18N_SUBMIT}}/g, submitText) .replace(/{{I18N_SUBMIT}}/g, i18n.t("SUBMIT"))
.replace(/{{ERROR}}/, error ? `<div class="error">${escapeHtml(error.message)}</div>` : ""), .replace(/{{ERROR}}/, error ? `<div class="error">${escapeHtml(error.message)}</div>` : ""),
) )
} }