pagy 7.0.11 → 8.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/apps/calendar.ru +2196 -0
  3. data/apps/demo.ru +452 -0
  4. data/apps/rails.ru +205 -0
  5. data/apps/repro.ru +168 -0
  6. data/bin/pagy +83 -0
  7. data/{lib/config → config}/pagy.rb +6 -17
  8. data/javascripts/pagy-dev.js +114 -0
  9. data/{lib/javascripts → javascripts}/pagy-module.js +12 -10
  10. data/javascripts/pagy.js +1 -0
  11. data/lib/optimist.rb +1022 -0
  12. data/lib/pagy/calendar.rb +1 -1
  13. data/lib/pagy/console.rb +2 -2
  14. data/lib/pagy/countless.rb +1 -1
  15. data/lib/pagy/extras/bootstrap.rb +52 -63
  16. data/lib/pagy/extras/bulma.rb +49 -64
  17. data/lib/pagy/extras/calendar.rb +2 -2
  18. data/lib/pagy/extras/countless.rb +1 -1
  19. data/lib/pagy/extras/foundation.rb +49 -61
  20. data/lib/pagy/extras/headers.rb +1 -1
  21. data/lib/pagy/extras/items.rb +21 -18
  22. data/lib/pagy/extras/{frontend_helpers.rb → js_tools.rb} +4 -1
  23. data/lib/pagy/extras/jsonapi.rb +1 -1
  24. data/lib/pagy/extras/materialize.rb +53 -51
  25. data/lib/pagy/extras/metadata.rb +1 -1
  26. data/lib/pagy/extras/pagy.rb +82 -0
  27. data/lib/pagy/extras/semantic.rb +47 -50
  28. data/lib/pagy/extras/trim.rb +12 -12
  29. data/lib/pagy/extras/uikit.rb +48 -49
  30. data/lib/pagy/frontend.rb +33 -50
  31. data/lib/pagy/url_helpers.rb +1 -2
  32. data/lib/pagy.rb +15 -14
  33. data/{lib/locales → locales}/ar.yml +2 -2
  34. data/{lib/locales → locales}/be.yml +4 -4
  35. data/{lib/locales → locales}/bg.yml +4 -4
  36. data/{lib/locales → locales}/bs.yml +4 -4
  37. data/{lib/locales → locales}/ca.yml +4 -4
  38. data/locales/ckb.yml +18 -0
  39. data/{lib/locales → locales}/cs.yml +4 -4
  40. data/{lib/locales → locales}/da.yml +4 -4
  41. data/{lib/locales → locales}/de.yml +4 -4
  42. data/{lib/locales → locales}/en.yml +4 -4
  43. data/{lib/locales → locales}/es.yml +2 -2
  44. data/{lib/locales → locales}/fr.yml +4 -4
  45. data/{lib/locales → locales}/hr.yml +4 -4
  46. data/{lib/locales → locales}/id.yml +4 -4
  47. data/{lib/locales → locales}/it.yml +4 -4
  48. data/{lib/locales → locales}/ja.yml +4 -4
  49. data/{lib/locales → locales}/km.yml +4 -4
  50. data/{lib/locales → locales}/ko.yml +4 -4
  51. data/{lib/locales → locales}/nb.yml +4 -4
  52. data/{lib/locales → locales}/nl.yml +4 -4
  53. data/{lib/locales → locales}/nn.yml +4 -4
  54. data/{lib/locales → locales}/pl.yml +4 -4
  55. data/{lib/locales → locales}/pt-BR.yml +2 -2
  56. data/{lib/locales → locales}/pt.yml +2 -2
  57. data/locales/ru.yml +25 -0
  58. data/{lib/locales → locales}/sr.yml +4 -4
  59. data/{lib/locales → locales}/sv-SE.yml +4 -4
  60. data/{lib/locales → locales}/sv.yml +4 -4
  61. data/{lib/locales → locales}/sw.yml +4 -4
  62. data/{lib/locales → locales}/ta.yml +4 -4
  63. data/{lib/locales → locales}/tr.yml +4 -4
  64. data/{lib/locales → locales}/uk.yml +4 -4
  65. data/{lib/locales → locales}/vi.yml +4 -4
  66. data/{lib/locales → locales}/zh-CN.yml +4 -4
  67. data/{lib/locales → locales}/zh-HK.yml +4 -4
  68. data/{lib/locales → locales}/zh-TW.yml +4 -4
  69. data/pkg/pagy-8.0.1.gem +0 -0
  70. data/{lib/stylesheets → stylesheets}/pagy.css +19 -34
  71. data/{lib/stylesheets → stylesheets}/pagy.scss +17 -19
  72. data/stylesheets/pagy.tailwind.css +21 -0
  73. metadata +65 -51
  74. data/lib/javascripts/pagy-dev.js +0 -112
  75. data/lib/javascripts/pagy.js +0 -1
  76. data/lib/locales/ckb.yml +0 -18
  77. data/lib/locales/ru.yml +0 -27
  78. data/lib/pagy/extras/navs.rb +0 -51
  79. data/lib/pagy/extras/support.rb +0 -40
  80. data/lib/stylesheets/pagy.tailwind.scss +0 -24
  81. /data/{lib/javascripts → javascripts}/pagy-module.d.ts +0 -0
data/lib/pagy/frontend.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  # See Pagy::Frontend API documentation: https://ddnexus.github.io/pagy/docs/api/frontend
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'pagy/url_helpers'
5
- require 'pagy/i18n'
4
+ require_relative 'url_helpers'
5
+ require_relative 'i18n'
6
6
 
7
7
  class Pagy
8
8
  # Used for search and replace, hardcoded also in the pagy.js file
@@ -15,60 +15,53 @@ class Pagy
15
15
  include UrlHelpers
16
16
 
17
17
  # Generic pagination: it returns the html with the series of links to the pages
18
- def pagy_nav(pagy, pagy_id: nil, link_extra: '',
19
- nav_aria_label: nil, nav_i18n_key: nil, **vars)
20
- p_id = %( id="#{pagy_id}") if pagy_id
21
- link = pagy_link_proc(pagy, link_extra:)
18
+ def pagy_nav(pagy, id: nil, aria_label: nil, **vars)
19
+ id = %( id="#{id}") if id
20
+ a = pagy_anchor(pagy)
22
21
 
23
- html = +%(<nav#{p_id} class="pagy pagy-nav pagination" #{nav_aria_label_attr(pagy, nav_aria_label, nav_i18n_key)}>)
24
- html << prev_html(pagy, link)
22
+ html = %(<nav#{id} class="pagy nav" #{nav_aria_label(pagy, aria_label:)}>#{
23
+ prev_a(pagy, a)})
25
24
  pagy.series(**vars).each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
26
25
  html << case item
27
26
  when Integer
28
- %(<span class="page">#{link.call(item)}</span>)
27
+ a.(item)
29
28
  when String
30
- %(<span class="page active">) +
31
- %(<a role="link" aria-disabled="true" aria-current="page">#{pagy.label_for(item)}</a></span>)
29
+ %(<a role="link" aria-disabled="true" aria-current="page" class="current">#{pagy.label_for(item)}</a>)
32
30
  when :gap
33
- %(<span class="page gap">#{pagy_t('pagy.gap')}</span>)
31
+ %(<a role="link" aria-disabled="true" class="gap">#{pagy_t('pagy.gap')}</a>)
34
32
  else
35
33
  raise InternalError, "expected item types in series to be Integer, String or :gap; got #{item.inspect}"
36
34
  end
37
35
  end
38
- html << %(#{next_html(pagy, link)}</nav>)
36
+ html << %(#{next_a(pagy, a)}</nav>)
39
37
  end
40
38
 
41
39
  # Return examples: "Displaying items 41-60 of 324 in total" or "Displaying Products 41-60 of 324 in total"
42
- def pagy_info(pagy, pagy_id: nil, item_name: nil, item_i18n_key: nil)
43
- p_id = %( id="#{pagy_id}") if pagy_id
40
+ def pagy_info(pagy, id: nil, item_name: nil)
41
+ id = %( id="#{id}") if id
44
42
  p_count = pagy.count
45
43
  key = if p_count.zero? then 'pagy.info.no_items'
46
44
  elsif pagy.pages == 1 then 'pagy.info.single_page'
47
45
  else 'pagy.info.multiple_pages' # rubocop:disable Lint/ElseLayout
48
46
  end
49
47
 
50
- %(<span#{p_id} class="pagy-info">#{
51
- pagy_t key, item_name: item_name || pagy_t(item_i18n_key || pagy.vars[:item_i18n_key], count: p_count),
48
+ %(<span#{id} class="pagy info">#{
49
+ pagy_t key, item_name: item_name || pagy_t('pagy.item_name', count: p_count),
52
50
  count: p_count, from: pagy.from, to: pagy.to
53
51
  }</span>)
54
52
  end
55
53
 
56
- # Return a performance optimized lambda to generate the HTML links
54
+ # Return a performance optimized lambda to generate the HtML anchor element (a tag)
57
55
  # Benchmarked on a 20 link nav: it is ~22x faster and uses ~18x less memory than rails' link_to
58
- def pagy_link_proc(pagy, link_extra: '')
59
- p_prev = pagy.prev
60
- p_next = pagy.next
61
- p_page = pagy.page.to_s
62
- left, right = %(<a href="#{pagy_url_for(pagy, PAGE_TOKEN)}" #{
63
- pagy.vars[:link_extra]} #{link_extra}).split(PAGE_TOKEN, 2)
56
+ def pagy_anchor(pagy)
57
+ a_string = pagy.vars[:anchor_string]
58
+ a_string = %( #{a_string}) if a_string
59
+ left, right = %(<a#{a_string} href="#{pagy_url_for(pagy, PAGE_TOKEN)}").split(PAGE_TOKEN, 2)
64
60
  # lambda used by all the helpers
65
- lambda do |page, text = pagy.label_for(page), extra_attrs = ''|
66
- %(#{left}#{page}#{right}#{ case page
67
- when p_prev then ' rel="prev"'
68
- when p_next then ' rel="next"'
69
- when p_page then ' aria-disabled="true" aria-current="page"'
70
- else ''
71
- end } #{extra_attrs}>#{text}</a>)
61
+ lambda do |page, text = pagy.label_for(page), classes: nil, aria_label: nil|
62
+ classes = %( class="#{classes}") if classes
63
+ aria_label = %( aria-label="#{aria_label}") if aria_label
64
+ %(#{left}#{page}#{right}#{classes}#{aria_label}>#{text}</a>)
72
65
  end
73
66
  end
74
67
 
@@ -80,34 +73,24 @@ class Pagy
80
73
 
81
74
  private
82
75
 
83
- def nav_aria_label_attr(pagy, nav_aria_label, nav_i18n_key, count: pagy.pages)
84
- nav_aria_label ||= pagy_t(nav_i18n_key || pagy.vars[:nav_i18n_key], count:)
85
- %(aria-label="#{nav_aria_label}")
76
+ def nav_aria_label(pagy, aria_label: nil)
77
+ aria_label ||= pagy_t('pagy.aria_label.nav', count: pagy.pages)
78
+ %(aria-label="#{aria_label}")
86
79
  end
87
80
 
88
- def prev_aria_label_attr
89
- %(aria-label="#{pagy_t('pagy.aria_label.prev')}")
90
- end
91
-
92
- def next_aria_label_attr
93
- %(aria-label="#{pagy_t('pagy.aria_label.next')}")
94
- end
95
-
96
- def prev_html(pagy, link, text: pagy_t('pagy.prev'))
81
+ def prev_a(pagy, a, text: pagy_t('pagy.prev'), aria_label: pagy_t('pagy.aria_label.prev'))
97
82
  if (p_prev = pagy.prev)
98
- %(<span class="page prev">#{link.call(p_prev, text, prev_aria_label_attr)}</span>)
83
+ a.(p_prev, text, aria_label:)
99
84
  else
100
- %(<span class="page prev disabled"><a role="link" aria-disabled="true" #{
101
- prev_aria_label_attr}>#{text}</a></span>)
85
+ %(<a role="link" aria-disabled="true" aria-label="#{aria_label}">#{text}</a>)
102
86
  end
103
87
  end
104
88
 
105
- def next_html(pagy, link, text: pagy_t('pagy.next'))
89
+ def next_a(pagy, a, text: pagy_t('pagy.next'), aria_label: pagy_t('pagy.aria_label.next'))
106
90
  if (p_next = pagy.next)
107
- %(<span class="page next">#{link.call(p_next, text, next_aria_label_attr)}</span>)
91
+ a.(p_next, text, aria_label:)
108
92
  else
109
- %(<span class="page next disabled"><a role="link" aria-disabled="true" #{
110
- next_aria_label_attr}>#{text}</a></span>)
93
+ %(<a role="link" aria-disabled="true" aria-label=#{aria_label}>#{text}</a>)
111
94
  end
112
95
  end
113
96
  end
@@ -8,13 +8,12 @@ class Pagy
8
8
  # For non-rack environments you can use the standalone extra
9
9
  def pagy_url_for(pagy, page, absolute: false, **_)
10
10
  vars = pagy.vars
11
- request_path = vars[:request_path].to_s.empty? ? request.path : vars[:request_path]
12
11
  pagy_params = pagy.params.is_a?(Hash) ? pagy.params.transform_keys(&:to_s) : {}
13
12
  params = request.GET.merge(pagy_params)
14
13
  pagy_set_query_params(page, vars, params)
15
14
  params = pagy.params.call(params) if pagy.params.is_a?(Proc)
16
15
  query_string = "?#{Rack::Utils.build_nested_query(params)}"
17
- "#{request.base_url if absolute}#{request_path}#{query_string}#{vars[:fragment]}"
16
+ "#{request.base_url if absolute}#{vars[:request_path] || request.path}#{query_string}#{vars[:fragment]}"
18
17
  end
19
18
 
20
19
  # Add the page and items params
data/lib/pagy.rb CHANGED
@@ -5,27 +5,28 @@ require 'pathname'
5
5
 
6
6
  # Core class
7
7
  class Pagy
8
- VERSION = '7.0.11'
8
+ VERSION = '8.0.2'
9
9
 
10
- # Root pathname to get the path of Pagy files like templates or dictionaries
10
+ # Gem root pathname to get the path of Pagy files stylesheets, javascripts, apps, locales, etc.
11
11
  def self.root
12
- @root ||= Pathname.new(__dir__).freeze
12
+ @root ||= Pathname.new(__dir__).parent.freeze
13
13
  end
14
14
 
15
- # Default core vars: constant for easy access, but mutable for customizable defaults
15
+ # Core defult: constant for easy access, but mutable for customizable defaults
16
16
  DEFAULT = { page: 1, # rubocop:disable Style/MutableConstant
17
17
  items: 20,
18
18
  outset: 0,
19
19
  size: 7,
20
- page_param: :page,
20
+ cycle: false,
21
+ # backend/collection
22
+ count_args: [:all], # AR friendly
23
+ # backend/url
21
24
  params: {},
25
+ page_param: :page,
22
26
  fragment: '',
23
- link_extra: '',
24
- item_i18n_key: 'pagy.item_name',
25
- nav_i18n_key: 'pagy.aria_label.nav',
26
- cycle: false,
27
- request_path: '',
28
- count_args: [:all] } # AR friendly
27
+ request_path: nil,
28
+ # frontend/helpers
29
+ anchor_string: nil }
29
30
 
30
31
  attr_reader :count, :page, :items, :vars, :pages, :last, :offset, :in, :from, :to, :prev, :next, :params, :request_path
31
32
 
@@ -146,6 +147,6 @@ class Pagy
146
147
  end
147
148
  end
148
149
 
149
- require 'pagy/backend'
150
- require 'pagy/frontend'
151
- require 'pagy/exceptions'
150
+ require_relative 'pagy/backend'
151
+ require_relative 'pagy/frontend'
152
+ require_relative 'pagy/exceptions'
@@ -24,7 +24,7 @@ ar:
24
24
  other: "عناصر"
25
25
  info:
26
26
  no_items: "لا يوجد %{item_name}"
27
- single_page: "عرض <b>%{count}</b> %{item_name}"
28
- multiple_pages: "عرض %{item_name} <b>%{from}-%{to}</b> من اجمالي <b>%{count}</b>"
27
+ single_page: "عرض %{count} %{item_name}"
28
+ multiple_pages: "عرض %{item_name} %{from}-%{to} من اجمالي %{count}"
29
29
  combo_nav_js: "الصفحة %{page_input} من %{pages}"
30
30
  items_selector_js: "عرض %{items_input} %{item_name} لكل صفحة"
@@ -19,7 +19,7 @@ be:
19
19
  other: "запісаў"
20
20
  info:
21
21
  no_items: "Пакуль %{item_name} няма"
22
- single_page: "<b>%{count}</b> %{item_name}"
23
- multiple_pages: "Усяго <b>%{count}</b> %{item_name}, паказаны з <b>%{from}</b> па <b>%{to}</b>"
24
- combo_nav_js: "<label>Старонка %{page_input} з %{pages}</label>"
25
- items_selector_js: "<label>Паказаць %{items_input} %{item_name} на старонцы</label>"
22
+ single_page: "%{count} %{item_name}"
23
+ multiple_pages: "Усяго %{count} %{item_name}, паказаны з %{from} па %{to}"
24
+ combo_nav_js: "Старонка %{page_input} з %{pages}"
25
+ items_selector_js: "Паказаць %{items_input} %{item_name} на старонцы"
@@ -15,7 +15,7 @@ bg:
15
15
  other: "резултати"
16
16
  info:
17
17
  no_items: "Няма намерени %{item_name}"
18
- single_page: "Показани са <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Показани са %{item_name} <b>%{from}-%{to}</b> от <b>%{count}</b> общо"
20
- combo_nav_js: "<label>Страница %{page_input} от %{pages}</label>"
21
- items_selector_js: "<label>Покажи %{items_input} %{item_name} на страница</label>"
18
+ single_page: "Показани са %{count} %{item_name}"
19
+ multiple_pages: "Показани са %{item_name} %{from}-%{to} от %{count} общо"
20
+ combo_nav_js: "Страница %{page_input} от %{pages}"
21
+ items_selector_js: "Покажи %{items_input} %{item_name} на страница"
@@ -19,7 +19,7 @@ bs:
19
19
  other: "stavki"
20
20
  info:
21
21
  no_items: "Nije pronađena %{item_name}"
22
- single_page: "Prikazuje se <b>%{count}</b> %{item_name}"
23
- multiple_pages: "Prikaz %{item_name} <b>%{from}-%{to}</b> od <b>%{count}</b> ukupno"
24
- combo_nav_js: "<label>Stranica %{page_input} od %{pages}</label>"
25
- items_selector_js: "<label>Prikaži %{items_input} %{item_name} po stranici</label>"
22
+ single_page: "Prikazuje se %{count} %{item_name}"
23
+ multiple_pages: "Prikaz %{item_name} %{from}-%{to} od %{count} ukupno"
24
+ combo_nav_js: "Stranica %{page_input} od %{pages}"
25
+ items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
@@ -17,7 +17,7 @@ ca:
17
17
  other: "elements"
18
18
  info:
19
19
  no_items: "No s'ha trobat cap resultat"
20
- single_page: "Mostrant <b>%{count}</b> %{item_name}"
21
- multiple_pages: "Mostrant %{item_name} <b>%{from}-%{to}</b> de <b>%{count}</b> en total"
22
- combo_nav_js: "<label>Pàgina %{page_input} de %{pages}</label>"
23
- items_selector_js: "<label>Mostra %{items_input} %{item_name} per pàgina</label>"
20
+ single_page: "Mostrant %{count} %{item_name}"
21
+ multiple_pages: "Mostrant %{item_name} %{from}-%{to} de %{count} en total"
22
+ combo_nav_js: "Pàgina %{page_input} de %{pages}"
23
+ items_selector_js: "Mostra %{items_input} %{item_name} per pàgina"
data/locales/ckb.yml ADDED
@@ -0,0 +1,18 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
2
+
3
+ ckb:
4
+ pagy:
5
+ item_name: "بابەت"
6
+ aria_label:
7
+ nav: "پەڕەکان"
8
+ prev: "پاش"
9
+ next: "پێش"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ info:
14
+ no_items: "هیچ %{item_name}ێک نەدۆزرایەوە"
15
+ single_page: "پیشاندانی %{count} %{item_name}"
16
+ multiple_pages: "پشاندانی %{item_name}ی %{from}-%{to} لە کۆی %{count} بە گشتی"
17
+ combo_nav_js: "پەڕی %{page_input} لە %{pages}"
18
+ items_selector_js: "نیشاندانی %{items_input} %{item_name} لە هەر پەڕێک"
@@ -17,7 +17,7 @@ cs:
17
17
  other: "položek"
18
18
  info:
19
19
  no_items: "Nic nebylo nalezeno"
20
- single_page: "Zobrazeno <b>%{count}</b> %{item_name}"
21
- multiple_pages: "Zobrazeny položky <b>%{from}-%{to}</b> z <b>%{count}</b> celkem"
22
- combo_nav_js: "<label>Strana %{page_input} z %{pages}</label>"
23
- items_selector_js: "<label>Zobrazit %{items_input} %{item_name} na stránce</label>"
20
+ single_page: "Zobrazeno %{count} %{item_name}"
21
+ multiple_pages: "Zobrazeny položky %{from}-%{to} z %{count} celkem"
22
+ combo_nav_js: "Strana %{page_input} z %{pages}"
23
+ items_selector_js: "Zobrazit %{items_input} %{item_name} na stránce"
@@ -17,7 +17,7 @@ da:
17
17
  other: "resultater"
18
18
  info:
19
19
  no_items: "Ingen %{item_name} fundet"
20
- single_page: "Viser <b>%{count}</b> %{item_name}"
21
- multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> af <b>%{count}</b> totalt"
22
- combo_nav_js: "<label>Side %{page_input} af %{pages}</label>"
23
- items_selector_js: "<label>Antal %{items_input} %{item_name} per side</label>"
20
+ single_page: "Viser %{count} %{item_name}"
21
+ multiple_pages: "Viser %{item_name} %{from}-%{to} af %{count} totalt"
22
+ combo_nav_js: "Side %{page_input} af %{pages}"
23
+ items_selector_js: "Antal %{items_input} %{item_name} per side"
@@ -15,7 +15,7 @@ de:
15
15
  other: "Einträge"
16
16
  info:
17
17
  no_items: "Keine %{item_name} gefunden"
18
- single_page: "Zeige <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Zeige %{item_name} <b>%{from}-%{to}</b> von <b>%{count}</b> gesamt"
20
- combo_nav_js: "<label>Seite %{page_input} von %{pages}</label>"
21
- items_selector_js: "<label>Zeige %{items_input} %{item_name} pro Seite</label>"
18
+ single_page: "Zeige %{count} %{item_name}"
19
+ multiple_pages: "Zeige %{item_name} %{from}-%{to} von %{count} gesamt"
20
+ combo_nav_js: "Seite %{page_input} von %{pages}"
21
+ items_selector_js: "Zeige %{items_input} %{item_name} pro Seite"
@@ -15,7 +15,7 @@ en:
15
15
  other: "items"
16
16
  info:
17
17
  no_items: "No %{item_name} found"
18
- single_page: "Displaying <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Displaying %{item_name} <b>%{from}-%{to}</b> of <b>%{count}</b> in total"
20
- combo_nav_js: "<label>Page %{page_input} of %{pages}</label>"
21
- items_selector_js: "<label>Show %{items_input} %{item_name} per page</label>"
18
+ single_page: "Displaying %{count} %{item_name}"
19
+ multiple_pages: "Displaying %{item_name} %{from}-%{to} of %{count} in total"
20
+ combo_nav_js: "Page %{page_input} of %{pages}"
21
+ items_selector_js: "Show %{items_input} %{item_name} per page"
@@ -17,5 +17,5 @@ es:
17
17
  no_items: "Sin resultados"
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} de %{count} en total"
20
- combo_nav_js: "<label>Página %{page_input} de %{pages}</label>"
21
- items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
20
+ combo_nav_js: "Página %{page_input} de %{pages}"
21
+ items_selector_js: "Mostrar %{items_input} %{item_name} por página"
@@ -15,7 +15,7 @@ fr:
15
15
  other: "éléments"
16
16
  info:
17
17
  no_items: "Aucun %{item_name} trouvé"
18
- single_page: "Affichage de <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Affichage des %{item_name} <b>%{from} à %{to}</b> sur <b>%{count}</b> au total"
20
- combo_nav_js: "<label>Page %{page_input} sur %{pages}</label>"
21
- items_selector_js: "<label>Afficher %{items_input} %{item_name} par page</label>"
18
+ single_page: "Affichage de %{count} %{item_name}"
19
+ multiple_pages: "Affichage des %{item_name} %{from} à %{to} sur %{count} au total"
20
+ combo_nav_js: "Page %{page_input} sur %{pages}"
21
+ items_selector_js: "Afficher %{items_input} %{item_name} par page"
@@ -19,7 +19,7 @@ hr:
19
19
  other: "stavki"
20
20
  info:
21
21
  no_items: "Nije pronađena %{item_name}"
22
- single_page: "Prikazuje se <b>%{count}</b> %{item_name}"
23
- multiple_pages: "Prikaz %{item_name} <b>%{from}-%{to}</b> od <b>%{count}</b> ukupno"
24
- combo_nav_js: "<label>Stranica %{page_input} od %{pages}</label>"
25
- items_selector_js: "<label>Prikaži %{items_input} %{item_name} po stranici</label>"
22
+ single_page: "Prikazuje se %{count} %{item_name}"
23
+ multiple_pages: "Prikaz %{item_name} %{from}-%{to} od %{count} ukupno"
24
+ combo_nav_js: "Stranica %{page_input} od %{pages}"
25
+ items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
@@ -13,7 +13,7 @@ id:
13
13
  item_name: "item"
14
14
  info:
15
15
  no_items: "Tidak ditemukan %{item_name}"
16
- single_page: "Menampilkan <b>%{count}</b> %{item_name}"
17
- multiple_pages: "Menampilkan %{item_name} <b>%{from}-%{to}</b> dari total <b>%{count}</b>"
18
- combo_nav_js: "<label>Halaman %{page_input} dari %{pages}</label>"
19
- items_selector_js: "<label>Tampilkan %{items_input} %{item_name} per halaman</label>"
16
+ single_page: "Menampilkan %{count} %{item_name}"
17
+ multiple_pages: "Menampilkan %{item_name} %{from}-%{to} dari total %{count}"
18
+ combo_nav_js: "Halaman %{page_input} dari %{pages}"
19
+ items_selector_js: "Tampilkan %{items_input} %{item_name} per halaman"
@@ -15,7 +15,7 @@ it:
15
15
  other: "elementi"
16
16
  info:
17
17
  no_items: "Nessun %{item_name} trovato"
18
- single_page: "Visualizzazione di <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Visualizzazione %{item_name} <b>%{from}-%{to}</b> di <b>%{count}</b> in totale"
20
- combo_nav_js: "<label>Pagina %{page_input} di %{pages}</label>"
21
- items_selector_js: "<label>Mostra %{items_input} %{item_name} per pagina</label>"
18
+ single_page: "Visualizzazione di %{count} %{item_name}"
19
+ multiple_pages: "Visualizzazione %{item_name} %{from}-%{to} di %{count} in totale"
20
+ combo_nav_js: "Pagina %{page_input} di %{pages}"
21
+ items_selector_js: "Mostra %{items_input} %{item_name} per pagina"
@@ -13,7 +13,7 @@ ja:
13
13
  item_name: "結果"
14
14
  info:
15
15
  no_items: "見つかりませんでした"
16
- single_page: "<b>%{count}</b> 件の%{item_name}"
17
- multiple_pages: "<b>%{count}</b> 件中 <b>%{from}-%{to}</b> 件目の%{item_name}を表示中"
18
- combo_nav_js: "<label>%{page_input} / %{pages} ページ</label>"
19
- items_selector_js: "<label>%{items_input} 件ずつ表示</label>"
16
+ single_page: "%{count} 件の%{item_name}"
17
+ multiple_pages: "%{count} 件中 %{from}-%{to} 件目の%{item_name}を表示中"
18
+ combo_nav_js: "%{page_input} / %{pages} ページ"
19
+ items_selector_js: "%{items_input} 件ずつ表示"
@@ -13,7 +13,7 @@ km:
13
13
  item_name: "ធាតុ"
14
14
  info:
15
15
  no_items: "មិនមាន %{item_name} ទេ"
16
- single_page: "បង្ហាញ <b>%{count}</b> %{item_name}"
17
- multiple_pages: "បង្ហាញ %{item_name} <b>%{from}-%{to}</b> នៃ <b>%{count}</b> ជាចំនួនសរុប"
18
- combo_nav_js: "<label>ទំព័រ %{page_input} នៃ %{pages}</label>"
19
- items_selector_js: "<label>បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ</label>"
16
+ single_page: "បង្ហាញ %{count} %{item_name}"
17
+ multiple_pages: "បង្ហាញ %{item_name} %{from}-%{to} នៃ %{count} ជាចំនួនសរុប"
18
+ combo_nav_js: "ទំព័រ %{page_input} នៃ %{pages}"
19
+ items_selector_js: "បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ"
@@ -13,7 +13,7 @@ ko:
13
13
  item_name: "항목"
14
14
  info:
15
15
  no_items: "%{item_name} 없음"
16
- single_page: "<b>%{count}</b>개의 %{item_name} 표시됨"
17
- multiple_pages: "총 <b>%{count}</b>개의 %{item_name} 중 <b>%{from}-%{to}</b>"
18
- combo_nav_js: "<label>총 %{pages} 중 %{page_input} 페이지</label>"
19
- items_selector_js: "<label>페이지 당 %{items_input}개 표시%</label>"
16
+ single_page: "%{count}개의 %{item_name} 표시됨"
17
+ multiple_pages: "총 %{count}개의 %{item_name} 중 %{from}-%{to}"
18
+ combo_nav_js: " %{pages} 중 %{page_input} 페이지"
19
+ items_selector_js: "페이지 당 %{items_input}개 표시%"
@@ -15,7 +15,7 @@ nb:
15
15
  other: "resultater"
16
16
  info:
17
17
  no_items: "Ingen %{item_name} funnet"
18
- single_page: "Viser <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> av totalt <b>%{count}</b>"
20
- combo_nav_js: "<label>Side %{page_input} av %{pages}</label>"
21
- items_selector_js: "<label>Vis %{items_input} %{item_name} per side</label>"
18
+ single_page: "Viser %{count} %{item_name}"
19
+ multiple_pages: "Viser %{item_name} %{from}-%{to} av totalt %{count}"
20
+ combo_nav_js: "Side %{page_input} av %{pages}"
21
+ items_selector_js: "Vis %{items_input} %{item_name} per side"
@@ -15,7 +15,7 @@ nl:
15
15
  other: "stuks"
16
16
  info:
17
17
  no_items: "Geen %{item_name} gevonden"
18
- single_page: "Toont <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Toont <b>%{from}-%{to}</b> %{item_name} van <b>%{count}</b> in totaal"
20
- combo_nav_js: "<label>Pagina %{page_input} van %{pages}</label>"
21
- items_selector_js: "<label>Toont %{items_input} %{item_name} per pagina</label>"
18
+ single_page: "Toont %{count} %{item_name}"
19
+ multiple_pages: "Toont %{from}-%{to} %{item_name} van %{count} in totaal"
20
+ combo_nav_js: "Pagina %{page_input} van %{pages}"
21
+ items_selector_js: "Toont %{items_input} %{item_name} per pagina"
@@ -15,7 +15,7 @@ nn:
15
15
  other: "resultat"
16
16
  info:
17
17
  no_items: "Ingen %{item_name} funne"
18
- single_page: "Viser <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> av totalt <b>%{count}</b>"
20
- combo_nav_js: "<label>Side %{page_input} av %{pages}</label>"
21
- items_selector_js: "<label>Vis %{items_input} %{item_name} per side</label>"
18
+ single_page: "Viser %{count} %{item_name}"
19
+ multiple_pages: "Viser %{item_name} %{from}-%{to} av totalt %{count}"
20
+ combo_nav_js: "Side %{page_input} av %{pages}"
21
+ items_selector_js: "Vis %{items_input} %{item_name} per side"
@@ -19,7 +19,7 @@ pl:
19
19
  other: "elementów"
20
20
  info:
21
21
  no_items: "Nie znaleziono %{item_name}"
22
- single_page: "Wyświetlono <b>%{count}</b> %{item_name}"
23
- multiple_pages: "Wyświetlono %{item_name} <b>%{from}-%{to}</b> z wszystkich <b>%{count}</b>"
24
- combo_nav_js: "<label>Strona %{page_input} z %{pages}</label>"
25
- items_selector_js: "<label>Pokaż %{items_input} %{item_name} na stronie</label>"
22
+ single_page: "Wyświetlono %{count} %{item_name}"
23
+ multiple_pages: "Wyświetlono %{item_name} %{from}-%{to} z wszystkich %{count}"
24
+ combo_nav_js: "Strona %{page_input} z %{pages}"
25
+ items_selector_js: "Pokaż %{items_input} %{item_name} na stronie"
@@ -17,5 +17,5 @@ pt-BR:
17
17
  no_items: "Sem resultados"
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} do total de %{count}"
20
- combo_nav_js: "<label>Página %{page_input} de %{pages}</label>"
21
- items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
20
+ combo_nav_js: "Página %{page_input} de %{pages}"
21
+ items_selector_js: "Mostrar %{items_input} %{item_name} por página"
@@ -17,5 +17,5 @@ pt:
17
17
  no_items: "Sem resultados"
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} de um total de %{count}"
20
- combo_nav_js: "<label>Página %{page_input} de %{pages}</label>"
21
- items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
20
+ combo_nav_js: "Página %{page_input} de %{pages}"
21
+ items_selector_js: "Mostrar %{items_input} %{item_name} por página"
data/locales/ru.yml ADDED
@@ -0,0 +1,25 @@
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
2
+ ru:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Страница"
7
+ few: "Страницы"
8
+ many: "Страниц"
9
+ other: "Страниц"
10
+ prev: "Назад"
11
+ next: "Вперёд"
12
+ prev: "&lt;"
13
+ next: "&gt;"
14
+ gap: "&hellip;"
15
+ item_name:
16
+ one: "запись"
17
+ few: "записи"
18
+ many: "записей"
19
+ other: "записей"
20
+ info:
21
+ no_items: "Пока %{item_name} нет"
22
+ single_page: "%{count} %{item_name}"
23
+ multiple_pages: "Всего %{count} %{item_name}, показаны с %{from} по %{to}"
24
+ combo_nav_js: "Страница %{page_input} из %{pages}"
25
+ items_selector_js: "Показать %{items_input} %{item_name} на странице"
@@ -19,7 +19,7 @@ sr:
19
19
  other: "ставки"
20
20
  info:
21
21
  no_items: "Нema пронађених %{item_name}"
22
- single_page: "Приказује се <b>%{count}</b> %{item_name}"
23
- multiple_pages: "Приказ %{item_name} <b>%{from}-%{to}</b> од <b>%{count}</b> укупно"
24
- combo_nav_js: "<label>Страниca %{page_input} од %{pages}</label>"
25
- items_selector_js: "<label>Прикажи %{items_input} %{item_name} по страниcи</label>"
22
+ single_page: "Приказује се %{count} %{item_name}"
23
+ multiple_pages: "Приказ %{item_name} %{from}-%{to} од %{count} укупно"
24
+ combo_nav_js: "Страниca %{page_input} од %{pages}"
25
+ items_selector_js: "Прикажи %{items_input} %{item_name} по страниcи"
@@ -15,7 +15,7 @@ sv-SE:
15
15
  other: "resultat"
16
16
  info:
17
17
  no_items: "Inga %{item_name} hittade"
18
- single_page: "Visar <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"
20
- combo_nav_js: "<label>Sida %{page_input} av %{pages}</label>"
21
- items_selector_js: "<label>Visa %{items_input} %{item_name} per sida</label>"
18
+ single_page: "Visar %{count} %{item_name}"
19
+ multiple_pages: "Visar %{item_name} %{from}-%{to} av %{count} totalt"
20
+ combo_nav_js: "Sida %{page_input} av %{pages}"
21
+ items_selector_js: "Visa %{items_input} %{item_name} per sida"
@@ -15,7 +15,7 @@ sv:
15
15
  other: "resultat"
16
16
  info:
17
17
  no_items: "Inga %{item_name} hittade"
18
- single_page: "Visar <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"
20
- combo_nav_js: "<label>Sida %{page_input} av %{pages}</label>"
21
- items_selector_js: "<label>Visa %{items_input} %{item_name} per sida</label>"
18
+ single_page: "Visar %{count} %{item_name}"
19
+ multiple_pages: "Visar %{item_name} %{from}-%{to} av %{count} totalt"
20
+ combo_nav_js: "Sida %{page_input} av %{pages}"
21
+ items_selector_js: "Visa %{items_input} %{item_name} per sida"
@@ -17,7 +17,7 @@ sw:
17
17
  other: "vifaa"
18
18
  info:
19
19
  no_items: "Hamna %{item_name} vilivyopatikana"
20
- single_page: "Inaonyesha %{item_name} <b>%{count}</b>"
21
- multiple_pages: "Inaonyesha %{item_name} <b>%{from}-%{to}</b> ya <b>%{count}</b> kwa jumla"
22
- combo_nav_js: "<label>Kurasa %{page_input} ya %{pages}</label>"
23
- items_selector_js: "<label>Onyesha %{items_input} %{item_name} kwa kila ukurasa</label>"
20
+ single_page: "Inaonyesha %{item_name} %{count}"
21
+ multiple_pages: "Inaonyesha %{item_name} %{from}-%{to} ya %{count} kwa jumla"
22
+ combo_nav_js: "Kurasa %{page_input} ya %{pages}"
23
+ items_selector_js: "Onyesha %{items_input} %{item_name} kwa kila ukurasa"