Skip to content

Commit

Permalink
fix: data-view-controls translations (#563)
Browse files Browse the repository at this point in the history
* fix: data-view-controls sort translations

* fix: replaced translations with data-view-controls translations
  • Loading branch information
markuczy authored Oct 28, 2024
1 parent f5f3ff6 commit fc25ec2
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 13 deletions.
17 changes: 17 additions & 0 deletions libs/portal-integration-angular/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,23 @@
"TABLE": "Tabelle"
}
},
"OCX_DATA_VIEW_CONTROLS" : {
"NO_GROUP_SELECTED": "Keine Gruppe ausgewählt",
"OPEN_BUTTON_DETAIL": "Dialog zur Auswahl einer benutzerdefinierten Gruppe öffnen",
"DROPDOWN": {
"ARIA_LABEL": "Sortieren nach"
},
"TOGGLE_BUTTON": {
"ASCENDING_TOOLTIP": "Aufsteigend",
"DESCENDING_TOOLTIP": "Absteigend"
},
"LAYOUT": {
"LIST": "Liste",
"GRID": "Raster",
"TABLE": "Tabelle"
},
"DIALOG_TITLE": "Spalten für benutzerdefinierte Gruppe auswählen"
},
"OCX_INTERACTIVE_DATA_VIEW": {
"DEFAULT_GROUP": "Standardgruppe",
"CUSTOM_GROUP": "Benutzerdefinierte Gruppe",
Expand Down
17 changes: 17 additions & 0 deletions libs/portal-integration-angular/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,23 @@
"TABLE": "Table"
}
},
"OCX_DATA_VIEW_CONTROLS" : {
"NO_GROUP_SELECTED": "No group selected",
"OPEN_BUTTON_DETAIL": "Open custom group selection dialog",
"DROPDOWN": {
"ARIA_LABEL": "Sort by"
},
"TOGGLE_BUTTON": {
"ASCENDING_TOOLTIP": "Ascending",
"DESCENDING_TOOLTIP": "Descending"
},
"LAYOUT": {
"LIST": "List",
"GRID": "Grid",
"TABLE": "Table"
},
"DIALOG_TITLE": "Custom group column selection"
},
"OCX_INTERACTIVE_DATA_VIEW": {
"DEFAULT_GROUP": "Default group",
"CUSTOM_GROUP": "Custom group",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
*ngIf="columnTemplates.length > 0 && toggleColumnActive"
(templateChanged)="handleTemplateChange($event)"
(templateReset)="handleTemplateReset()"
[placeholder]="translations?.templatePickerDropdownPlaceholder || dropdownPlaceholderText || ('OCX_INTERACTIVE_DATA_VIEW.NO_GROUP_SELECTED' | translate)"
[placeholder]="translations?.templatePickerDropdownPlaceholder || dropdownPlaceholderText || ('OCX_DATA_VIEW_CONTROLS.NO_GROUP_SELECTED' | translate)"
>
</ocx-data-view-template-picker>
<button
*ngIf="toggleColumnActive"
type="button"
(click)="toggleColumns()"
pButton
[pTooltip]="translations?.toggleColumnButtonTooltip || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)"
[pTooltip]="translations?.toggleColumnButtonTooltip || ('OCX_DATA_VIEW_CONTROLS.OPEN_BUTTON_DETAIL' | translate)"
tooltipPosition="top"
[attr.aria-label]="translations?.toggleColumnButtonTooltip || ('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.OPEN_BUTTON_DETAIL' | translate)"
[attr.aria-label]="translations?.toggleColumnButtonTooltip || ('OCX_DATA_VIEW_CONTROLS.OPEN_BUTTON_DETAIL' | translate)"
icon="pi pi-cog"
></button>
</div>
Expand Down Expand Up @@ -73,7 +73,7 @@
styleClass="data-view-control-border min-w-min w-7rem"
[options]="sortingOptions"
(onChange)="selectSorting($event)"
[ariaLabel]="('OCX_LIST_GRID_SORT.DROPDOWN.ARIA_LABEL' | translate)"
[ariaLabel]="('OCX_DATA_VIEW_CONTROLS.DROPDOWN.ARIA_LABEL' | translate)"
></p-dropdown>
<label for="data-view-control-sortby" class="white-space-nowrap"
>{{ translations?.sortDropdownTooltip || 'Sort by' }}</label
Expand All @@ -84,9 +84,9 @@
onIcon="pi pi-sort-amount-up"
offIcon="pi pi-sort-amount-down"
(onChange)="sortDirection($event)"
[pTooltip]="!selectedSortDirection ? (translations?.sortOrderTooltips?.ascending || ('OCX_LIST_GRID_SORT.TOGGLE_BUTTON.ASCENDING_TITLE' | translate)) : (translations?.sortOrderTooltips?.descending || ('OCX_LIST_GRID_SORT.TOGGLE_BUTTON.DESCENDING_TITLE' | translate))"
[pTooltip]="!selectedSortDirection ? (translations?.sortOrderTooltips?.ascending || ('OCX_DATA_VIEW_CONTROLS.TOGGLE_BUTTON.ASCENDING_TOOLTIP' | translate)) : (translations?.sortOrderTooltips?.descending || ('OCX_DATA_VIEW_CONTROLS.TOGGLE_BUTTON.DESCENDING_TOOLTIP' | translate))"
tooltipPosition="top"
[ariaLabel]="!selectedSortDirection ? (translations?.sortOrderTooltips?.ascending || ('OCX_LIST_GRID_SORT.TOGGLE_BUTTON.ASCENDING_TITLE' | translate)) : (translations?.sortOrderTooltips?.descending || ('OCX_LIST_GRID_SORT.TOGGLE_BUTTON.DESCENDING_TITLE' | translate))"
[ariaLabel]="!selectedSortDirection ? (translations?.sortOrderTooltips?.ascending || ('OCX_DATA_VIEW_CONTROLS.TOGGLE_BUTTON.ASCENDING_TOOLTIP' | translate)) : (translations?.sortOrderTooltips?.descending || ('OCX_DATA_VIEW_CONTROLS.TOGGLE_BUTTON.DESCENDING_TOOLTIP' | translate))"
></p-toggleButton>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ const ALL_VIEW_MODES: ViewMode[] = [
id: 'ocx-data-layout-selection-list',
icon: PrimeIcons.LIST,
mode: 'list',
tooltipKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.LIST',
labelKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.LIST',
tooltipKey: 'OCX_DATA_VIEW_CONTROLS.LAYOUT.LIST',
labelKey: 'OCX_DATA_VIEW_CONTROLS.LAYOUT.LIST',
},
{
id: 'ocx-data-layout-selection-grid',
icon: PrimeIcons.TH_LARGE,
mode: 'grid',
tooltipKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.GRID',
labelKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.GRID',
tooltipKey: 'OCX_DATA_VIEW_CONTROLS.LAYOUT.GRID',
labelKey: 'OCX_DATA_VIEW_CONTROLS.LAYOUT.GRID',
},
{
id: 'ocx-data-layout-selection-table',
icon: PrimeIcons.TABLE,
mode: 'table',
tooltipKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.TABLE',
labelKey: 'OCX_DATA_LAYOUT_SELECTION.LAYOUT.TABLE',
tooltipKey: 'OCX_DATA_VIEW_CONTROLS.LAYOUT.TABLE',
labelKey: 'OCX_DATA_VIEW_CONTROLS.LAYOUT.TABLE',
},
]

Expand Down Expand Up @@ -216,7 +216,7 @@ export class DataViewControlsComponent implements OnInit, OnChanges {
},
header:
this.translations?.columnDialogHeaderText ||
this.translate.instant('OCX_CUSTOM_GROUP_COLUMN_SELECTOR.DIALOG_TITLE'),
this.translate.instant('OCX_DATA_VIEW_CONTROLS.DIALOG_TITLE'),
width: '70%',
contentStyle: { 'max-height': '500px', overflow: 'auto', padding: 0 },
})
Expand Down

0 comments on commit fc25ec2

Please sign in to comment.