tooltip and i18n fixes (#3147)

* tooltip fixes

* i18n for info drawer strings
This commit is contained in:
Denys Vuika
2018-04-06 12:47:19 +01:00
committed by GitHub
parent 24b3972d84
commit 38f2973863
7 changed files with 31 additions and 6 deletions

View File

@@ -1,4 +1,12 @@
{
"APP": {
"INFO_DRAWER": {
"TITLE": "Details",
"COMMENTS": "Comments",
"PROPERTIES": "Properties",
"VERSIONS": "Versions"
}
},
"title": "Welcome",
"VERSION": {
"NO_PERMISSION": "You don't have permission to manage versions of this content",

View File

@@ -1,16 +1,16 @@
<ng-container *ngIf="nodeId">
<ng-template let-node="node" #sidebarTemplate>
<adf-info-drawer title="Details">
<adf-info-drawer-tab label="Comments">
<adf-info-drawer [title]="'APP.INFO_DRAWER.TITLE' | translate">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.COMMENTS' | translate">
<adf-comments [nodeId]="nodeId"></adf-comments>
</adf-info-drawer-tab>
<adf-info-drawer-tab label="Properties">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.PROPERTIES' | translate">
<adf-content-metadata-card [node]="node"></adf-content-metadata-card>
</adf-info-drawer-tab>
<adf-info-drawer-tab label="Versions">
<adf-info-drawer-tab [label]="'APP.INFO_DRAWER.VERSIONS' | translate">
<mat-card>
<mat-card-content>
<adf-version-manager [node]="node" (uploadError)="uploadError($event)">

View File

@@ -11,7 +11,11 @@
</mat-card-content>
<mat-card-footer class="adf-content-metadata-card-footer" fxLayout="row" fxLayoutAlign="space-between stretch">
<div>
<button *ngIf="!readOnly" mat-icon-button (click)="toggleEdit()" data-automation-id="mata-data-card-toggle-edit">
<button *ngIf="!readOnly"
mat-icon-button
(click)="toggleEdit()"
[attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate"
data-automation-id="mata-data-card-toggle-edit">
<mat-icon>mode_edit</mat-icon>
</button>
</div>

View File

@@ -2,6 +2,7 @@
<div class="adf-property-label">{{ property.label | translate }}</div>
<div class="adf-property-value">
<mat-checkbox
[attr.title]="'CORE.METADATA.ACTIONS.TOGGLE' | translate"
[checked]="property.displayValue"
[disabled]="!isEditable()"
(change)="changed($event)">

View File

@@ -14,6 +14,7 @@
<span *ngIf="showProperty(); else elseEmptyValueBlock">{{ property.displayValue }}</span>
</span>
<mat-datetimepicker-toggle
[attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate"
[attr.data-automation-id]="'datepickertoggle-' + property.key"
[for]="datetimePicker">
</mat-datetimepicker-toggle>

View File

@@ -15,7 +15,10 @@
<span [attr.data-automation-id]="'card-textitem-value-' + property.key">
<span *ngIf="showProperty(); else elseEmptyValueBlock">{{ property.displayValue }}</span>
</span>
<mat-icon fxFlex="0 0 auto" [attr.data-automation-id]="'card-textitem-edit-icon-' + property.key" class="adf-textitem-icon">create</mat-icon>
<mat-icon fxFlex="0 0 auto"
[attr.data-automation-id]="'card-textitem-edit-icon-' + property.key"
[attr.title]="'CORE.METADATA.ACTIONS.EDIT' | translate"
class="adf-textitem-icon">create</mat-icon>
</div>
<div *ngIf="inEdit" class="adf-textitem-editable">
<div class="adf-textitem-editable-controls">
@@ -39,10 +42,12 @@
<mat-icon
class="adf-textitem-icon adf-update-icon"
(click)="update()"
[attr.title]="'CORE.METADATA.ACTIONS.SAVE' | translate"
[attr.data-automation-id]="'card-textitem-update-' + property.key">done</mat-icon>
<mat-icon
class="adf-textitem-icon adf-reset-icon"
(click)="reset()"
[attr.title]="'CORE.METADATA.ACTIONS.CANCEL' | translate"
[attr.data-automation-id]="'card-textitem-reset-' + property.key">clear</mat-icon>
</div>
<mat-error class="adf-textitem-editable-error" *ngIf="hasErrors()">

View File

@@ -140,6 +140,12 @@
"CREATED_DATE": "Created Date",
"MODIFIER": "Modifier",
"MODIFIED_DATE": "Modified Date"
},
"ACTIONS": {
"EDIT": "Edit",
"SAVE": "Save",
"CANCEL": "Cancel",
"TOGGLE": "Toggle value"
}
}
},