mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-2484] moved translation into the context menu action (#3092)
This commit is contained in:
@@ -21,7 +21,9 @@ import { Component, HostListener, Input, OnDestroy, OnInit, Renderer2, ViewChild
|
||||
import { MatMenuTrigger } from '@angular/material';
|
||||
import { Subscription } from 'rxjs/Subscription';
|
||||
import { ContextMenuService } from './context-menu.service';
|
||||
|
||||
/**
|
||||
* @deprecated: context-menu-holder is deprecated, use adf-context-menu-holder instead.
|
||||
*/
|
||||
@Component({
|
||||
selector: 'adf-context-menu-holder, context-menu-holder',
|
||||
template: `
|
||||
@@ -35,7 +37,7 @@ import { ContextMenuService } from './context-menu.service';
|
||||
<mat-icon *ngIf="showIcons && link.model?.icon">
|
||||
{{ link.model?.icon }}
|
||||
</mat-icon>
|
||||
{{link.title || link.model?.title}}
|
||||
{{ (link.title || link.model?.title) | translate}}
|
||||
</button>
|
||||
</mat-menu>
|
||||
`
|
||||
|
@@ -18,6 +18,7 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MaterialModule } from '../material.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { ContextMenuHolderComponent } from './context-menu-holder.component';
|
||||
import { ContextMenuDirective } from './context-menu.directive';
|
||||
@@ -26,7 +27,8 @@ import { ContextMenuService } from './context-menu.service';
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule
|
||||
MaterialModule,
|
||||
TranslateModule
|
||||
],
|
||||
declarations: [
|
||||
ContextMenuHolderComponent,
|
||||
|
Reference in New Issue
Block a user