Skip to content

Commit

Permalink
The text for "Prev" and "Next" is now used for the aria-label a…
Browse files Browse the repository at this point in the history
…nd has been replaced in the UI as `<` and `>`.
  • Loading branch information
ddnexus committed Jan 26, 2024
1 parent dcfe261 commit 4e49895
Show file tree
Hide file tree
Showing 59 changed files with 1,349 additions and 1,208 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ None
- Removed `pagy_prev_link`: use `pagy_prev_html` without the `:text` argument (can customize `pagy.nav.prev`)
- Removed `pagy_next_link`: use `pagy_next_html` without the `:text` argument (can customize `pagy.nav.next`)
- Rack 3 breaking changes:
- The `headers` extra produces all lowercase headers, regardless how you set them [see rack issue](https://github.
com/rack/rack/issues/1592)
- The `headers` extra produces all lowercase headers, regardless how you set them [see rack issue](https://github.com/rack/rack/issues/1592)
- Removed `:escaped_html` option from `pagy_url_for` (only breaking if you override the method or use the option directly)

### Default changes possibly breaking test/views
### Default changes (possibly breaking test/views)

- Changed `Pagy::DEFAULT[:size]` variable defaults from `[1, 4, 4, 1]` to `7`. You can explicitly set it in the initializer,
if your app was relying on it.
Expand All @@ -52,4 +51,10 @@ None
- `Pagy::Calendar::Month::DEFAULT[:format]` from `'%Y-%m'` to `'%b'`
- `Pagy::Calendar::Quartr::DEFAULT[:format]` from `'%Y-Q%q'` to `'Q%q'`

### Visual changes (possibly breaking test/views)

- The ARIA label compliance required the refactoring of all the nav helper that might look slightly different now.
- The text for `"Prev"` and `"Next"` is now used for the `aria-label` and has been replaced in the UI as `<` and `>`. You can
edit the dictionary entries if you want to revert it to the previous default (`< Prev` and `Next >`)

[LEGACY CHANGELOG >>>](CHANGELOG_LEGACY.md)
6 changes: 3 additions & 3 deletions e2e/cypress/support/test-helper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const navIds = ["#nav", "#nav-js"];
const widths = [500, 750, 1000];
const widths = [500, 750, 1000];
const specialStylesRe = /^\/(materialize|semantic)/;

export const styles = [
Expand Down Expand Up @@ -56,13 +56,13 @@ function checkStyleId(style:string, id:string) {
export function goCheckNext(style:string, id:string) {
specialStylesRe.test(style)
? cy.get(`${id} a:last`).click()
: cy.get(id).contains("Next").click();
: cy.get(id).contains(">").click();
snapId(id);
}

export function goCheckPrev(style:string, id:string) {
specialStylesRe.test(style)
? cy.get(`${id} a:first`).click()
: cy.get(id).contains("Prev").click();
: cy.get(id).contains("<").click();
snapId(id);
}
994 changes: 497 additions & 497 deletions e2e/snapshots.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions lib/locales/ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ ar:
other: "عناصر"

nav:
prev: "&lsaquo;&nbsp;السابق"
next: "التالي&nbsp;&rsaquo;"
prev_label: "السابق"
next_label: "التالي"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
7 changes: 5 additions & 2 deletions lib/locales/be.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

be:
pagy:

page_label:
one: "Старонка"
few: "Старонкi"
Expand All @@ -15,8 +16,10 @@ be:
other: "запісаў"

nav:
prev: "&lsaquo;&nbsp;Назад"
next: "Наперад&nbsp;&rsaquo;"
prev_label: "Назад"
next_label: "Наперад"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ bg:
other: "резултати"

nav:
prev: "&lsaquo;&nbsp;Предишна"
next: "Следваща&nbsp;&rsaquo;"
prev_label: "Предишна"
next_label: "Следваща"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
7 changes: 5 additions & 2 deletions lib/locales/bs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

bs:
pagy:

page_label:
one: "Stranica"
few: "Stranice"
Expand All @@ -15,8 +16,10 @@ bs:
other: "stavki"

nav:
prev: "&lsaquo;&nbsp;Prethodna"
next: "Sljedeća &nbsp;&rsaquo;"
prev_label: "Prethodna"
next_label: "Sljedeća "
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ ca:
other: "elements"

nav:
prev: "&lsaquo;&nbsp;Anterior"
next: "Següent&nbsp;&rsaquo;"
prev_label: "Anterior"
next_label: "Següent"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ cs:
other: "položky"

nav:
prev: "&lsaquo;&nbsp;Předchozí"
next: "Další&nbsp;&rsaquo;"
prev_label: "Předchozí"
next_label: "Další"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/da.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ da:
other: "resultater"

nav:
prev: "&lsaquo;&nbsp;Forrige"
next: "Næste&nbsp;&rsaquo;"
prev_label: "Forrige"
next_label: "Næste"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
7 changes: 5 additions & 2 deletions lib/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

de:
pagy:

page_label:
one: "Seite"
other: "Seiten"
Expand All @@ -11,8 +12,10 @@ de:
other: "Einträge"

nav:
prev: "&lsaquo;&nbsp;Zurück"
next: "Weiter&nbsp;&rsaquo;"
prev_label: "Zurück"
next_label: "Weiter"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ en:
other: "items"

nav:
prev: "&lsaquo;&nbsp;Prev"
next: "Next&nbsp;&rsaquo;"
prev_label: "Prev"
next_label: "Next"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ es:
other: "ítems"

nav:
prev: "&lsaquo;&nbsp;Anterior"
next: "Siguiente&nbsp;&rsaquo;"
prev_label: "Anterior"
next_label: "Siguiente"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ fr:
other: "éléments"

nav:
prev: "&lsaquo;&nbsp;Précédent"
next: "Suivant&nbsp;&rsaquo;"
prev_label: "Précédent"
next_label: "Suivant"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
7 changes: 5 additions & 2 deletions lib/locales/hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

hr:
pagy:

page_label:
one: "Stranica"
few: "Stranice"
Expand All @@ -15,8 +16,10 @@ hr:
other: "stavki"

nav:
prev: "&lsaquo;&nbsp;Prethodna"
next: "Sljedeća &nbsp;&rsaquo;"
prev_label: "Prethodna"
next_label: "Sljedeća "
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ id:
item_name: "item"

nav:
prev: "&lsaquo;&nbsp;Sebelumnya"
next: "Selanjutnya&nbsp;&rsaquo;"
prev_label: "Sebelumnya"
next_label: "Selanjutnya"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ it:
other: "elementi"

nav:
prev: "&lsaquo;&nbsp;Precedente"
next: "Seguente&nbsp;&rsaquo;"
prev_label: "Precedente"
next_label: "Seguente"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ ja:
item_name: "結果"

nav:
prev: "&lsaquo;&nbsp;前へ"
next: "次へ&nbsp;&rsaquo;"
prev_label: "前へ"
next_label: "次へ"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/km.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ km:
item_name: "ធាតុ"

nav:
prev: "&lsaquo;&nbsp;មុន"
next: "បន្ទាប់&nbsp;&rsaquo;"
prev_label: "មុន"
next_label: "បន្ទាប់"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ ko:
item_name: "항목"

nav:
prev: "&lsaquo;&nbsp;이전"
next: "다음&nbsp;&rsaquo;"
prev_label: "이전"
next_label: "다음"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/nb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ nb:
other: "resultater"

nav:
prev: "&lsaquo;&nbsp;Forrige"
next: "Neste&nbsp;&rsaquo;"
prev_label: "Forrige"
next_label: "Neste"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ nl:
other: "stuks"

nav:
prev: "&lsaquo;&nbsp;Vorige"
next: "Volgende&nbsp;&rsaquo;"
prev_label: "Vorige"
next_label: "Volgende"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/nn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ nn:
other: "resultat"

nav:
prev: "&lsaquo;&nbsp;Førre"
next: "Neste&nbsp;&rsaquo;"
prev_label: "Førre"
next_label: "Neste"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
7 changes: 5 additions & 2 deletions lib/locales/pl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

pl:
pagy:

page_label:
one: "Strona"
few: "Strony"
Expand All @@ -15,8 +16,10 @@ pl:
other: "elementów"

nav:
prev: "&lsaquo;&nbsp;Poprzednia"
next: "Następna&nbsp;&rsaquo;"
prev_label: "Poprzednia"
next_label: "Następna"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ pt-BR:
other: "itens"

nav:
prev: "&lsaquo;&nbsp;Anterior"
next: "Próximo&nbsp;&rsaquo;"
prev_label: "Anterior"
next_label: "Próximo"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
6 changes: 4 additions & 2 deletions lib/locales/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ pt:
other: "itens"

nav:
prev: "&lsaquo;&nbsp;Anterior"
next: "Próximo&nbsp;&rsaquo;"
prev_label: "Anterior"
next_label: "Próximo"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"

info:
Expand Down
Loading

0 comments on commit 4e49895

Please sign in to comment.