Skip to content

Commit a15ce70

Browse files
committed
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.
1 parent 101d4ee commit a15ce70

File tree

3 files changed

+78
-0
lines changed

3 files changed

+78
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
"license": "SEE MIT LICENSE IN LICENSE.md",
12+
"engines": {
13+
"vscode": "^1.70.0"
14+
},
15+
"icon": "languagepack.png",
16+
"categories": [
17+
"Language Packs"
18+
],
19+
"contributes": {
20+
"localizations": [
21+
{
22+
"languageId": "es",
23+
"languageName": "Spanish",
24+
"localizedLanguageName": "español",
25+
"translations": [
26+
{
27+
"id": "vscode",
28+
"path": "./translations/main.i18n.json"
29+
}
30+
]
31+
}
32+
]
33+
},
34+
"scripts": {
35+
"update": "cd ../vscode && npm run update-localization-extension es"
36+
},
37+
"__metadata": {
38+
"id": "47e020a1-33db-4cc0-a1b4-42f97781749a",
39+
"publisherId": "0b0882c3-aee3-4d7c-b5f9-872f9be0a115",
40+
"publisherDisplayName": null,
41+
"targetPlatform": "undefined",
42+
"isApplicationScoped": true,
43+
"updated": true,
44+
"isPreReleaseVersion": false,
45+
"preRelease": false
46+
}
47+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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/base/browser/ui/actionbar/actionViewItems": {
12+
"titleLabel": "{0} ({1})"
13+
},
14+
"vs/workbench/contrib/files/browser/explorerViewlet": {
15+
"explore": "Explorador"
16+
},
17+
"vs/workbench/contrib/files/browser/views/explorerDecorationsProvider": {
18+
"label": "Explorador"
19+
},
20+
"vs/workbench/contrib/preferences/browser/settingsLayout": {
21+
"fileExplorer": "Explorador"
22+
}
23+
}
24+
}

test/e2e/models/CodeServer.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,13 @@ export class CodeServer {
8888
}),
8989
"utf8",
9090
)
91+
92+
const extensionsDir = path.join(__dirname, "../extensions")
93+
94+
await fs.writeFile(
95+
path.join(dir, "languagepacks.json"),
96+
`{"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"}}`,
97+
)
9198
return dir
9299
}
93100

0 commit comments

Comments
 (0)