forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmessages.ts
More file actions
28 lines (24 loc) · 1.16 KB
/
messages.ts
File metadata and controls
28 lines (24 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { DataScience } from '../../common/utils/localize';
import { ReportableAction } from './types';
const progressMessages = {
[ReportableAction.JupyterSessionWaitForIdleSession]: DataScience.waitingForJupyterSessionToBeIdle(),
[ReportableAction.KernelsGetKernelForLocalConnection]: DataScience.gettingListOfKernelsForLocalConnection(),
[ReportableAction.KernelsGetKernelForRemoteConnection]: DataScience.gettingListOfKernelsForRemoteConnection(),
[ReportableAction.KernelsGetKernelSpecs]: DataScience.gettingListOfKernelSpecs(),
[ReportableAction.KernelsRegisterKernel]: DataScience.registeringKernel(),
[ReportableAction.NotebookConnect]: DataScience.connectingToJupyter(),
[ReportableAction.NotebookStart]: DataScience.startingJupyterNotebook()
};
/**
* Given a reportable action, this will return the user friendly message.
*
* @export
* @param {ReportableAction} action
* @returns {(string | undefined)}
*/
export function getUserMessageForAction(action: ReportableAction): string | undefined {
return progressMessages[action];
}