messages.ts 5.3 KB
Newer Older
1 2 3 4 5 6 7
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
'use strict';

import nls = require('vs/nls');
S
Sandeep Somavarapu 已提交
8 9
import Severity from 'vs/base/common/severity';
import { IMarker } from 'vs/platform/markers/common/markers';
10

S
Sandeep Somavarapu 已提交
11
export default class Messages {
S
Sandeep Somavarapu 已提交
12

13
	public static MARKERS_PANEL_VIEW_CATEGORY:string= nls.localize('viewCategory', "View");
S
Sandeep Somavarapu 已提交
14
	public static MARKERS_PANEL_TOGGLE_LABEL:string= nls.localize('problems.view.show.label', "Show Problems");
15

S
Sandeep Somavarapu 已提交
16 17 18
	public static PROBLEMS_PANEL_CONFIGURATION_TITLE:string= nls.localize('problems.panel.configuration.title', "Problems view configuration");
	public static PROBLEMS_PANEL_CONFIGURATION_AUTO_REVEAL:string= nls.localize('problems.panel.configuration.autoreveal', "Controls if Problems view should automatically reveal files when opening them");

19 20
	public static MARKERS_PANEL_TITLE_NO_PROBLEMS:string= nls.localize('markers.panel.title.no.problems', "No problems");

S
Sandeep Somavarapu 已提交
21
	public static MARKERS_PANEL_NO_PROBLEMS_BUILT:string= nls.localize('markers.panel.no.problems.build', "No problems have been detected in the workspace so far.");
S
Sandeep Somavarapu 已提交
22
	public static MARKERS_PANEL_NO_PROBLEMS_FILTERS:string= nls.localize('markers.panel.no.problems.filters', "No results found with provided filter criteria");
23

24
	public static MARKERS_PANEL_ACTION_TOOLTIP_FILTER:string= nls.localize('markers.panel.action.filter', "Filter Problems");
25
	public static MARKERS_PANEL_FILTER_PLACEHOLDER:string= nls.localize('markers.panel.filter.placeholder', "Filter by type or text");
26 27 28
	public static MARKERS_PANEL_FILTER_ERRORS:string= nls.localize('markers.panel.filter.errors', "errors");
	public static MARKERS_PANEL_FILTER_WARNINGS:string= nls.localize('markers.panel.filter.warnings', "warnings");
	public static MARKERS_PANEL_FILTER_INFOS:string= nls.localize('markers.panel.filter.infos', "infos");
S
Sandeep Somavarapu 已提交
29

S
Sandeep Somavarapu 已提交
30 31 32 33 34 35 36 37
	public static MARKERS_PANEL_SINGLE_ERROR_LABEL:string= nls.localize('markers.panel.single.error.label', "1 Error");
	public static MARKERS_PANEL_MULTIPLE_ERRORS_LABEL=(noOfErrors: number):string=>{return nls.localize('markers.panel.multiple.errors.label', "{0} Errors", ''+noOfErrors);};
	public static MARKERS_PANEL_SINGLE_WARNING_LABEL:string= nls.localize('markers.panel.single.warning.label', "1 Warning");
	public static MARKERS_PANEL_MULTIPLE_WARNINGS_LABEL=(noOfWarnings: number):string=>{return nls.localize('markers.panel.multiple.warnings.label', "{0} Warnings", ''+noOfWarnings);};
	public static MARKERS_PANEL_SINGLE_INFO_LABEL:string= nls.localize('markers.panel.single.info.label', "1 Info");
	public static MARKERS_PANEL_MULTIPLE_INFOS_LABEL=(noOfInfos: number):string=>{return nls.localize('markers.panel.multiple.infos.label', "{0} Infos", ''+noOfInfos);};
	public static MARKERS_PANEL_SINGLE_UNKNOWN_LABEL:string= nls.localize('markers.panel.single.unknown.label', "1 Unknown");
	public static MARKERS_PANEL_MULTIPLE_UNKNOWNS_LABEL=(noOfUnknowns: number):string=>{return nls.localize('markers.panel.multiple.unknowns.label', "{0} Unknowns", ''+noOfUnknowns);};
38

39
	public static MARKERS_PANEL_AT_LINE_COL_NUMBER= (ln: number, col: number):string=>{return nls.localize('markers.panel.at.ln.col.number', "({0}, {1})", '' + ln, '' + col);}
S
Sandeep Somavarapu 已提交
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58

	public static PROBLEMS_TREE_ARIA_LABEL_RESOURCE= (fileName, noOfProblems):string => {return nls.localize('problems.tree.aria.label.resource', "{0} with {1} problems", fileName, noOfProblems);}
	public static PROBLEMS_TREE_ARIA_LABEL_MARKER= (marker: IMarker):string => {
		switch (marker.severity) {
			case Severity.Error:
				return marker.source ? nls.localize('problems.tree.aria.label.error.marker', "Error generated by {0}: {1} at line {2} and column {3}", marker.source, marker.message, marker.startLineNumber, marker.startColumn)
									: nls.localize('problems.tree.aria.label.error.marker.nosource', "Error: {0} at line {1} and column {2}", marker.message, marker.startLineNumber, marker.startColumn);
			case Severity.Warning:
				return marker.source ? nls.localize('problems.tree.aria.label.warning.marker', "Warning generated by {0}: {1} at line {2} and column {3}", marker.source, marker.message, marker.startLineNumber, marker.startColumn)
									: nls.localize('problems.tree.aria.label.warning.marker.nosource', "Warning: {0} at line {1} and column {2}", marker.message, marker.startLineNumber, marker.startColumn);

			case Severity.Info:
				return marker.source ? nls.localize('problems.tree.aria.label.info.marker', "Info generated by {0}: {1} at line {2} and column {3}", marker.source, marker.message, marker.startLineNumber, marker.startColumn)
									: nls.localize('problems.tree.aria.label.info.marker.nosource', "Info: {0} at line {1} and column {2}", marker.message, marker.startLineNumber, marker.startColumn);
			default:
				return marker.source ? nls.localize('problems.tree.aria.label.marker', "Problem generated by {0}: {1} at line {2} and column {3}", marker.source, marker.message, marker.startLineNumber, marker.startColumn)
									: nls.localize('problems.tree.aria.label.marker.nosource', "Problem: {0} at line {1} and column {2}", marker.message, marker.startLineNumber, marker.startColumn);
		}
	}
S
Sandeep Somavarapu 已提交
59
}