• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript localization-service.localeText函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap