Skip to content

Commit

Permalink
Improve pagination labels
Browse files Browse the repository at this point in the history
  • Loading branch information
anicyne committed Feb 2, 2024
1 parent 4368d80 commit 9ba518f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
14 changes: 11 additions & 3 deletions packages/components/src/components/pagination/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,21 +298,29 @@ export class KolPagination implements PaginationAPI {
exportparts="icon"
key={`${this.nonce}-${page}`}
_customClass={this.state._customClass}
_label={`${page}`}
_label=""
_on={{
onClick: (event: Event) => {
this.onClick(event, page);
},
}}
></kol-button-wc>
>
<span slot="expert">
<span class="visually-hidden">{translate('kol-page')}</span> {page}
</span>
</kol-button-wc>
</li>
);
}

private getSelectedPageButton(page: number): JSX.Element {
return (
<li>
<kol-button-wc class="selected" key={`${this.nonce}-selected`} _customClass={this.state._customClass} _disabled={true} _label={`${page}`} />
<kol-button-wc class="selected" key={`${this.nonce}-selected`} _customClass={this.state._customClass} _disabled={true} _label="">
<span slot="expert">
<span class="visually-hidden">{translate('kol-page')}</span> {page}
</span>
</kol-button-wc>
</li>
);
}
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default {
'page-next': 'Eine Seite weiter',
'page-last': 'Direkt zur letzten Seite',
'entries-per-site': 'Einträge pro Seite',
page: 'Seite',
'page-current': 'Seite {{page}}',
'page-selected': 'Seite {{page}} ist ausgewählt',
'page-per-site': '{{entries}} Einträge pro Seite',
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default {
'page-next': 'One page further',
'page-last': 'Directly to the last page',
'entries-per-site': 'Entries per page',
page: 'Page',
'page-current': 'Page {{page}}',
'page-selected': 'Page {{page}} is selected',
'page-per-site': '{{entries}} entries per page',
Expand Down

0 comments on commit 9ba518f

Please sign in to comment.