Archived
1
0

feat: add displayLang test (#5495)

* feat(e2e): add language extension to setup

This adds a slimmed-down version of the Spanish Language Pack and also
adds a `languagepacks.json` to the e2e `workspaceDir` which allows use
to run a test suite passing the `--locale es` flags to simulate a
different display language.

* feat: add e2e test for display language patch

This tests loading code-server in Spanish using the `--locale` flag.

* fixup!: use JSON.stringify for readability

* fixup!: add comment about langaugepacks temp fix

* fixup!: slim down translations

* fixup!: slim down package.json for lang. ext
This commit is contained in:
Joe Previte
2022-08-31 13:28:36 -07:00
committed by GitHub
parent f9bfd58cf4
commit 8a227d9fa1
4 changed files with 85 additions and 0 deletions

View File

@ -88,6 +88,30 @@ export class CodeServer {
}),
"utf8",
)
const extensionsDir = path.join(__dirname, "../extensions")
const languagepacksContent = {
es: {
hash: "8d919a946475223861fa0c62665a4c50",
extensions: [
{
extensionIdentifier: {
id: "ms-ceintl.vscode-language-pack-es",
uuid: "47e020a1-33db-4cc0-a1b4-42f97781749a",
},
version: "1.70.0",
},
],
translations: {
vscode: `${extensionsDir}/ms-ceintl.vscode-language-pack-es-1.70.0/translations/main.i18n.json`,
},
label: "español",
},
}
// NOTE@jsjoeio - code-server should automatically generate the languagepacks.json for
// using different display languages. This is a temporary workaround until we fix that.
await fs.writeFile(path.join(dir, "languagepacks.json"), JSON.stringify(languagepacksContent))
return dir
}