當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript localization-service.localeText函數代碼示例

本文整理匯總了TypeScript中common/core/services/localization-service.localeText函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript localeText函數的具體用法?TypeScript localeText怎麽用?TypeScript localeText使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了localeText函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: getExportWaitMessageHeaderText

	getExportWaitMessageHeaderText() {
		if (this.exportProgress === 'export')
			return this.$izendaLocaleService.localeText('js_ExportingInProgress', 'Exporting in progress.');
		if (this.exportProgress === 'print')
			return this.$izendaLocaleService.localeText('js_PrintingInProgress', 'Printing in progress.');
		return '';
	}
開發者ID:izenda,項目名稱:resources,代碼行數:7,代碼來源:dashboard-component.ts

示例2: getExportWaitMessageText

	getExportWaitMessageText() {
		if (this.exportProgress === 'export')
			return this.$izendaLocaleService.localeText('js_FinishExporting', 'Please wait till export is completed...');
		if (this.exportProgress === 'print')
			return this.$izendaLocaleService.localeText('js_FinishPrinting', 'Please finish printing before continue.');
		return '';
	}
開發者ID:izenda,項目名稱:resources,代碼行數:7,代碼來源:dashboard-component.ts

示例3:

			error => {
				const errorTitle = this.$izendaLocaleService.localeText('js_FailedPrintReportTitle', 'Report print error');
				let errorText = this.$izendaLocaleService.localeText('js_FailedPrintReport',
					'Failed to print report "{0}". Error description: {1}.');
				errorText = errorText.replaceAll('{0}', this.model.reportFullName ? this.model.reportFullName : '');
				errorText = errorText.replaceAll('{1}', error);
				this.$izendaUtilUiService.showErrorDialog(errorText, errorTitle);
				console.error(error);
			});
開發者ID:izenda,項目名稱:resources,代碼行數:9,代碼來源:toolbar-component.ts

示例4: getReportSetCategory

	/**
	 * Get report list by category
	 * @param {string} category category name.
	 */
	getReportSetCategory(category: string): angular.IPromise<any> {
		var categoryStr = angular.isDefined(category)
			? (category.toLowerCase() === this.$izendaLocaleService.localeText('js_Uncategorized', 'Uncategorized').toLowerCase()
				? ''
				: category)
			: '';
		const errorText = this.$izendaLocaleService.localeText('js_GetCategoryError', 'Failed to get reports for category');
		return this.$izendaRsQueryService.query('reportlistdatalite', [categoryStr], { dataType: 'json' }, {
			handler: name => `${errorText}: ${name}`,
			params: [category]
		});
	}
開發者ID:izenda,項目名稱:resources,代碼行數:16,代碼來源:common-query-service.ts

示例5: setBackgroundImageFromLocalhost

	/**
	 * Set file selected in file input as background
	 */
	setBackgroundImageFromLocalhost() {
		const $fileBtn = angular.element('#izendaDashboardBackground');
		if (window.File && window.FileReader && window.FileList && window.Blob) {
			if ($fileBtn[0]['files'].length === 0)
				return;
			const file = $fileBtn[0]['files'][0];
			// test file information
			if (!file.type.match('image.*')) {
				alert(this.$izendaLocaleService.localeText('js_ShouldBeImage', 'File should be image'));
				return;
			}
			// read the file:
			// TODO READER + TYPESCRIPT!
			const reader = new FileReader();
			reader.onload = (event: any) => {
				var bytes = event.target.result;
				this.$izendaBackgroundService.backgroundImageBase64 = bytes;
			};
			//reader.onload = (() => {
			//	return event => {
			//		var bytes = event.target.result;
			//		this.$izendaBackgroundService.backgroundImageBase64 = bytes;
			//	};
			//})(file);
			// Read in the image file as a data URL.
			reader.readAsDataURL(file);
		}
	}
開發者ID:izenda,項目名稱:resources,代碼行數:31,代碼來源:toolbar-component.ts

示例6: setCrs

	/**
	 * Set AdHocContext current report set
	 * @param {string} reportSetFullName Report set full name for check.
	 */
	setCrs(reportSetFullName: string): angular.IPromise<any> {
		const errorText = this.$izendaLocaleService.localeText('js_SetCrsError', 'Failed to set current report set');
		return this.$izendaRsQueryService.query('setcurrentreportset', [reportSetFullName], { dataType: 'text' }, {
			handler: name => `${errorText}: ${name}`,
			params: [reportSetFullName]
		});
	}
開發者ID:izenda,項目名稱:resources,代碼行數:11,代碼來源:common-query-service.ts

示例7: getReportParts

	/**
	 * Get report parts
	 * @param {string} reportFullName Report full name (xxx@aaa\bbb).
	 */
	getReportParts(reportFullName: string): angular.IPromise<any> {
		const errorText = this.$izendaLocaleService.localeText('js_ReportPartsError', 'Failed to get report parts for report');
		return this.$izendaRsQueryService.query('reportdata', [reportFullName], { dataType: 'json' }, {
			handler: name => `${errorText}: ${name}`,
			params: [reportFullName]
		});
	}
開發者ID:izenda,項目名稱:resources,代碼行數:11,代碼來源:common-query-service.ts

示例8:

		this._loadCategories().then(() => {
			if (newLocation.isNew) {
				this._newDashboard();
				return;
			}
			// validate report full name:
			const wantedFullName = this._getWantedReportFullName(newLocation);
			if (!wantedFullName) {
				this.navigateNewDashboard(); // change url to "?isNew=1"
				return;
			}
			if (newLocation.fullName === wantedFullName) {
				// wanted report and report from the location are the same - open dashboard.
				this.loadDashboardInternal(wantedFullName, !!updateFromSource);
			} else {
				if (newLocation.fullName) {
					// show notification to a user if we change the location from wrong report to default.
					let message = this.$izendaLocaleService.localeText('js_FailedToLoadDashboard',
						'Failed to load dashboard "{0}". Opening default dashboard "{1}".');
					message = message.replace('{0}', newLocation.fullName);
					message = message.replace('{1}', wantedFullName);
					this.$izendaUtilUiService.showNotification(message);
				}
				this.navigateToDashboard(wantedFullName); // change url to "?rn=default_dashboard"
			}
		});
開發者ID:izenda,項目名稱:resources,代碼行數:26,代碼來源:dashboard-storage-service.ts


注:本文中的common/core/services/localization-service.localeText函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。