Skip to content

Commit

Permalink
Merge pull request #31 from tillias/dev
Browse files Browse the repository at this point in the history
Localization for search box & direction selectors #29
  • Loading branch information
tillias authored Oct 9, 2020
2 parents 0567024 + 3f0dca2 commit 036d353
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
</div>
<div class="row justify-content-start">
<div class="col-4">
<div class="form-check">
<div class="form-check" >
<label class="form-check-label">
<input type="checkbox" [(ngModel)]="onlyIncomingFilter" (ngModelChange)="onFilterChange()">
Show incoming dependencies
<span jhiTranslate="microcatalogApp.dashboard.dependency.filter.incoming"></span>
</label>
</div>
<div class="form-check">
<label class="form-check-label">
<input type="checkbox" [(ngModel)]="onlyOutgoingFilter" (ngModelChange)="onFilterChange()">
Show outgoing dependencies
<span jhiTranslate="microcatalogApp.dashboard.dependency.filter.outgoing"></span>
</label>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="mb-4">
<jhi-microservice-search (itemSelected)="onItemSelected($event)">
<jhi-microservice-search (itemSelected)="onMicroserviceSelected($event)">
</jhi-microservice-search>
</div>
<div class="card-columns">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class MicroserviceDashboardComponent implements OnInit, OnDestroy {
this.eventSubscriber = this.eventManager.subscribe('microserviceListModification', () => this.loadAll());
}

onItemSelected(value?: IMicroservice): any {
onMicroserviceSelected(value?: IMicroservice): any {
if (value) {
this.microservices = this.microservices?.filter(i => i.id === value.id);
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<input class="form-control" type="text" placeholder="Search" aria-label="Search"
[(ngModel)]="model"
(ngModelChange)="onModelChanged()"
[ngbTypeahead]="search"
[resultFormatter]="formatter"
[inputFormatter]="inputFormatter"
(selectItem)="onItemSelected($event.item)"
(keyup.escape)="clear()"
/>
<div class="d-flex flex-row">
<input class="form-control" type="text"
placeholder="{{'microcatalogApp.microservice.search.placeholder' | translate}}" aria-label="Search"
[(ngModel)]="model"
(ngModelChange)="onModelChanged()"
[ngbTypeahead]="search"
[resultFormatter]="formatter"
[inputFormatter]="inputFormatter"
(selectItem)="onItemSelected($event.item)"
(keyup.escape)="clear()"
/>
</div>
12 changes: 12 additions & 0 deletions src/main/webapp/i18n/de/dependency-dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"microcatalogApp": {
"dashboard": {
"dependency": {
"filter": {
"incoming": "Eingehende Abhängigkeiten anzeigen",
"outgoing": "Ausgehende Abhängigkeiten anzeigen"
}
}
}
}
}
3 changes: 3 additions & 0 deletions src/main/webapp/i18n/de/microservice.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"createOrEditLabel": "Microservice erstellen oder bearbeiten",
"notFound": "No Microservices found"
},
"search": {
"placeholder": "Bitte geben Sie einen Suchbegriff ein"
},
"created": "Microservice erstellt mit ID {{ param }}",
"updated": "Microservice aktualisiert mit ID {{ param }}",
"deleted": "Microservice gelöscht mit ID {{ param }}",
Expand Down
12 changes: 12 additions & 0 deletions src/main/webapp/i18n/en/dependency-dashboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"microcatalogApp": {
"dashboard": {
"dependency": {
"filter": {
"incoming": "Show incoming dependencies",
"outgoing": "Show outgoing dependencies"
}
}
}
}
}
3 changes: 3 additions & 0 deletions src/main/webapp/i18n/en/microservice.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"createOrEditLabel": "Create or edit a Microservice",
"notFound": "No Microservices found"
},
"search": {
"placeholder": "Please type your search text here"
},
"created": "A new Microservice is created with identifier {{ param }}",
"updated": "A Microservice is updated with identifier {{ param }}",
"deleted": "A Microservice is deleted with identifier {{ param }}",
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>microcatalog</title>
<title>(microcatalog) Microservice Catalog </title>
<meta name="description" content="Description for microcatalog">
<meta name="google" content="notranslate">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
Expand Down

0 comments on commit 036d353

Please sign in to comment.