mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[ADF-2000] Destination picker is not completely translated (#2883)
This commit is contained in:
parent
ac657ae40a
commit
d2d635b94d
@ -22,7 +22,7 @@ import { Subject } from 'rxjs/Subject';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import { ShareDataRow } from '../document-list/data/share-data-row.model';
|
||||
import { MinimalNodeEntryEntity, SitePaging } from 'alfresco-js-api';
|
||||
import { DataColumn, SitesService } from '@alfresco/adf-core';
|
||||
import { DataColumn, SitesService, TranslationService } from '@alfresco/adf-core';
|
||||
import { DocumentListService } from '../document-list/services/document-list.service';
|
||||
import { ContentNodeSelectorComponent } from './content-node-selector.component';
|
||||
import { ContentNodeSelectorComponentData } from './content-node-selector.component-data.interface';
|
||||
@ -33,7 +33,8 @@ export class ContentNodeDialogService {
|
||||
constructor(private dialog: MatDialog,
|
||||
private contentService: ContentService,
|
||||
private documentListService: DocumentListService,
|
||||
private siteService: SitesService) { }
|
||||
private siteService: SitesService,
|
||||
private translation: TranslationService) { }
|
||||
|
||||
openFileBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]> {
|
||||
return Observable.fromPromise(this.documentListService.getFolderNode(folderNodeId))
|
||||
@ -69,8 +70,10 @@ export class ContentNodeDialogService {
|
||||
complete: this.close.bind(this)
|
||||
});
|
||||
|
||||
const title = this.getTitleTranslation(action, contentEntry.name);
|
||||
|
||||
const data: ContentNodeSelectorComponentData = {
|
||||
title: `${action} '${contentEntry.name}' to ...`,
|
||||
title: title,
|
||||
actionName: action,
|
||||
currentFolderId: contentEntry.parentId,
|
||||
imageResolver: this.imageResolver.bind(this),
|
||||
@ -88,6 +91,10 @@ export class ContentNodeDialogService {
|
||||
}
|
||||
}
|
||||
|
||||
getTitleTranslation(action: string, name: string): string {
|
||||
return this.translation.instant(`NODE_SELECTOR.${action.toUpperCase()}_ITEM`, {name});
|
||||
}
|
||||
|
||||
openUploadFolderDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]> {
|
||||
const select = new Subject<MinimalNodeEntryEntity[]>();
|
||||
select.subscribe({
|
||||
|
@ -4,7 +4,7 @@
|
||||
id="searchInput"
|
||||
[formControl]="searchInput"
|
||||
type="text"
|
||||
placeholder="Search"
|
||||
placeholder="{{'NODE_SELECTOR.SEARCH' | translate}}"
|
||||
[value]="searchTerm"
|
||||
data-automation-id="content-node-selector-search-input">
|
||||
|
||||
|
@ -40,8 +40,11 @@
|
||||
"CANCEL": "Cancel",
|
||||
"CHOOSE": "Choose",
|
||||
"COPY": "Copy",
|
||||
"COPY_ITEM": "Copy '{{ name }}' to ...",
|
||||
"MOVE": "Move",
|
||||
"MOVE_ITEM": "Move '{{ name }}' to ...",
|
||||
"NO_RESULTS": "No results found",
|
||||
"SEARCH": "Search",
|
||||
"SELECT_LOCATION": "Select Location"
|
||||
},
|
||||
"OPERATION": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user