Skip to content

Commit

Permalink
Update translate
Browse files Browse the repository at this point in the history
  • Loading branch information
tutn-axonivy committed Aug 28, 2024
1 parent 981074a commit ab98be1
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h2 class="product-analysis mb-0">
<i [class]="productDetail().type | productTypeIcon"></i>
</h2>
<h4 class="analysis-title text-primary text-capitalize mb-0">
{{ productDetail().type }}
{{ productDetail().type | productType | translate }}
</h4>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { RoutingQueryParamService } from '../../../shared/services/routing.query
import { CommonDropdownComponent } from '../../../shared/components/common-dropdown/common-dropdown.component';
import { CommonUtils } from '../../../shared/utils/common.utils';
import { ItemDropdown } from '../../../shared/models/item-dropdown.model';
import { ProductTypePipe } from '../../../shared/pipes/product-type.pipe';

export interface DetailTab {
activeClass: string;
Expand All @@ -58,6 +59,7 @@ const DEFAULT_ACTIVE_TAB = 'description';
ProductDetailMavenContentComponent,
NgbNavModule,
MultilingualismPipe,
ProductTypePipe,
ProductDetailFeedbackComponent,
ProductInstallationCountActionComponent,
ProductTypeIconPipe,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
'border-light text-light': themeService.isDarkMode(),
'border-dark text-dark': !themeService.isDarkMode(),
'bg-light text-dark':
selectedTypeLabel === type.value && themeService.isDarkMode(),
selectedTypeLabel === type.label && themeService.isDarkMode(),
'bg-primary border-0 text-light':
selectedTypeLabel === type.value && !themeService.isDarkMode()
selectedTypeLabel === type.label && !themeService.isDarkMode()
}">
<p [lang]="languageService.selectedLanguage()">
{{ type.label | translate }}
Expand Down
11 changes: 11 additions & 0 deletions marketplace-ui/src/app/shared/pipes/product-type.pipe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
standalone: true,
name: 'productType'
})
export class ProductTypePipe implements PipeTransform {
transform(type: string, _args?: []): string {
return `common.filter.value.${type}`;
}
}
6 changes: 3 additions & 3 deletions marketplace-ui/src/assets/i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ common:
label: Filter
value:
allTypes: Alle
connector: Konnektoren
util: Utilities
connector: Konnektor
util: Nützliches
demos: Demos
solution: Lösungen
sort:
Expand Down Expand Up @@ -102,4 +102,4 @@ common:
noFeedbackMessage1: Es gibt noch keine Rückmeldungen für diesen Anschluss.
noFeedbackMessage2: Seien Sie der Erste, der seine Meinung mitteilt.
rateFeedbackBtnLabel: Diesen Stecker bewerten
reviewLabelNoYet: Noch keine Bewertungen
reviewLabelNoYet: Noch keine Bewertungen

0 comments on commit ab98be1

Please sign in to comment.