Skip to content

Commit

Permalink
Prevent translation of repo filter options (#4231)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianjoel authored Oct 10, 2024
1 parent 4b9454a commit 19e4d85
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ export abstract class BaseFilterListService<V extends BaseViewModel> implements
isActive: (<OsFilterOption>(
filter.options.find(f => (<OsFilterOption>f)?.condition === model.id)
))?.isActive,
skipTranslate: true,
children: model.children?.length
? model.children.map((child: any) => ({
label: child.getTitle(),
Expand Down
1 change: 1 addition & 0 deletions client/src/app/site/base/base-filter.service/os-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface OsFilterOption {
condition: OsFilterOptionCondition | null;
isActive?: boolean;
isChild?: boolean;
skipTranslate?: boolean;
children?: OsFilterOption[];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
[ngClass]="option.isChild ? 'filter-child' : ''"
(change)="service.toggleFilterOption(filter.property, option)"
>
{{ option.label | translate }}
@if (option.skipTranslate) {
{{ option.label }}
} @else {
{{ option.label | translate }}
}
</mat-checkbox>
}
@if (!isFilter(option)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
>
<os-icon-container class="active-filter" icon="close">
<span class="active-filter">
{{ filter.option.label | translate }}
@if (filter.option.skipTranslate) {
{{ filter.option.label }}
} @else {
{{ filter.option.label | translate }}
}
</span>
</os-icon-container>
</button>
Expand Down

0 comments on commit 19e4d85

Please sign in to comment.