Skip to content

Commit

Permalink
feat: added i18n tags for history list
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed May 14, 2019
1 parent 530d0cd commit b9e8427
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
12 changes: 12 additions & 0 deletions backend/src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,18 @@ label.email=Email
label.role=Role
label.delete=Delete?

label.metadata-resolver-history=Metadata resolver history
label.metadata-version-history=Metadata Version History
label.select-version=Select Version
label.version=Version
label.save-date=Save Date
label.changed-by=Changed By
label.actions=Actions
label.check-to-select=Check to select
label.current=Current
label.restore=Restore
label.compare-selected=Compare Selected

message.delete-user-title=Delete User?
message.delete-user-body=You are requesting to delete a user. If you complete this process the user will be removed. This cannot be undone. Do you wish to continue?

Expand Down
22 changes: 12 additions & 10 deletions ui/src/app/metadata/version/component/history-list.component.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<table class="table">
<caption class="sr-only">Metadata Version History</caption>
<caption class="sr-only" translate="label.name-and-entityid">Metadata Version History</caption>
<thead>
<tr>
<th scope="col"><span class="sr-only">Select Version</span></th>
<th scope="col">Version</th>
<th scope="col">Save Date</th>
<th scope="col">Changed By</th>
<th scope="col">Actions</th>
<th scope="col">
<span class="sr-only" translate="label.select-version">Select Version</span>
</th>
<th scope="col" translate="label.version">Version</th>
<th scope="col" translate="label.save-date">Save Date</th>
<th scope="col" translate="label.changed-by">Changed By</th>
<th scope="col" translate="label.actions">Actions</th>
</tr>
</thead>
<tbody>
Expand All @@ -15,23 +17,23 @@
<div class="custom-control custom-checkbox" (click)="toggleVersionSelected(version)">
<input [title]="'check-' + i" type="checkbox" class="custom-control-input" [checked]="selected.indexOf(version) > -1">
<label class="custom-control-label" [for]="'check-' + i">
<span class="sr-only">Check to select</span>
<span class="sr-only" translate="label.check-to-select">Check to select</span>
</label>
</div>
</td>
<td *ngIf="i === 0">Current (v{{ version.versionNumber }})</td>
<td *ngIf="i === 0"><translate-i18n key="label.current">Current</translate-i18n> (v{{ version.versionNumber }})</td>
<td *ngIf="i > 0">v{{ version.versionNumber }}</td>
<td>{{ version.saveDate | date }}</td>
<td>{{ version.changedBy }}</td>
<td>
<button class="btn btn-link" (click)="restoreVersion(version)">
<i class="fa fa-undo"></i>
Restore
<translate-i18n key="label.restore">Restore</translate-i18n>
</button>
</td>
</tr>
</tbody>
</table>
<button class="btn btn-primary" (click)="compareSelected(selected)" [disabled]="!selected.length">
Compare Selected <span *ngIf="selected.length">({{ selected.length }})</span>
<translate-i18n key="label.compare-selected">Compare Selected</translate-i18n> <span *ngIf="selected.length">({{ selected.length }})</span>
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="col-md-12">
<span class="display-6">
<i class="fa fa-fw fa-gears"></i>
Metadata resolver history
<translate-i18n key="label.metadata-resolver-history">Metadata resolver history</translate-i18n>
</span>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion ui/src/app/metadata/version/version.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { HistoryListComponent } from './component/history-list.component';
import { CommonModule } from '@angular/common';
import { VersionHistoryComponent } from './container/version-history.component';
import { HistoryService } from './service/history.service';
import { I18nModule } from '../../i18n/i18n.module';

@NgModule({
declarations: [
Expand All @@ -13,7 +14,8 @@ import { HistoryService } from './service/history.service';
],
entryComponents: [],
imports: [
CommonModule
CommonModule,
I18nModule
],
exports: [],
providers: []
Expand Down

0 comments on commit b9e8427

Please sign in to comment.