Skip to content

Commit

Permalink
fix(spatialFilter): missing traduction fix / CSS title update (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeLafreniere18 authored and mbarbeau committed Jan 21, 2020
1 parent 2321d67 commit 04e1beb
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
35 changes: 25 additions & 10 deletions packages/geo/src/lib/filter/shared/spatial-filter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,23 +91,38 @@ export class SpatialFilterService {
name = substr.substring(index + 1, substr.length);
substr = substr.substring(0, index);
}
item.name = this.languageService.translate.instant(
'igo.geo.terrapi.' + name
);
try {
item.name = this.languageService.translate.instant(
'igo.geo.terrapi.' + name
);
} catch (e) {
item.name = name.substring(0,1).toUpperCase() + name.substring(1, name.length - 1);
}

try {
item.group = this.languageService.translate.instant(
'igo.geo.spatialFilter.group.' + substr
);
} catch (e) {
item.group = substr.substring(0,1).toUpperCase() + substr.substring(1, name.length - 1);
}

item.group = this.languageService.translate.instant(
'igo.geo.spatialFilter.group.' + substr
);
items.push(item);
} else {
if (this.getKeyByValue(this.urlFilterList, type)) {
const item: SpatialFilterThematic = {
name: this.languageService.translate.instant(
'igo.geo.terrapi.' +
this.getKeyByValue(this.urlFilterList, type)
),
name: undefined,
source: type
};
const name = this.getKeyByValue(this.urlFilterList, type);
try {
item.name = this.languageService.translate.instant(
'igo.geo.terrapi.' + name);
} catch (e) {
item.name = name.substring(0,1).toUpperCase() + name.substring(1, name.length - 1);
}
item.source = type

items.push(item);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
</form>
</div>

<mat-label class="title">{{'igo.geo.spatialFilter.search' | translate}} : </mat-label>
<mat-label class="title mat-typography">{{'igo.geo.spatialFilter.search' | translate}} : </mat-label>
<mat-radio-group [value]="selectedItemType">
<mat-radio-button *ngFor="let item of itemType"
[value]="item"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
margin-left: 5px;
}

.title {
font-size: initial;
}

.mat-radio-group {
display: flex;
flex-direction: column;
Expand Down

0 comments on commit 04e1beb

Please sign in to comment.