-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmessages.ts
More file actions
22 lines (18 loc) · 829 Bytes
/
messages.ts
File metadata and controls
22 lines (18 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import {getMessageFromCatalog} from "@salesforce/code-analyzer-engine-api";
const MESSAGE_CATALOG : { [key: string]: string } = {
TemplateMessage1:
`This message has one variable, '%s', in its message.`,
TemplateMessage2:
`This message has two variables, '%s' and %d, in its message.`,
// *** Update this for the engine name
UnsupportedEngineName:
`The TemplateEnginePlugin does not support an engine with name '%s'.`
}
/**
* getMessage - This is the convenience function to get a message out of the message catalog.
* @param msgId - The message identifier
* @param args - The arguments that will fill in the %s and %d markers.
*/
export function getMessage(msgId: string, ...args: (string | number)[]): string {
return getMessageFromCatalog(MESSAGE_CATALOG, msgId, ...args);
}