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 { Observable } from 'rxjs/Observable';
|
||||||
import { ShareDataRow } from '../document-list/data/share-data-row.model';
|
import { ShareDataRow } from '../document-list/data/share-data-row.model';
|
||||||
import { MinimalNodeEntryEntity, SitePaging } from 'alfresco-js-api';
|
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 { DocumentListService } from '../document-list/services/document-list.service';
|
||||||
import { ContentNodeSelectorComponent } from './content-node-selector.component';
|
import { ContentNodeSelectorComponent } from './content-node-selector.component';
|
||||||
import { ContentNodeSelectorComponentData } from './content-node-selector.component-data.interface';
|
import { ContentNodeSelectorComponentData } from './content-node-selector.component-data.interface';
|
||||||
@ -33,7 +33,8 @@ export class ContentNodeDialogService {
|
|||||||
constructor(private dialog: MatDialog,
|
constructor(private dialog: MatDialog,
|
||||||
private contentService: ContentService,
|
private contentService: ContentService,
|
||||||
private documentListService: DocumentListService,
|
private documentListService: DocumentListService,
|
||||||
private siteService: SitesService) { }
|
private siteService: SitesService,
|
||||||
|
private translation: TranslationService) { }
|
||||||
|
|
||||||
openFileBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]> {
|
openFileBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]> {
|
||||||
return Observable.fromPromise(this.documentListService.getFolderNode(folderNodeId))
|
return Observable.fromPromise(this.documentListService.getFolderNode(folderNodeId))
|
||||||
@ -69,8 +70,10 @@ export class ContentNodeDialogService {
|
|||||||
complete: this.close.bind(this)
|
complete: this.close.bind(this)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const title = this.getTitleTranslation(action, contentEntry.name);
|
||||||
|
|
||||||
const data: ContentNodeSelectorComponentData = {
|
const data: ContentNodeSelectorComponentData = {
|
||||||
title: `${action} '${contentEntry.name}' to ...`,
|
title: title,
|
||||||
actionName: action,
|
actionName: action,
|
||||||
currentFolderId: contentEntry.parentId,
|
currentFolderId: contentEntry.parentId,
|
||||||
imageResolver: this.imageResolver.bind(this),
|
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[]> {
|
openUploadFolderDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]> {
|
||||||
const select = new Subject<MinimalNodeEntryEntity[]>();
|
const select = new Subject<MinimalNodeEntryEntity[]>();
|
||||||
select.subscribe({
|
select.subscribe({
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
id="searchInput"
|
id="searchInput"
|
||||||
[formControl]="searchInput"
|
[formControl]="searchInput"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Search"
|
placeholder="{{'NODE_SELECTOR.SEARCH' | translate}}"
|
||||||
[value]="searchTerm"
|
[value]="searchTerm"
|
||||||
data-automation-id="content-node-selector-search-input">
|
data-automation-id="content-node-selector-search-input">
|
||||||
|
|
||||||
|
@ -40,8 +40,11 @@
|
|||||||
"CANCEL": "Cancel",
|
"CANCEL": "Cancel",
|
||||||
"CHOOSE": "Choose",
|
"CHOOSE": "Choose",
|
||||||
"COPY": "Copy",
|
"COPY": "Copy",
|
||||||
|
"COPY_ITEM": "Copy '{{ name }}' to ...",
|
||||||
"MOVE": "Move",
|
"MOVE": "Move",
|
||||||
|
"MOVE_ITEM": "Move '{{ name }}' to ...",
|
||||||
"NO_RESULTS": "No results found",
|
"NO_RESULTS": "No results found",
|
||||||
|
"SEARCH": "Search",
|
||||||
"SELECT_LOCATION": "Select Location"
|
"SELECT_LOCATION": "Select Location"
|
||||||
},
|
},
|
||||||
"OPERATION": {
|
"OPERATION": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user