當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。