Skip to content

ROU-12414: Make the pagination page-button labels translatable - #538

Merged
rugoncalves merged 4 commits into
devfrom
ROU-12414
Nov 23, 2026
Merged

rugoncalves merged 4 commits into
devfrom
ROU-12414

Conversation

@rugoncalves

@rugoncalves rugoncalves commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

This PR is for making the Grid pagination page-button labels translatable (ROU-12414).

Context

The pagination counter words and the arrow-button labels are texts of the low-code Pagination blocks, so the platform translates them. The numbered page buttons are created by the library in JavaScript and had their aria-label hard-coded as "page N" / "go to page N", so they could not be translated. The decision and the rejected options are in ADR-0010.

What was happening

  • The page-button aria-label was always English, whatever the app locale.
  • Screen readers announced the decorative ... between page buttons.

What was done

  • New OutSystems.GridAPI.Pagination.SetPageButtonLabels(gridID, currentPageLabel, goToPageLabel). The labels are templates where {0} is the page number, so each language can place the number where it needs it ("Seite {0}", "{0} ページ"). It applies them when the Grid is ready, or once it is initialized.
  • IPagination.setPageButtonLabels / Pagination.setPageButtonLabels: empty labels, or labels without {0}, fall back to the English defaults. The page buttons are only re-created when the labels change, so the block can call it on every render.
  • The ellipsis spans get aria-hidden="true".
  • ADR-0010 and its index row.

Validation

  • npx tsc --noEmit, npm run lint and prettier clean.
  • E2E: outsystems-datagrid-tests PR on branch ROU-12414 (@locale and @pagination), to run once both modules are published with this build.

Test Steps

  1. Open PaginationTranslations and select de: page buttons are labelled "Seite 1" / "zur Seite 2".
  2. Select ja-JP: "1 ページ" / "2 ページへ移動".
  3. Go to page 2: the labels stay in the selected language.
  4. Inspect the ...: it has aria-hidden="true".

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

Add OutSystems.GridAPI.Pagination.SetPageButtonLabels so the ButtonList block can send translated
aria-label templates ("{0}" is the page number) on every render. The page buttons are only re-created
when the labels change. The ellipsis is hidden from screen readers. ADR-0010.
@rugoncalves rugoncalves added enhancement New feature or request minor labels Nov 20, 2026
@sonarqubecloud

Copy link
Copy Markdown

@rugoncalves
rugoncalves marked this pull request as ready for review November 20, 2026 11:57
@rugoncalves
rugoncalves requested a review from a team as a code owner November 20, 2026 11:57
Copilot AI balanced review requested due to automatic review settings November 20, 2026 11:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@rugoncalves
rugoncalves merged commit b618096 into dev Nov 23, 2026
12 checks passed
@rugoncalves
rugoncalves deleted the ROU-12414 branch November 23, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants