Skip to content

Commit

Permalink
Merge pull request #1323 from internetee/pagy-localize-and-style-fix
Browse files Browse the repository at this point in the history
localize and style pagy fix
  • Loading branch information
vohmar authored Oct 18, 2024
2 parents 3b82e36 + 213e79f commit 5abc2fc
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 31 deletions.
40 changes: 40 additions & 0 deletions app/assets/stylesheets/components/_pagy.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
.dataTables_filter {
.pagy.nav {
display: flex;
justify-content: center;
align-items: center;
gap: rem(8px);

a {
width: rem(32px);
height: rem(32px);
border-radius: rem(16px) !important;
border: 1px solid $grey-200-color !important;
display: flex !important;
justify-content: center;
align-items: center;
padding: 0 !important;
font-weight: 500;
font-size: rem(14px);
line-height: rem(24px);
text-decoration: none;
color: $black-color !important;

&[aria-current="page"] {
background-color: $primary-green-color !important;
border-color: $primary-green-color !important;
color: $white-color !important;
}

&[aria-disabled="true"] {
opacity: 0.5;
cursor: not-allowed;
}

&:hover:not([aria-disabled="true"]) {
background-color: $grey-200-color !important;
}
}
}
}

.pagy-nav .page.prev,
.pagy-nav .page.prev a,
.pagy-nav .page.next,
Expand Down
52 changes: 37 additions & 15 deletions config/locales/pagy.en.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,44 @@
en:
pagy:
# en:
# pagy:

# per_page: "Displaying items"

# item_name:
# one: "item"
# other: "items"

# nav:
# prev: 'Prev'
# next: 'Next'
# gap: "…"

# info:
# no_items: "No %{item_name} found"
# single_page: "Displaying <b>%{count}</b> %{item_name}"
# multiple_pages: "Displaying %{item_name} <b>%{from}-%{to}</b> of <b>%{count}</b> in total"

# combo_nav_js: "<label>Page %{page_input} of %{pages}</label>"

per_page: "Displaying items"
# items_selector_js: "<label>Show %{items_input} %{item_name} per page</label>"


en:
pagy:
aria_label:
nav:
one: "Page"
other: "Pages"
prev: "Previous"
next: "Next"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"
item_name:
one: "item"
other: "items"

nav:
prev: 'Prev'
next: 'Next'
gap: "&hellip;"

info:
no_items: "No %{item_name} found"
single_page: "Displaying <b>%{count}</b> %{item_name}"
multiple_pages: "Displaying %{item_name} <b>%{from}-%{to}</b> of <b>%{count}</b> in total"

combo_nav_js: "<label>Page %{page_input} of %{pages}</label>"

items_selector_js: "<label>Show %{items_input} %{item_name} per page</label>"
single_page: "Displaying %{count} %{item_name}"
multiple_pages: "Displaying %{item_name} %{from}-%{to} of %{count} in total"
combo_nav_js: "Page %{page_input} of %{pages}"
limit_selector_js: "Show %{limit_input} %{item_name} per page"
53 changes: 37 additions & 16 deletions config/locales/pagy.et.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,43 @@
et:
pagy:
# et:
# pagy:

per_page: "Tulemusi lehel"
# per_page: "Tulemusi lehel"

item_name:
one: "kirje"
other: "kirjet"
# item_name:
# one: "kirje"
# other: "kirjet"

nav:
prev: 'Eelmised'
next: 'Järgmised'
gap: "&hellip;"
# nav:
# prev: 'Eelmised'
# next: 'Järgmised'
# gap: "&hellip;"

info:
no_items: "%{item_name} ei leitud"
single_page: "Kuvan <b>%{count}</b> %{item_name}"
multiple_pages: "Kuvan %{item_name} <b>%{from}-%{to}</b> / <b>%{count}</b>-st"
# info:
# no_items: "%{item_name} ei leitud"
# single_page: "Kuvan <b>%{count}</b> %{item_name}"
# multiple_pages: "Kuvan %{item_name} <b>%{from}-%{to}</b> / <b>%{count}</b>-st"

# combo_nav_js: "<label>Lk %{page_input}/%{pages}</label>"

combo_nav_js: "<label>Lk %{page_input}/%{pages}</label>"
# items_selector_js: "<label>Kuva %{items_input} %{item_name} lehekülje kohta</label>"

items_selector_js: "<label>Kuva %{items_input} %{item_name} lehekülje kohta</label>"
et:
pagy:
aria_label:
nav:
one: "Page"
other: "Pages"
prev: "Previous"
next: "Next"
prev: "&lt;"
next: "&gt;"
gap: "&hellip;"
item_name:
one: "item"
other: "items"
info:
no_items: "No %{item_name} found"
single_page: "Displaying %{count} %{item_name}"
multiple_pages: "Displaying %{item_name} %{from}-%{to} of %{count} in total"
combo_nav_js: "Page %{page_input} of %{pages}"
limit_selector_js: "Show %{limit_input} %{item_name} per page"

0 comments on commit 5abc2fc

Please sign in to comment.