mirror of
https://github.com/coder/code-server.git
synced 2026-04-16 21:31:43 -05:00
Add language customization flag (#7374)
This allows you to customize any string (that has a translation) or add your own translations.
This commit is contained in:
committed by
GitHub
parent
8b3d9b9e0a
commit
92fca0dcc3
@@ -7,6 +7,7 @@ import { plural } from "../common/util"
|
||||
import { createApp, ensureAddress } from "./app"
|
||||
import { AuthType, DefaultedArgs, Feature, toCodeArgs, UserProvidedArgs } from "./cli"
|
||||
import { commit, version, vsRootPath } from "./constants"
|
||||
import { loadCustomStrings } from "./i18n"
|
||||
import { register } from "./routes"
|
||||
import { VSCodeModule } from "./routes/vscode"
|
||||
import { isDirectory, open } from "./util"
|
||||
@@ -122,6 +123,12 @@ export const runCodeServer = async (
|
||||
): Promise<{ dispose: Disposable["dispose"]; server: http.Server }> => {
|
||||
logger.info(`code-server ${version} ${commit}`)
|
||||
|
||||
// Load custom strings if provided
|
||||
if (args.i18n) {
|
||||
await loadCustomStrings(args.i18n)
|
||||
logger.info("Loaded custom strings")
|
||||
}
|
||||
|
||||
logger.info(`Using user-data-dir ${args["user-data-dir"]}`)
|
||||
logger.debug(`Using extensions-dir ${args["extensions-dir"]}`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user