[html/css/json] pass the location of the localization bundle to the server (#168111)

pass the location of the localization bundle to the server
This commit is contained in:
Martin Aeschlimann
2022-12-05 23:49:27 +01:00
committed by GitHub
parent 6e3976f744
commit b27ee6b7b5
15 changed files with 88 additions and 12 deletions

View File

@@ -0,0 +1,19 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare let self: any;
import * as l10n from '@vscode/l10n';
let initialized = false;
self.onmessage = async (e: any) => {
if (!initialized) {
initialized = true;
const i10lLocation = e.data.i10lLocation;
if (i10lLocation) {
await l10n.config({ uri: i10lLocation });
}
await import('./jsonServerMain');
}
};