Added i18n label

This commit is contained in:
Giuseppe Digilio
2018-12-27 16:09:15 +01:00
parent f592aba236
commit 5598af35ee
6 changed files with 43 additions and 39 deletions

View File

@@ -415,7 +415,12 @@
"general": {
"add-more": "Add more",
"no-sections": "No options available",
"sections_not_valid": "There are incomplete sections.",
"collection": "Collection",
"no-collection": "No collection found",
"search-collection": "Search for a collection",
"deposit_success_notice": "Submission deposited successfully.",
"deposit_error_notice": "There was an issue when submitting the item, please try again later.",
"discard_success_notice": "Submission discarded successfully.",
@@ -434,6 +439,8 @@
"submit.progressbar.detect-duplicate": "Potential duplicates",
"upload": {
"no-entry": "No",
"no-file-uploaded": "No file uploaded yet.",
"info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or <strong>upload additional files just dragging&dropping them everywhere in the page</strong>",
"drop-message": "Drop files to attach them to the item",
"upload-successful": "Upload successful",
@@ -448,30 +455,6 @@
"until-placeholder": "Until",
"group-label": "Group"
}
},
"detect-duplicate": {
"duplicate-detected": "Potential duplicate detected",
"duplicate": "It's a duplicate",
"not-duplicate": "It's not a duplicate",
"confirm-duplicate": "Confirm (It's a duplicate)",
"confirm-not-duplicate": "Confirm (It's not a duplicate)",
"duplicate-ctrl": "Mark the record to merge",
"duplicate-help": "Click here if this is a duplicate of your item",
"not-duplicate-help": "Click here if this is not a duplicate of your item",
"note-help": "Please enter your reason for the duplication into the box below.",
"note-placeholder": "Describe the reason of duplication",
"clear-decision": "Undo",
"clear-decision-help": "Click for clear the decision about this pontential duplicate",
"decision-success-notice": "Choice registered successfully",
"no-decision": "No decision yet",
"submitter-decision": "Submitter decision:",
"submitter-note": "Submitter note:",
"disclaimer": "The system has identified some potential duplicates. Please carefully review the list and flag each occurency with the appropriate choice or discard this submission.",
"disclaimer-ctrl": "The system has identified some potential duplicates. Please carefully review the list and the submitter comments and perform the appropriate action.",
"disclaimer-no-match": "All your feedback on potential duplicates have been registered correctly."
},
"recycle": {
"disclaimer": "The following existent information are not valid within the selected collection. Please copy them to the appropriate metadata if applicable. Use the discard button to remove these information when done."
}
}
},

View File

@@ -1,7 +1,9 @@
<div>
<div ngbDropdown #collectionControls="ngbDropdown" class="btn-group input-group" (openChange)="toggled($event)">
<div class="input-group-prepend">
<span id="collectionControlsMenuLabel" class="input-group-text">Collection</span>
<span id="collectionControlsMenuLabel" class="input-group-text">
{{ 'submission.sections.general.collection' | translate }}
</span>
</div>
<button aria-describedby="collectionControlsMenuLabel"
id="collectionControlsMenuButton"
@@ -10,25 +12,35 @@
(click)="onClose()"
[disabled]="disabled"
ngbDropdownToggle>
<span *ngIf="disabled"><i class='fa fa-circle-o-notch fa-spin'></i></span>
<span *ngIf="disabled"><i class='fas fa-circle-notch fa-spin'></i></span>
<span *ngIf="!disabled">{{ (selectedCollectionName) ? selectedCollectionName : '' }}</span>
</button>
<div ngbDropdownMenu class="dropdown-menu" id="collectionControlsDropdownMenu" aria-labelledby="collectionControlsMenuButton">
<div ngbDropdownMenu
class="dropdown-menu"
id="collectionControlsDropdownMenu"
aria-labelledby="collectionControlsMenuButton">
<div class="form-group w-100 pr-2 pl-2">
<input *ngIf="searchField"
type="search"
class="form-control w-100"
(click)="$event.stopPropagation();"
placeholder="Search for a collection"
placeholder="{{ 'submission.sections.general.search-collection' | translate }}"
[formControl]="searchField">
</div>
<div class="dropdown-divider"></div>
<div class="scrollable-menu" aria-labelledby="dropdownMenuButton" (scroll)="onScroll($event)">
<button class="dropdown-item disabled" *ngIf="(searchListCollection$ | async).length == 0">No results found</button>
<button class="dropdown-item collection-item" *ngFor="let listItem of (searchListCollection$ | async)" (click)="onSelect(listItem)" title="{{ listItem.collection.name }}">
<button class="dropdown-item disabled" *ngIf="(searchListCollection$ | async).length == 0">
{{'submission.sections.general.no-collection' | translate}}
</button>
<button *ngFor="let listItem of (searchListCollection$ | async)"
class="dropdown-item collection-item"
title="{{ listItem.collection.name }}"
(click)="onSelect(listItem)">
<ul class="list-unstyled mb-0">
<li class="list-item text-truncate text-secondary" *ngFor="let item of listItem.communities" >{{ item.name}} <i class="fa fa-level-down" aria-hidden="true"></i></li>
<li class="list-item text-truncate text-secondary" *ngFor="let item of listItem.communities" >
{{ item.name}} <i class="fa fa-level-down" aria-hidden="true"></i>
</li>
<li class="list-item text-truncate text-primary font-weight-bold">{{ listItem.collection.name}}</li>
</ul>
</button>

View File

@@ -26,7 +26,7 @@
<button *ngIf="(showDepositAndDiscard | async)"
type="button"
class="btn btn-primary"
[disabled]="submissionIsInvalid" (click)="deposit()">
[disabled]="(submissionIsInvalid | async)" (click)="deposit()">
<span>{{'submission.general.deposit' | translate}}</span>
</button>
</div>

View File

@@ -1,12 +1,21 @@
<div ngbDropdown #sectionAdd="ngbDropdown" placement="bottom-right" class="d-inline-block" [ngClass]="{'w-100': windowService.isXs()}">
<div ngbDropdown
#sectionAdd="ngbDropdown"
placement="bottom-right"
class="d-inline-block"
[ngClass]="{'w-100': windowService.isXs()}">
<button class="btn btn-outline-primary dropdown-toggle"
id="sectionControls"
[ngClass]="{'w-100': (windowService.isXs() | async)}"
ngbDropdownToggle>
{{ 'submission.sections.general.add-more' | translate }} <i class="fa fa-plus" aria-hidden="true"></i>
</button>
<div ngbDropdownMenu class="sections-dropdown-menu" aria-labelledby="sectionControls" [ngClass]="{'w-100': (windowService.isXs() | async)}">
<button class="dropdown-item disabled" *ngIf="(sectionList | async)?.length == 0">No options available</button>
<div ngbDropdownMenu
class="sections-dropdown-menu"
aria-labelledby="sectionControls"
[ngClass]="{'w-100': (windowService.isXs() | async)}">
<button class="dropdown-item disabled" *ngIf="(sectionList | async)?.length == 0">
{{ 'submission.sections.general.no-sections' | translate }}
</button>
<button class="dropdown-item" *ngFor="let listItem of (sectionList | async)" (click)="addSection(listItem.id)">
{{'submission.sections.'+listItem.header | translate }}
</button>

View File

@@ -11,10 +11,10 @@
</ng-container>
<ng-container *ngIf="entry.value === ''">
<h5 *ngIf="metadata.indexOf(entry) === 0">
<span class="text-muted">No {{entry.key}}</span>
<span class="text-muted">{{'submission.sections.upload.no-entry' | translate}} {{entry.key}}</span>
</h5>
<ng-container *ngIf="metadata.indexOf(entry) !== 0">
<span class="text-muted">No {{entry.key}}</span>
<span class="text-muted">{{'submission.sections.upload.no-entry' | translate}} {{entry.key}}</span>
</ng-container>
</ng-container>
</ng-container>

View File

@@ -5,7 +5,7 @@
<ng-container *ngIf="fileList.length == 0">
<div class="row">
<div class="col-md-12">
<h3 class="text-center"><span class="text-muted">No file uploaded yet.</span></h3>
<h3 class="text-center"><span class="text-muted">{{'submission.sections.upload.no-file-uploaded' | translate}}</span></h3>
</div>
</div>
</ng-container>