Skip to content

Commit 0405779

Browse files
authored
Merge branch 'main' into release/v4.6.1
2 parents 5e33857 + 8a227d9 commit 0405779

File tree

4 files changed

+85
-0
lines changed

4 files changed

+85
-0
lines changed

test/e2e/displayLang.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as path from "path"
2+
import { describe, test, expect } from "./baseFixture"
3+
4+
// Given a code-server environment with Spanish Language Pack extension installed
5+
// and a languagepacks.json in the data-dir
6+
describe("--locale es", ["--extensions-dir", path.join(__dirname, "./extensions"), "--locale", "es"], {}, () => {
7+
test("should load code-server in Spanish", async ({ codeServerPage }) => {
8+
// When
9+
const visible = await codeServerPage.page.isVisible("text=Explorador")
10+
11+
// Then
12+
expect(visible).toBe(true)
13+
})
14+
})
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "vscode-language-pack-es",
3+
"displayName": "Spanish Language Pack for Visual Studio Code",
4+
"description": "Language pack extension for Spanish",
5+
"version": "1.70.0",
6+
"publisher": "MS-CEINTL",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/Microsoft/vscode-loc"
10+
},
11+
"engines": {
12+
"vscode": "^1.70.0"
13+
},
14+
"categories": [
15+
"Language Packs"
16+
],
17+
"contributes": {
18+
"localizations": [
19+
{
20+
"languageId": "es",
21+
"languageName": "Spanish",
22+
"localizedLanguageName": "español",
23+
"translations": [
24+
{
25+
"id": "vscode",
26+
"path": "./translations/main.i18n.json"
27+
}
28+
]
29+
}
30+
]
31+
}
32+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"": [
3+
"--------------------------------------------------------------------------------------------",
4+
"Copyright (c) Microsoft Corporation. All rights reserved.",
5+
"Licensed under the MIT License. See License.txt in the project root for license information.",
6+
"--------------------------------------------------------------------------------------------",
7+
"Do not edit this file. It is machine generated."
8+
],
9+
"version": "1.0.0",
10+
"contents": {
11+
"vs/workbench/contrib/files/browser/explorerViewlet": {
12+
"explore": "Explorador"
13+
}
14+
}
15+
}

test/e2e/models/CodeServer.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,30 @@ export class CodeServer {
8888
}),
8989
"utf8",
9090
)
91+
92+
const extensionsDir = path.join(__dirname, "../extensions")
93+
const languagepacksContent = {
94+
es: {
95+
hash: "8d919a946475223861fa0c62665a4c50",
96+
extensions: [
97+
{
98+
extensionIdentifier: {
99+
id: "ms-ceintl.vscode-language-pack-es",
100+
uuid: "47e020a1-33db-4cc0-a1b4-42f97781749a",
101+
},
102+
version: "1.70.0",
103+
},
104+
],
105+
translations: {
106+
vscode: `${extensionsDir}/ms-ceintl.vscode-language-pack-es-1.70.0/translations/main.i18n.json`,
107+
},
108+
label: "español",
109+
},
110+
}
111+
112+
// NOTE@jsjoeio - code-server should automatically generate the languagepacks.json for
113+
// using different display languages. This is a temporary workaround until we fix that.
114+
await fs.writeFile(path.join(dir, "languagepacks.json"), JSON.stringify(languagepacksContent))
91115
return dir
92116
}
93117

0 commit comments

Comments
 (0)