translation fixes
This commit is contained in:
parent
d6e8e609b5
commit
bf5e729891
|
@ -60,24 +60,15 @@
|
|||
<mat-tab-group color="#00000" mat-stretch-tabs="false" mat-align-tabs="start" class="my-mat-tab remove-border-bottom" [selectedIndex]="indexFromCurrentType" (selectedTabChange)="currentType = $event.tab.ariaLabel">
|
||||
<mat-tab aria-label="recent" label="{{'DASHBOARD.ALL' | translate}}">
|
||||
<app-recent-edited-activity [isActive]="currentType == 'recent'" [includeDmps]="true" [includeDescriptions]="true"></app-recent-edited-activity>
|
||||
<div *ngIf="totalRecents === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
|
||||
</mat-tab>
|
||||
<mat-tab aria-label="drafts" label="{{'DASHBOARD.DRAFTS' | translate}}">
|
||||
<app-recent-edited-activity [isActive]="currentType == 'drafts'" [includeDmps]="true" [includeDescriptions]="true" [onlyDrafts]="true" type="drafts" [selectedType]="currentType"></app-recent-edited-activity>
|
||||
<div *ngIf="totalDraftDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
|
||||
</mat-tab>>
|
||||
<mat-tab aria-label="dmps" label="{{'DASHBOARD.DMPS' | translate}}">
|
||||
<app-recent-edited-activity [isActive]="currentType == 'dmps'" [includeDmps]="true" type="dmps" [selectedType]="currentType"></app-recent-edited-activity>
|
||||
<div *ngIf="totalDmps === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
|
||||
</mat-tab>
|
||||
<mat-tab aria-label="descriptions" label="{{'DASHBOARD.DESCRIPTIONS' | translate}}">
|
||||
<app-recent-edited-activity [isActive]="currentType == 'descriptions'" [includeDescriptions]="true" type="descriptions" [selectedType]="currentType"></app-recent-edited-activity>
|
||||
<div *ngIf="totalDatasets === 0" class="empty-list">{{'DASHBOARD.EMPTY-LIST' | translate}}</div>
|
||||
<div *ngIf="totalDatasets === 0" class="col-auto d-flex justify-content-center">
|
||||
<button mat-raised-button class="add-description" (click)="addNewDescription()">
|
||||
<mat-icon>add</mat-icon> {{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<app-recent-edited-activity [isActive]="currentType == 'descriptions'" [includeDescriptions]="true" type="descriptions" [selectedType]="currentType" [hasDmps]="this.hasDmps()" (addNewDescription)="addNewDescription($event)"></app-recent-edited-activity>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
|
|
|
@ -136,7 +136,9 @@ export class DashboardComponent extends BaseComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
addNewDescription() {
|
||||
addNewDescription(addDescription: boolean): void {
|
||||
if (addDescription == false) return;
|
||||
|
||||
const formGroup = this.fb.group({
|
||||
dmpId: this.fb.control(null, Validators.required),
|
||||
})
|
||||
|
|
|
@ -32,11 +32,18 @@
|
|||
</div>
|
||||
<div *ngFor="let item of listingItems; let i = index">
|
||||
<app-dmp-listing-item-component *ngIf="item.dmp" [showDivider]="i != (listingItems.length - 1)" [dmp]="item.dmp" [isPublic]="false"></app-dmp-listing-item-component>
|
||||
<app-description-listing-item-component *ngIf="item.description" [showDivider]="i != (listingItems.length - 1)" [description]="item.description" [isPublic]="false" ></app-description-listing-item-component>
|
||||
<app-description-listing-item-component *ngIf="item?.description" [showDivider]="i != (listingItems.length - 1)" [description]="item?.description" [isPublic]="false" ></app-description-listing-item-component>
|
||||
</div>
|
||||
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && listingItems.length < pageSize">
|
||||
<div class="text-muted d-flex justify-content-center mt-5" *ngIf="listingItems && listingItems.length > 0 && this.lookup.page.offset >= currentPage*pageSize">
|
||||
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
|
||||
</div>
|
||||
|
||||
<div class="row justify-content-center mt-5" *ngIf="listingItems?.length == 0 && onlyDescriptions && hasDmps">
|
||||
<div class="col-auto p-0 add-description">
|
||||
<button mat-raised-button type="button" class="yellow-btn" (click)="addDescription()">{{'DASHBOARD.ACTIONS.ADD-DESCRIPTION' | translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="listingItems && listingItems.length > 0 && this.lookup.page.offset < currentPage*pageSize" class="d-flex justify-content-center">
|
||||
<button type="button" class="btn-load-more" (click)="loadMore()">{{'GENERAL.ACTIONS.LOAD-MORE' | translate}}</button>
|
||||
</div>
|
||||
|
|
|
@ -136,69 +136,23 @@ input[type="text"] {
|
|||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* th {
|
||||
text-transform: uppercase;
|
||||
|
||||
.add-description {
|
||||
margin-top: 2.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
.yellow-btn {
|
||||
min-width: 162px;
|
||||
height: 40px;
|
||||
cursor: pointer;
|
||||
display: table-row;
|
||||
background: var(--secondary-color) 0% 0% no-repeat padding-box;
|
||||
border-radius: 30px;
|
||||
opacity: 1;
|
||||
border: none;
|
||||
color: #000000;
|
||||
opacity: 1;
|
||||
line-height: 1;
|
||||
font-size: 0.87rem;
|
||||
padding: 0.62rem 1.87rem;
|
||||
}
|
||||
|
||||
.is-public {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
border: 1px solid var(--primary-color-3)3b;
|
||||
color: var(--primary-color-3);
|
||||
background-color: var(--primary-color-3)0f;
|
||||
border-radius: 10em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.template-name {
|
||||
padding-left: 0.5em;
|
||||
border: 1px solid rgb(218, 227, 243);
|
||||
color: rgb(43, 104, 209);
|
||||
background-color: rgb(236, 241, 249);
|
||||
border-radius: 10em;
|
||||
text-align: center;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.chip {
|
||||
padding: 0.1em 1em;
|
||||
margin-bottom: 1em;
|
||||
margin-left: 2.5em;
|
||||
margin-right: 2.5em;
|
||||
border-radius: 10em;
|
||||
background-color: #0d7489;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
max-width: 160px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.mat-icon-button :hover {
|
||||
color: rgb(120, 173, 220);
|
||||
}
|
||||
|
||||
.view-all {
|
||||
margin-left: auto;
|
||||
margin-bottom: 0px !important;
|
||||
color: #6aa4d9;
|
||||
}
|
||||
|
||||
.view-all:hover {
|
||||
color: rgb(46, 117, 182) !important;
|
||||
} */
|
|
@ -1,5 +1,5 @@
|
|||
import { Location } from '@angular/common';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Component, Input, OnInit, Output } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormControl } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { DescriptionStatus } from '@app/core/common/enum/description-status';
|
||||
|
@ -24,13 +24,14 @@ import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
|||
import { BaseComponent } from '@common/base/base.component';
|
||||
import { Lookup } from '@common/model/lookup';
|
||||
import { HttpErrorHandlingService } from '@common/modules/errors/error-handling/http-error-handling.service';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { debounceTime, map, takeUntil } from 'rxjs/operators';
|
||||
import { nameof } from 'ts-simple-nameof';
|
||||
|
||||
@Component({
|
||||
selector: 'app-recent-edited-activity',
|
||||
templateUrl: './recent-edited-activity.component.html',
|
||||
styleUrls: ['./recent-edited-activity.component.css']
|
||||
styleUrls: ['./recent-edited-activity.component.scss']
|
||||
})
|
||||
export class RecentEditedActivityComponent extends BaseComponent implements OnInit {
|
||||
|
||||
|
@ -45,6 +46,9 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
|||
@Input() includeDescriptions: boolean = false;
|
||||
@Input() includeDmps: boolean = false;
|
||||
@Input() onlyDrafts: boolean = false;
|
||||
@Input() hasDmps: boolean = false;
|
||||
|
||||
@Output() addNewDescription: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
|
||||
get onlyDmps(): boolean {
|
||||
return this.includeDmps && !this.includeDescriptions;
|
||||
|
@ -180,6 +184,10 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn
|
|||
this.loadItems(PaginationAction.LoadLess);
|
||||
}
|
||||
|
||||
addDescription(): void {
|
||||
this.addNewDescription.next(true);
|
||||
}
|
||||
|
||||
private loadItems(action: PaginationAction){
|
||||
if (action == PaginationAction.LoadLess) {
|
||||
let latestBatchCount = this.listingItems.length%this.pageSize == 0 ? this.pageSize : this.listingItems.length%this.pageSize;
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
<div class="row h-100">
|
||||
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
<button *ngIf="formGroup.get('id').value" [disabled]="isDirty()" [matTooltipDisabled]="!isDirty()" mat-raised-button class="description-export-btn" type="button" [matMenuTriggerFor]="exportMenu" (click)="$event.stopPropagation();" [matTooltip]="'DESCRIPTION-EDITOR.ACTIONS.DISABLED-EXPORT' | translate">
|
||||
{{ 'DESCRIPTION-EDITOR.ACTIONS.EXPORT' | translate }}
|
||||
<button *ngIf="formGroup.get('id').value" [disabled]="isDirty()" [matTooltipDisabled]="!isDirty()" mat-raised-button class="description-export-btn" type="button" [matMenuTriggerFor]="exportMenu" (click)="$event.stopPropagation();" [matTooltip]="'DESCRIPTION-EDITOR.ACTIONS.EXPORT.CAN-NOT-EXPORT' | translate">
|
||||
{{ 'DESCRIPTION-EDITOR.ACTIONS.EXPORT.EXPORT' | translate }}
|
||||
<mat-icon [disabled]="isDirty()" style="width: 14px;">expand_more</mat-icon>
|
||||
</button>
|
||||
<mat-menu #exportMenu="matMenu" xPosition="before">
|
||||
|
|
|
@ -241,7 +241,7 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn
|
|||
|
||||
let messages: string[] = [];
|
||||
if (this.filesToUpload.length == 0) {
|
||||
messages.push(this.language.instant('DATASET-WIZARD.MESSAGES.NO-FILES-SELECTED'));
|
||||
messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.NO-FILES-SELECTED')); // fix
|
||||
return;
|
||||
} else {
|
||||
let fileToUpload = this.filesToUpload[0];
|
||||
|
@ -253,9 +253,9 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn
|
|||
this.upload();
|
||||
} else {
|
||||
this.filesToUpload = null;
|
||||
messages.push(this.language.instant('DATASET-WIZARD.MESSAGES.LARGE-FILE-OR-UNACCEPTED-TYPE'));
|
||||
messages.push(this.language.instant('DATASET-WIZARD.MESSAGES.MAX-FILE-SIZE', { 'maxfilesize': data.maxFileSizeInMB }));
|
||||
messages.push(this.language.instant('DATASET-WIZARD.MESSAGES.ACCEPTED-FILE-TRANSFOMER') + data.types.map(type => type.value).join(", "));
|
||||
messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.LARGE-FILE-OR-UNACCEPTED-TYPE')); // fix
|
||||
messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.FIELD-UPLOAD-MAX-FILE-SIZE', { 'maxfilesize': data.maxFileSizeInMB })); // fix FIELD-UPLOAD-MAX-FILE-SIZE
|
||||
messages.push(this.language.instant('DESCRIPTION-TEMPLATE-EDITOR.STEPS.FORM.FIELD.FIELDS.ACCEPTED-FILE-TRANSFOMER') + data.types.map(type => type.value).join(", ")); // fix
|
||||
}
|
||||
|
||||
if (messages && messages.length > 0) {
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
<div class="ml-auto d-flex flex-row">
|
||||
|
||||
<div *ngIf="formGroup.get('id').value" class="col-auto d-flex align-items-center">
|
||||
<button [disabled]="isDirty()" [matTooltipDisabled]="!isDirty()" mat-raised-button class="dmp-export-btn" type="button" [matMenuTriggerFor]="exportMenu" (click)="$event.stopPropagation();" [matTooltip]="'DMP-EDITOR.ACTIONS.DISABLED-EXPORT' | translate">
|
||||
{{ 'DMP-EDITOR.ACTIONS.EXPORT' | translate }}
|
||||
<button [disabled]="isDirty()" [matTooltipDisabled]="!isDirty()" mat-raised-button class="dmp-export-btn" type="button" [matMenuTriggerFor]="exportMenu" (click)="$event.stopPropagation();" [matTooltip]="'DMP-EDITOR.ACTIONS.EXPORT.CAN-NOT-EXPORT' | translate">
|
||||
{{ 'DMP-EDITOR.ACTIONS.EXPORT.EXPORT' | translate }}
|
||||
<mat-icon [disabled]="isDirty()" style="width: 14px;">expand_more</mat-icon>
|
||||
</button>
|
||||
<mat-menu #exportMenu="matMenu" xPosition="before">
|
||||
|
|
|
@ -368,7 +368,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
|||
}
|
||||
|
||||
onUpdateCallbackError(error) {
|
||||
this.uiNotificationService.snackBarNotification(error.error.error ? error.error.error : this.language.instant('GENERAL.SNACK-BAR.UNSUCCESSFUL'), SnackBarNotificationLevel.Error);
|
||||
this.httpErrorHandlingService.handleBackedRequestError(error);
|
||||
}
|
||||
|
||||
isUserDmpRelated(): boolean {
|
||||
|
|
|
@ -501,6 +501,7 @@
|
|||
"DEFAULT-VALUE": "Default Value",
|
||||
"FIELD-UPLOAD-TITLE": "Upload",
|
||||
"FIELD-UPLOAD-PLACEHOLDER": "Upload Placeholder Text",
|
||||
"LARGE-FILE-OR-UNACCEPTED-TYPE": "Max File Size (up to {{maxfilesize}} Megabytes)",
|
||||
"FIELD-UPLOAD-MAX-FILE-SIZE": "Max File Size (up to {{maxfilesize}} Megabytes)",
|
||||
"FIELD-UPLOAD-CUSTOM-FILETYPE": "Other file types",
|
||||
"FIELD-UPLOAD-SELECT-FILETYPE": "Select file types",
|
||||
|
@ -919,7 +920,10 @@
|
|||
},
|
||||
"ACTIONS": {
|
||||
"BACK-TO": "Back to",
|
||||
"EXPORT": {
|
||||
"EXPORT": "Export",
|
||||
"CAN-NOT-EXPORT": "Export"
|
||||
},
|
||||
"SAVE": "Save",
|
||||
"CANCEL": "Cancel",
|
||||
"SAVE-AND-CONTINUE": "Save & Continue",
|
||||
|
@ -1577,6 +1581,10 @@
|
|||
"FINALIZE": "Finalize",
|
||||
"CAN-NOT-FINALIZE": "Save your changes first"
|
||||
},
|
||||
"EXPORT": {
|
||||
"EXPORT": "Export",
|
||||
"CAN-NOT-EXPORT": "Save your changes first"
|
||||
},
|
||||
"SAVE": "Save",
|
||||
"DELETE": "Delete",
|
||||
"ADD-DESCRIPTION-IN-SECTION": "Add Description",
|
||||
|
@ -1587,7 +1595,6 @@
|
|||
"REMOVE-CONTACT": "Remove Contact",
|
||||
"SEARCH-CONTACT": "Search Contact",
|
||||
"REMOVE-USER": "Remove User",
|
||||
"EXPORT": "Export",
|
||||
"SAVE-AND-CLOSE": "Save & Close",
|
||||
"SAVE-AND-CONTINUE": "Save & Continue",
|
||||
"REVERSE": "Undo Finalization",
|
||||
|
|
Loading…
Reference in New Issue