当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript adf-core.TranslationService类代码示例

本文整理汇总了TypeScript中@alfresco/adf-core.TranslationService的典型用法代码示例。如果您正苦于以下问题:TypeScript TranslationService类的具体用法?TypeScript TranslationService怎么用?TypeScript TranslationService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了TranslationService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: constructor

    constructor(
        private peopleProcessService: PeopleProcessService,
        private logService: LogService,
        private translationService: TranslationService) {

        this.peopleIdChange = new EventEmitter();
        this.performSearch = this.searchUser.bind(this);
        this.defaultPlaceholder = this.translationService.instant(DEFAULT_ASSIGNEE_PLACEHOLDER);
    }
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:9,代码来源:people-selector.component.ts

示例2: initDefaultProperties

 private initDefaultProperties(): any[] {
     return [
         new CardViewTextItemModel(
             {
                 label: 'ADF_PROCESS_LIST.PROPERTIES.STATUS',
                 value: this.getProcessStatus(),
                 key: 'status'
             }),
         new CardViewDateItemModel(
             {
                 label: 'ADF_PROCESS_LIST.PROPERTIES.END_DATE',
                 value: this.processInstance.ended,
                 format: 'MMM DD YYYY',
                 key: 'ended',
                 default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.END_DATE_DEFAULT')
             }),
         new CardViewTextItemModel(
             {
                 label: 'ADF_PROCESS_LIST.PROPERTIES.CATEGORY',
                 value: this.processInstance.processDefinitionCategory,
                 key: 'category',
                 default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.CATEGORY_DEFAULT')
             }),
         new CardViewTextItemModel(
             {
                 label: 'ADF_PROCESS_LIST.PROPERTIES.BUSINESS_KEY',
                 value: this.processInstance.businessKey,
                 key: 'businessKey',
                 default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.BUSINESS_KEY_DEFAULT')
             }),
         new CardViewTextItemModel(
             {
                 label: 'ADF_PROCESS_LIST.PROPERTIES.CREATED_BY',
                 value: this.getStartedByFullName(),
                 key: 'assignee',
                 default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.CREATED_BY_DEFAULT')
             }),
         new CardViewDateItemModel(
             {
                 label: 'ADF_PROCESS_LIST.PROPERTIES.CREATED',
                 value: this.processInstance.started,
                 format: 'MMM DD YYYY',
                 key: 'created'
             }),
         new CardViewTextItemModel(
             {label: 'ADF_PROCESS_LIST.PROPERTIES.ID',
             value: this.processInstance.id,
             key: 'id'
         }),
         new CardViewTextItemModel(
             {label: 'ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION',
             value: this.processInstance.processDefinitionDescription,
             key: 'description',
             default: this.translationService.instant('ADF_PROCESS_LIST.PROPERTIES.DESCRIPTION_DEFAULT')
         })
     ];
 }
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:57,代码来源:process-instance-header.component.ts

示例3: showUndoNotificationBar

    /**
     * Show undo notification bar.
     *
     * @param latestFilesAdded - files in the upload queue enriched with status flag and xhr object.
     */
    showUndoNotificationBar(latestFilesAdded: FileModel[]) {
        let messageTranslate: any, actionTranslate: any;
        messageTranslate = this.translationService.get('FILE_UPLOAD.MESSAGES.PROGRESS');
        actionTranslate = this.translationService.get('FILE_UPLOAD.ACTION.UNDO');

        this.notificationService.openSnackMessageAction(messageTranslate.value, actionTranslate.value, 3000).onAction().subscribe(() => {
            this.uploadService.cancelUpload(...latestFilesAdded);
        });
    }
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:14,代码来源:upload-drag-area.component.ts

示例4: transform

 transform(errorCode: number): string {
     return this.translation.instant(`FILE_UPLOAD.ERRORS.${errorCode || 'GENERIC'}`);
 }
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:3,代码来源:file-upload-error.pipe.ts


注:本文中的@alfresco/adf-core.TranslationService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。