Skip to content

Commit

Permalink
[AAE-4428] Changed so TranslationService injection is not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hunter committed Mar 30, 2021
1 parent 3ef4721 commit d49c582
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</adf-dropdown-breadcrumb>
<div
data-automation-id="content-node-selector-selected-counter">
{{ getSelectedCountTranslation() }}
{{ 'NODE_SELECTOR.SELECTED_COUNT' | translate: { count: getSelectedCount() } }}
</div>
</adf-toolbar-title>
</adf-toolbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ import {
FileUploadDeleteEvent,
FileModel,
AppConfigService,
DataSorting,
TranslationService
DataSorting
} from '@alfresco/adf-core';
import { FormControl } from '@angular/forms';
import { Node, NodePaging, Pagination, SiteEntry, SitePaging, NodeEntry, QueryBody, RequestScope } from '@alfresco/js-api';
Expand Down Expand Up @@ -267,8 +266,7 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
private uploadService: UploadService,
private sitesService: SitesService,
private appConfigService: AppConfigService,
private contentNodeSelectorPanelService: ContentNodeSelectorPanelService,
private translation: TranslationService) {
private contentNodeSelectorPanelService: ContentNodeSelectorPanelService) {
}

set chosenNode(value: Node[]) {
Expand All @@ -280,10 +278,6 @@ export class ContentNodeSelectorPanelComponent implements OnInit, OnDestroy {
return this._chosenNode;
}

getSelectedCountTranslation(): string {
return this.translation.instant(`NODE_SELECTOR.SELECTED_COUNT`, { count: this.getSelectedCount() });
}

getSelectedCount(): number {
return this.chosenNode?.length || 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h2>{{title}}</h2>
></adf-dropdown-breadcrumb>
<div
data-automation-id="content-node-selector-upload-selected-counter">
{{ getSelectedCountTranslation() }}
{{ 'NODE_SELECTOR.SELECTED_COUNT' | translate: { count: getSelectedCount() } }}
</div>
</adf-toolbar-title>
</adf-toolbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ export class ContentNodeSelectorComponent implements OnInit {
return this.translation.instant(`NODE_SELECTOR.${action}_ITEM`, { name: this.translation.instant(name) });
}

getSelectedCountTranslation(): string {
return this.translation.instant(`NODE_SELECTOR.SELECTED_COUNT`, { count: this.getSelectedCount() });
}

getSelectedCount(): number {
return this.chosenNode?.length || 0;
}
Expand Down

0 comments on commit d49c582

Please sign in to comment.