Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/typings/vscode-globals-nls.d.ts
3290 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
// AMD2ESM migration relevant
7
8
/**
9
* NLS Globals: these need to be defined in all contexts that make
10
* use of our `nls.localize` and `nls.localize2` functions. This includes:
11
* - Electron main process
12
* - Electron window (renderer) process
13
* - Utility Process
14
* - Node.js
15
* - Browser
16
* - Web worker
17
*
18
* That is because during build time we strip out all english strings from
19
* the resulting JS code and replace it with a <number> that is then looked
20
* up from the `_VSCODE_NLS_MESSAGES` array.
21
*/
22
declare global {
23
/**
24
* All NLS messages produced by `localize` and `localize2` calls
25
* under `src/vs` translated to the language as indicated by
26
* `_VSCODE_NLS_LANGUAGE`.
27
*
28
* Instead of accessing this global variable directly, use function getNLSMessages.
29
*/
30
var _VSCODE_NLS_MESSAGES: string[];
31
/**
32
* The actual language of the NLS messages (e.g. 'en', de' or 'pt-br').
33
*
34
* Instead of accessing this global variable directly, use function getNLSLanguage.
35
*/
36
var _VSCODE_NLS_LANGUAGE: string | undefined;
37
}
38
39
// fake export to make global work
40
export { }
41
42