Wrong grammar with single file uploaded (#1468)

#1449 Wrong grammar with single file upload
This commit is contained in:
Maurizio Vitale 2017-01-16 11:50:23 +00:00 committed by Eugenio Romano
parent f5d2269c2e
commit aba4c8ef3e
4 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
<div class="file-dialog" [ngClass]="{show: isDialogActive}">
<div class="header">
<div class="title">
<span id="total-upload-completed">{{totalCompleted}}</span> {{'FILE_UPLOAD.MESSAGES.COMPLETED' | translate}}
<span id="total-upload-completed">{{totalCompleted}}</span> {{ totalCompletedMsg | translate}}
</div>
<div class="buttons">
<div class="minimize-button" [ngClass]="{active: _isDialogMinimized}" (keyup.enter)="toggleDialogMinimize()" (click)="toggleDialogMinimize()" tabindex="0">

View File

@ -46,6 +46,8 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
totalCompleted: number = 0;
totalCompletedMsg: string = 'FILE_UPLOAD.MESSAGES.SINGLE_COMPLETED';
private _isDialogMinimized: boolean = false;
private listSubscription: any;
@ -72,6 +74,9 @@ export class FileUploadingDialogComponent implements OnInit, OnDestroy {
if (this.uploadService.totalCompleted$) {
this.counterSubscription = this.uploadService.totalCompleted$.subscribe((total: number) => {
this.totalCompleted = total;
if (this.totalCompleted > 1) {
this.totalCompletedMsg = 'FILE_UPLOAD.MESSAGES.COMPLETED';
}
this.cd.detectChanges();
});
}

View File

@ -6,6 +6,7 @@
"CANCEL": "CANCEL"
},
"MESSAGES": {
"SINGLE_COMPLETED": "upload complete",
"COMPLETED": "uploads complete",
"PROGRESS": "Upload in progress...",
"FOLDER_ALREADY_EXIST": "The folder {0} already exist",

View File

@ -6,6 +6,7 @@
"CANCEL": "CANCELLA"
},
"MESSAGES": {
"SINGLE_COMPLETED": "caricamento completato",
"COMPLETED": "caricamenti completati",
"PROGRESS": "caricamento in corso...",
"FOLDER_ALREADY_EXIST": "Cartella {0} già presente",