pagy 8.4.0 → 9.0.9

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 (100) hide show
  1. checksums.yaml +4 -4
  2. data/apps/calendar.ru +682 -2137
  3. data/apps/demo.ru +17 -13
  4. data/apps/keyset_ar.ru +236 -0
  5. data/apps/keyset_s.ru +238 -0
  6. data/apps/rails.ru +25 -15
  7. data/apps/repro.ru +17 -14
  8. data/bin/pagy +17 -12
  9. data/config/pagy.rb +37 -34
  10. data/javascripts/pagy.min.js +4 -0
  11. data/javascripts/pagy.min.js.map +10 -0
  12. data/javascripts/pagy.mjs +100 -0
  13. data/lib/optimist.rb +1 -1
  14. data/lib/pagy/b64.rb +33 -0
  15. data/lib/pagy/backend.rb +19 -19
  16. data/lib/pagy/calendar/day.rb +4 -3
  17. data/lib/pagy/calendar/month.rb +4 -3
  18. data/lib/pagy/calendar/quarter.rb +4 -3
  19. data/lib/pagy/calendar/unit.rb +103 -0
  20. data/lib/pagy/calendar/week.rb +3 -3
  21. data/lib/pagy/calendar/year.rb +4 -3
  22. data/lib/pagy/calendar.rb +54 -97
  23. data/lib/pagy/countless.rb +15 -16
  24. data/lib/pagy/extras/arel.rb +3 -11
  25. data/lib/pagy/extras/array.rb +5 -10
  26. data/lib/pagy/extras/bootstrap.rb +5 -5
  27. data/lib/pagy/extras/bulma.rb +10 -7
  28. data/lib/pagy/extras/calendar.rb +34 -5
  29. data/lib/pagy/extras/countless.rb +8 -13
  30. data/lib/pagy/extras/elasticsearch_rails.rb +16 -25
  31. data/lib/pagy/extras/gearbox.rb +26 -26
  32. data/lib/pagy/extras/headers.rb +25 -24
  33. data/lib/pagy/extras/i18n.rb +1 -1
  34. data/lib/pagy/extras/js_tools.rb +10 -10
  35. data/lib/pagy/extras/jsonapi.rb +26 -19
  36. data/lib/pagy/extras/keyset.rb +30 -0
  37. data/lib/pagy/extras/limit.rb +63 -0
  38. data/lib/pagy/extras/meilisearch.rb +9 -17
  39. data/lib/pagy/extras/metadata.rb +6 -2
  40. data/lib/pagy/extras/overflow.rb +11 -10
  41. data/lib/pagy/extras/pagy.rb +16 -16
  42. data/lib/pagy/extras/searchkick.rb +9 -17
  43. data/lib/pagy/extras/size.rb +40 -0
  44. data/lib/pagy/extras/standalone.rb +6 -6
  45. data/lib/pagy/extras/trim.rb +3 -3
  46. data/lib/pagy/frontend.rb +37 -35
  47. data/lib/pagy/i18n.rb +2 -2
  48. data/lib/pagy/keyset/active_record.rb +38 -0
  49. data/lib/pagy/keyset/sequel.rb +51 -0
  50. data/lib/pagy/keyset.rb +98 -0
  51. data/lib/pagy/shared_methods.rb +27 -0
  52. data/lib/pagy/url_helpers.rb +5 -5
  53. data/lib/pagy.rb +70 -94
  54. data/locales/ar.yml +9 -10
  55. data/locales/be.yml +2 -2
  56. data/locales/bg.yml +2 -2
  57. data/locales/bs.yml +2 -2
  58. data/locales/ca.yml +5 -7
  59. data/locales/ckb.yml +2 -2
  60. data/locales/cs.yml +2 -2
  61. data/locales/da.yml +2 -2
  62. data/locales/de.yml +2 -2
  63. data/locales/en.yml +2 -2
  64. data/locales/es.yml +2 -2
  65. data/locales/fr.yml +2 -2
  66. data/locales/hr.yml +2 -2
  67. data/locales/id.yml +2 -2
  68. data/locales/it.yml +2 -2
  69. data/locales/ja.yml +2 -2
  70. data/locales/km.yml +2 -2
  71. data/locales/ko.yml +2 -2
  72. data/locales/nb.yml +2 -2
  73. data/locales/nl.yml +2 -2
  74. data/locales/nn.yml +2 -2
  75. data/locales/pl.yml +2 -2
  76. data/locales/pt-BR.yml +2 -2
  77. data/locales/pt.yml +2 -2
  78. data/locales/ru.yml +2 -2
  79. data/locales/sr.yml +2 -2
  80. data/locales/sv-SE.yml +2 -2
  81. data/locales/sv.yml +2 -2
  82. data/locales/sw.yml +2 -2
  83. data/locales/ta.yml +2 -2
  84. data/locales/tr.yml +2 -2
  85. data/locales/uk.yml +2 -2
  86. data/locales/vi.yml +2 -2
  87. data/locales/zh-CN.yml +2 -2
  88. data/locales/zh-HK.yml +2 -2
  89. data/locales/zh-TW.yml +2 -2
  90. metadata +19 -19
  91. data/javascripts/pagy-dev.js +0 -114
  92. data/javascripts/pagy-module.js +0 -113
  93. data/javascripts/pagy.js +0 -1
  94. data/lib/pagy/calendar/helper.rb +0 -65
  95. data/lib/pagy/extras/foundation.rb +0 -95
  96. data/lib/pagy/extras/items.rb +0 -64
  97. data/lib/pagy/extras/materialize.rb +0 -100
  98. data/lib/pagy/extras/semantic.rb +0 -94
  99. data/lib/pagy/extras/uikit.rb +0 -98
  100. /data/javascripts/{pagy-module.d.ts → pagy.d.ts} +0 -0
data/lib/pagy.rb CHANGED
@@ -2,126 +2,102 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pathname'
5
+ require_relative 'pagy/shared_methods'
5
6
 
6
- # Core class
7
+ # Top superclass: it should define only what's common to all the subclasses
7
8
  class Pagy
8
- VERSION = '8.4.0'
9
+ VERSION = '9.0.9'
10
+
11
+ # Core default: constant for easy access, but mutable for customizable defaults
12
+ DEFAULT = { count_args: [:all], # rubocop:disable Style/MutableConstant
13
+ ends: true,
14
+ limit: 20,
15
+ outset: 0,
16
+ page: 1,
17
+ page_param: :page,
18
+ size: 7 } # AR friendly
9
19
 
10
20
  # Gem root pathname to get the path of Pagy files stylesheets, javascripts, apps, locales, etc.
11
21
  def self.root
12
22
  @root ||= Pathname.new(__dir__).parent.freeze
13
23
  end
14
24
 
15
- # Core defult: constant for easy access, but mutable for customizable defaults
16
- DEFAULT = { page: 1, # rubocop:disable Style/MutableConstant
17
- items: 20,
18
- outset: 0,
19
- size: 7,
20
- cycle: false,
21
- count_args: [:all], # AR friendly
22
- page_param: :page }
25
+ include SharedMethods
23
26
 
24
- attr_reader :count, :page, :items, :vars, :last, :offset, :in, :from, :to, :prev, :next
27
+ attr_reader :count, :from, :in, :last, :next, :offset, :prev, :to
25
28
  alias pages last
26
29
 
27
30
  # Merge and validate the options, do some simple arithmetic and set the instance variables
28
- def initialize(vars)
29
- normalize_vars(vars)
30
- setup_vars(count: 0, page: 1, outset: 0)
31
- setup_items_var
32
- setup_last_var
33
- raise OverflowError.new(self, :page, "in 1..#{@last}", @page) if @page > @last
34
-
35
- setup_offset_var
31
+ def initialize(**vars)
32
+ assign_vars(DEFAULT, vars)
33
+ assign_and_check(count: 0, page: 1, outset: 0)
34
+ assign_limit
35
+ assign_offset
36
+ assign_last
37
+ check_overflow
36
38
  @from = [@offset - @outset + 1, @count].min
37
- @to = [@offset - @outset + @items, @count].min
39
+ @to = [@offset - @outset + @limit, @count].min
38
40
  @in = [@to - @from + 1, @count].min
39
- @prev = (@page - 1 unless @page == 1)
40
- @next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
41
+ assign_prev_and_next
41
42
  end
42
43
 
43
- # Return the array of page numbers and :gap items e.g. [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
44
- def series(size: @vars[:size], **_)
45
- series = []
46
- if size.is_a?(Array) && size.size == 4 && size.all? { |num| !num.negative? rescue false } # rubocop:disable Style/RescueModifier
47
- # This algorithm is up to ~5x faster and ~2.3x lighter than the previous one (pagy < 4.3)
48
- left_gap_start = 1 + size[0]
49
- left_gap_end = @page - size[1] - 1
50
- right_gap_start = @page + size[2] + 1
51
- right_gap_end = @last - size[3]
52
- left_gap_end = right_gap_end if left_gap_end > right_gap_end
53
- right_gap_start = left_gap_start if left_gap_start > right_gap_start
54
- start = 1
55
- if (left_gap_end - left_gap_start).positive?
56
- series.push(*start...left_gap_start, :gap)
57
- start = left_gap_end + 1
58
- end
59
- if (right_gap_end - right_gap_start).positive?
60
- series.push(*start...right_gap_start, :gap)
61
- start = right_gap_end + 1
62
- end
63
- series.push(*start..@last)
64
- elsif size.is_a?(Integer) && size.positive? # only central series
65
- # The simplest and fastest algorithm
66
- size = @last if size > @last # reduce the max size to @last
67
- left = ((size - 1) / 2.0).floor # left half might be 1 page shorter for even size
68
- start = if @page <= left # beginning pages
69
- 1
70
- elsif @page > @last - (size - left) # end pages
71
- @last - size + 1
72
- else # intermediate pages
73
- @page - left
74
- end
75
- series = (start..start + size - 1).to_a
76
- else
77
- return [] if size.empty?
78
-
79
- raise VariableError.new(self, :size, 'to be a single positive Integer or an Array of 4', size)
80
- end
81
- series[series.index(@page)] = @page.to_s
82
- series
44
+ # Setup @last (overridden by the gearbox extra)
45
+ def assign_last
46
+ @last = [(@count.to_f / @limit).ceil, 1].max
47
+ @last = @vars[:max_pages] if @vars[:max_pages] && @last > vars[:max_pages]
83
48
  end
84
49
 
85
- # Label for any page. Allow the customization of the output (overridden by the calendar extra)
86
- def label_for(page)
87
- page.to_s
50
+ # Assign @offset (overridden by the gearbox extra)
51
+ def assign_offset
52
+ @offset = (@limit * (@page - 1)) + @outset # may be already set from gear_box
88
53
  end
89
54
 
90
- # Label for the current page. Allow the customization of the output (overridden by the calendar extra)
91
- def label
92
- @page.to_s
93
- end
94
-
95
- protected
96
-
97
- # Apply defaults, cleanup blanks and set @vars
98
- def normalize_vars(vars)
99
- @vars = DEFAULT.merge(vars.delete_if { |k, v| DEFAULT.key?(k) && (v.nil? || v == '') })
55
+ # Assign @prev and @next
56
+ def assign_prev_and_next
57
+ @prev = (@page - 1 unless @page == 1)
58
+ @next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
100
59
  end
101
60
 
102
- # Setup and validates the passed vars: var must be present and value.to_i must be >= to min
103
- def setup_vars(name_min)
104
- name_min.each do |name, min|
105
- raise VariableError.new(self, name, ">= #{min}", @vars[name]) \
106
- unless @vars[name]&.respond_to?(:to_i) && instance_variable_set(:"@#{name}", @vars[name].to_i) >= min
107
- end
61
+ # Checks the @page <= @last
62
+ def check_overflow
63
+ raise OverflowError.new(self, :page, "in 1..#{@last}", @page) if @page > @last
108
64
  end
109
65
 
110
- # Setup @items (overridden by the gearbox extra)
111
- def setup_items_var
112
- setup_vars(items: 1)
113
- end
66
+ # Label for the current page. Allow the customization of the output (overridden by the calendar extra)
67
+ def label = @page.to_s
114
68
 
115
- # Setup @last (overridden by the gearbox extra)
116
- def setup_last_var
117
- @last = [(@count.to_f / @items).ceil, 1].max
118
- @last = vars[:max_pages] if vars[:max_pages] && @last > vars[:max_pages]
119
- end
120
- alias setup_pages_var setup_last_var
69
+ # Label for any page. Allow the customization of the output (overridden by the calendar extra)
70
+ def label_for(page) = page.to_s
121
71
 
122
- # Setup @offset based on the :gearbox_items variable
123
- def setup_offset_var
124
- @offset = (@items * (@page - 1)) + @outset # may be already set from gear_box
72
+ # Return the array of page numbers and :gap e.g. [1, :gap, 8, "9", 10, :gap, 36]
73
+ def series(size: @vars[:size], **_)
74
+ raise VariableError.new(self, :size, 'to be an Integer >= 0', size) \
75
+ unless size.is_a?(Integer) && size >= 0
76
+ return [] if size.zero?
77
+
78
+ [].tap do |series|
79
+ if size >= @last
80
+ series.push(*1..@last)
81
+ else
82
+ left = ((size - 1) / 2.0).floor # left half might be 1 page shorter for even size
83
+ start = if @page <= left # beginning pages
84
+ 1
85
+ elsif @page > (@last - size + left) # end pages
86
+ @last - size + 1
87
+ else # intermediate pages
88
+ @page - left
89
+ end
90
+ series.push(*start...start + size)
91
+ # Set first and last pages plus gaps when needed, respecting the size
92
+ if vars[:ends] && size >= 7
93
+ series[0] = 1 unless series[0] == 1
94
+ series[1] = :gap unless series[1] == 2
95
+ series[-2] = :gap unless series[-2] == @last - 1
96
+ series[-1] = @last unless series[-1] == @last
97
+ end
98
+ end
99
+ series[series.index(@page)] = @page.to_s
100
+ end
125
101
  end
126
102
  end
127
103
 
data/locales/ar.yml CHANGED
@@ -1,15 +1,14 @@
1
- # :arabic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :arabic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  ar:
3
3
  pagy:
4
4
  aria_label:
5
- # please add a comment in the https://github.com/ddnexus/pagy/issues/577
6
- # posting the translation of the following "Page"/"Pages" with the plurals for this locale
7
- nav: "Pages"
8
- # zero: ""
9
- # two: ""
10
- # few: ""
11
- # many: ""
12
- # other: ""
5
+ nav:
6
+ zero: "لا يوجد صفحات"
7
+ one: "صفحة"
8
+ two: "صفحتين"
9
+ few: "صفحات"
10
+ many: "صفحات"
11
+ other: "صفحات"
13
12
  prev: "السابق"
14
13
  next: "التالي"
15
14
  prev: "&lt;"
@@ -27,4 +26,4 @@ ar:
27
26
  single_page: "عرض %{count} %{item_name}"
28
27
  multiple_pages: "عرض %{item_name} %{from}-%{to} من اجمالي %{count}"
29
28
  combo_nav_js: "الصفحة %{page_input} من %{pages}"
30
- items_selector_js: "عرض %{items_input} %{item_name} لكل صفحة"
29
+ limit_selector_js: "عرض %{limit_input} %{item_name} لكل صفحة"
data/locales/be.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  be:
3
3
  pagy:
4
4
  aria_label:
@@ -22,4 +22,4 @@ be:
22
22
  single_page: "%{count} %{item_name}"
23
23
  multiple_pages: "Усяго %{count} %{item_name}, паказаны з %{from} па %{to}"
24
24
  combo_nav_js: "Старонка %{page_input} з %{pages}"
25
- items_selector_js: "Паказаць %{items_input} %{item_name} на старонцы"
25
+ limit_selector_js: "Паказаць %{limit_input} %{item_name} на старонцы"
data/locales/bg.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  bg:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ bg:
18
18
  single_page: "Показани са %{count} %{item_name}"
19
19
  multiple_pages: "Показани са %{item_name} %{from}-%{to} от %{count} общо"
20
20
  combo_nav_js: "Страница %{page_input} от %{pages}"
21
- items_selector_js: "Покажи %{items_input} %{item_name} на страница"
21
+ limit_selector_js: "Покажи %{limit_input} %{item_name} на страница"
data/locales/bs.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  bs:
3
3
  pagy:
4
4
  aria_label:
@@ -22,4 +22,4 @@ bs:
22
22
  single_page: "Prikazuje se %{count} %{item_name}"
23
23
  multiple_pages: "Prikaz %{item_name} %{from}-%{to} od %{count} ukupno"
24
24
  combo_nav_js: "Stranica %{page_input} od %{pages}"
25
- items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
25
+ limit_selector_js: "Prikaži %{limit_input} %{item_name} po stranici"
data/locales/ca.yml CHANGED
@@ -1,12 +1,10 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  ca:
3
3
  pagy:
4
4
  aria_label:
5
- # please add a comment in the https://github.com/ddnexus/pagy/issues/581
6
- # posting the translation of the following "Page"/"Pages" with the plurals for this locale
7
- nav: "Pages"
8
- # one: ""
9
- # other: ""
5
+ nav:
6
+ one: "Pàgina"
7
+ other: "Pàgines"
10
8
  prev: "Anterior"
11
9
  next: "Següent"
12
10
  prev: "&lt;"
@@ -20,4 +18,4 @@ ca:
20
18
  single_page: "Mostrant %{count} %{item_name}"
21
19
  multiple_pages: "Mostrant %{item_name} %{from}-%{to} de %{count} en total"
22
20
  combo_nav_js: "Pàgina %{page_input} de %{pages}"
23
- items_selector_js: "Mostra %{items_input} %{item_name} per pàgina"
21
+ limit_selector_js: "Mostra %{limit_input} %{item_name} per pàgina"
data/locales/ckb.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
 
3
3
  ckb:
4
4
  pagy:
@@ -15,4 +15,4 @@ ckb:
15
15
  single_page: "پیشاندانی %{count} %{item_name}"
16
16
  multiple_pages: "پشاندانی %{item_name}ی %{from}-%{to} لە کۆی %{count} بە گشتی"
17
17
  combo_nav_js: "پەڕی %{page_input} لە %{pages}"
18
- items_selector_js: "نیشاندانی %{items_input} %{item_name} لە هەر پەڕێک"
18
+ limit_selector_js: "نیشاندانی %{limit_input} %{item_name} لە هەر پەڕێک"
data/locales/cs.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :west_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :west_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  cs:
3
3
  pagy:
4
4
  aria_label:
@@ -20,4 +20,4 @@ cs:
20
20
  single_page: "Zobrazeno %{count} %{item_name}"
21
21
  multiple_pages: "Zobrazeny položky %{from}-%{to} z %{count} celkem"
22
22
  combo_nav_js: "Strana %{page_input} z %{pages}"
23
- items_selector_js: "Zobrazit %{items_input} %{item_name} na stránce"
23
+ limit_selector_js: "Zobrazit %{limit_input} %{item_name} na stránce"
data/locales/da.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  da:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ da:
18
18
  single_page: "Viser %{count} %{item_name}"
19
19
  multiple_pages: "Viser %{item_name} %{from}-%{to} af %{count} totalt"
20
20
  combo_nav_js: "Side %{page_input} af %{pages}"
21
- items_selector_js: "Antal %{items_input} %{item_name} per side"
21
+ limit_selector_js: "Antal %{limit_input} %{item_name} per side"
data/locales/de.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  de:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ de:
18
18
  single_page: "Zeige %{count} %{item_name}"
19
19
  multiple_pages: "Zeige %{item_name} %{from}-%{to} von %{count} gesamt"
20
20
  combo_nav_js: "Seite %{page_input} von %{pages}"
21
- items_selector_js: "Zeige %{items_input} %{item_name} pro Seite"
21
+ limit_selector_js: "Zeige %{limit_input} %{item_name} pro Seite"
data/locales/en.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  en:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ en:
18
18
  single_page: "Displaying %{count} %{item_name}"
19
19
  multiple_pages: "Displaying %{item_name} %{from}-%{to} of %{count} in total"
20
20
  combo_nav_js: "Page %{page_input} of %{pages}"
21
- items_selector_js: "Show %{items_input} %{item_name} per page"
21
+ limit_selector_js: "Show %{limit_input} %{item_name} per page"
data/locales/es.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  es:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ es:
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} de %{count} en total"
20
20
  combo_nav_js: "Página %{page_input} de %{pages}"
21
- items_selector_js: "Mostrar %{items_input} %{item_name} por página"
21
+ limit_selector_js: "Mostrar %{limit_input} %{item_name} por página"
data/locales/fr.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_upto_two_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_upto_two_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  fr:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ fr:
18
18
  single_page: "Affichage de %{count} %{item_name}"
19
19
  multiple_pages: "Affichage des %{item_name} %{from} à %{to} sur %{count} au total"
20
20
  combo_nav_js: "Page %{page_input} sur %{pages}"
21
- items_selector_js: "Afficher %{items_input} %{item_name} par page"
21
+ limit_selector_js: "Afficher %{limit_input} %{item_name} par page"
data/locales/hr.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  hr:
3
3
  pagy:
4
4
  aria_label:
@@ -22,4 +22,4 @@ hr:
22
22
  single_page: "Prikazuje se %{count} %{item_name}"
23
23
  multiple_pages: "Prikaz %{item_name} %{from}-%{to} od %{count} ukupno"
24
24
  combo_nav_js: "Stranica %{page_input} od %{pages}"
25
- items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
25
+ limit_selector_js: "Prikaži %{limit_input} %{item_name} po stranici"
data/locales/id.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  id:
3
3
  pagy:
4
4
  aria_label:
@@ -16,4 +16,4 @@ id:
16
16
  single_page: "Menampilkan %{count} %{item_name}"
17
17
  multiple_pages: "Menampilkan %{item_name} %{from}-%{to} dari total %{count}"
18
18
  combo_nav_js: "Halaman %{page_input} dari %{pages}"
19
- items_selector_js: "Tampilkan %{items_input} %{item_name} per halaman"
19
+ limit_selector_js: "Tampilkan %{limit_input} %{item_name} per halaman"
data/locales/it.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  it:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ it:
18
18
  single_page: "Visualizzazione di %{count} %{item_name}"
19
19
  multiple_pages: "Visualizzazione %{item_name} %{from}-%{to} di %{count} in totale"
20
20
  combo_nav_js: "Pagina %{page_input} di %{pages}"
21
- items_selector_js: "Mostra %{items_input} %{item_name} per pagina"
21
+ limit_selector_js: "Mostra %{limit_input} %{item_name} per pagina"
data/locales/ja.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  ja:
3
3
  pagy:
4
4
  aria_label:
@@ -16,4 +16,4 @@ ja:
16
16
  single_page: "%{count} 件の%{item_name}"
17
17
  multiple_pages: "%{count} 件中 %{from}-%{to} 件目の%{item_name}を表示中"
18
18
  combo_nav_js: "%{page_input} / %{pages} ページ"
19
- items_selector_js: "%{items_input} 件ずつ表示"
19
+ limit_selector_js: "%{limit_input} 件ずつ表示"
data/locales/km.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  km:
3
3
  pagy:
4
4
  aria_label:
@@ -16,4 +16,4 @@ km:
16
16
  single_page: "បង្ហាញ %{count} %{item_name}"
17
17
  multiple_pages: "បង្ហាញ %{item_name} %{from}-%{to} នៃ %{count} ជាចំនួនសរុប"
18
18
  combo_nav_js: "ទំព័រ %{page_input} នៃ %{pages}"
19
- items_selector_js: "បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ"
19
+ limit_selector_js: "បង្ហាញ %{limit_input} %{item_name} ក្នុង ១ ទំព័រ"
data/locales/ko.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  ko:
3
3
  pagy:
4
4
  aria_label:
@@ -14,4 +14,4 @@ ko:
14
14
  single_page: "%{count}개의 %{item_name} 표시됨"
15
15
  multiple_pages: "총 %{count}개의 %{item_name} 중 %{from}-%{to}"
16
16
  combo_nav_js: "총 %{pages} 중 %{page_input} 페이지"
17
- items_selector_js: "페이지 당 %{items_input}개 표시%"
17
+ limit_selector_js: "페이지 당 %{limit_input}개 표시%"
data/locales/nb.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  nb:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ nb:
18
18
  single_page: "Viser %{count} %{item_name}"
19
19
  multiple_pages: "Viser %{item_name} %{from}-%{to} av totalt %{count}"
20
20
  combo_nav_js: "Side %{page_input} av %{pages}"
21
- items_selector_js: "Vis %{items_input} %{item_name} per side"
21
+ limit_selector_js: "Vis %{limit_input} %{item_name} per side"
data/locales/nl.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  nl:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ nl:
18
18
  single_page: "Toont %{count} %{item_name}"
19
19
  multiple_pages: "Toont %{from}-%{to} %{item_name} van %{count} in totaal"
20
20
  combo_nav_js: "Pagina %{page_input} van %{pages}"
21
- items_selector_js: "Toont %{items_input} %{item_name} per pagina"
21
+ limit_selector_js: "Toont %{limit_input} %{item_name} per pagina"
data/locales/nn.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  nn:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ nn:
18
18
  single_page: "Viser %{count} %{item_name}"
19
19
  multiple_pages: "Viser %{item_name} %{from}-%{to} av totalt %{count}"
20
20
  combo_nav_js: "Side %{page_input} av %{pages}"
21
- items_selector_js: "Vis %{items_input} %{item_name} per side"
21
+ limit_selector_js: "Vis %{limit_input} %{item_name} per side"
data/locales/pl.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :polish pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :polish pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  pl:
3
3
  pagy:
4
4
  aria_label:
@@ -22,4 +22,4 @@ pl:
22
22
  single_page: "Wyświetlono %{count} %{item_name}"
23
23
  multiple_pages: "Wyświetlono %{item_name} %{from}-%{to} z wszystkich %{count}"
24
24
  combo_nav_js: "Strona %{page_input} z %{pages}"
25
- items_selector_js: "Pokaż %{items_input} %{item_name} na stronie"
25
+ limit_selector_js: "Pokaż %{limit_input} %{item_name} na stronie"
data/locales/pt-BR.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  pt-BR:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ pt-BR:
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} do total de %{count}"
20
20
  combo_nav_js: "Página %{page_input} de %{pages}"
21
- items_selector_js: "Mostrar %{items_input} %{item_name} por página"
21
+ limit_selector_js: "Mostrar %{limit_input} %{item_name} por página"
data/locales/pt.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  pt:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ pt:
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} de um total de %{count}"
20
20
  combo_nav_js: "Página %{page_input} de %{pages}"
21
- items_selector_js: "Mostrar %{items_input} %{item_name} por página"
21
+ limit_selector_js: "Mostrar %{limit_input} %{item_name} por página"
data/locales/ru.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  ru:
3
3
  pagy:
4
4
  aria_label:
@@ -22,4 +22,4 @@ ru:
22
22
  single_page: "%{count} %{item_name}"
23
23
  multiple_pages: "Всего %{count} %{item_name}, показаны с %{from} по %{to}"
24
24
  combo_nav_js: "Страница %{page_input} из %{pages}"
25
- items_selector_js: "Показать %{items_input} %{item_name} на странице"
25
+ limit_selector_js: "Показать %{limit_input} %{item_name} на странице"
data/locales/sr.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  sr:
3
3
  pagy:
4
4
  aria_label:
@@ -22,4 +22,4 @@ sr:
22
22
  single_page: "Приказује се %{count} %{item_name}"
23
23
  multiple_pages: "Приказ %{item_name} %{from}-%{to} од %{count} укупно"
24
24
  combo_nav_js: "Страниca %{page_input} од %{pages}"
25
- items_selector_js: "Прикажи %{items_input} %{item_name} по страниcи"
25
+ limit_selector_js: "Прикажи %{limit_input} %{item_name} по страниcи"
data/locales/sv-SE.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  sv-SE:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ sv-SE:
18
18
  single_page: "Visar %{count} %{item_name}"
19
19
  multiple_pages: "Visar %{item_name} %{from}-%{to} av %{count} totalt"
20
20
  combo_nav_js: "Sida %{page_input} av %{pages}"
21
- items_selector_js: "Visa %{items_input} %{item_name} per sida"
21
+ limit_selector_js: "Visa %{limit_input} %{item_name} per sida"
data/locales/sv.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  sv:
3
3
  pagy:
4
4
  aria_label:
@@ -18,4 +18,4 @@ sv:
18
18
  single_page: "Visar %{count} %{item_name}"
19
19
  multiple_pages: "Visar %{item_name} %{from}-%{to} av %{count} totalt"
20
20
  combo_nav_js: "Sida %{page_input} av %{pages}"
21
- items_selector_js: "Visa %{items_input} %{item_name} per sida"
21
+ limit_selector_js: "Visa %{limit_input} %{item_name} per sida"
data/locales/sw.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  sw:
3
3
  pagy:
4
4
  # please add a comment in the https://github.com/ddnexus/pagy/issues/603
@@ -20,4 +20,4 @@ sw:
20
20
  single_page: "Inaonyesha %{item_name} %{count}"
21
21
  multiple_pages: "Inaonyesha %{item_name} %{from}-%{to} ya %{count} kwa jumla"
22
22
  combo_nav_js: "Kurasa %{page_input} ya %{pages}"
23
- items_selector_js: "Onyesha %{items_input} %{item_name} kwa kila ukurasa"
23
+ limit_selector_js: "Onyesha %{limit_input} %{item_name} kwa kila ukurasa"
data/locales/ta.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  ta:
3
3
  pagy:
4
4
  aria_label:
@@ -20,4 +20,4 @@ ta:
20
20
  single_page: "%{count} %{item_name} காட்டப்படுகின்றது"
21
21
  multiple_pages: "மொத்தம் %{count} %{item_name}, காட்டப்படுபவை %{from}-%{to}"
22
22
  combo_nav_js: "%{pages}-இல் %{page_input}-வது பக்கம்"
23
- items_selector_js: "ஒரு பக்கத்திற்கு %{items_input} %{item_name} காட்டு"
23
+ limit_selector_js: "ஒரு பக்கத்திற்கு %{limit_input} %{item_name} காட்டு"
data/locales/tr.yml CHANGED
@@ -1,4 +1,4 @@
1
- # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/pagy/i18n.rb)
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
2
  tr:
3
3
  pagy:
4
4
  aria_label:
@@ -16,4 +16,4 @@ tr:
16
16
  single_page: "Toplam %{count} %{item_name} gösteriliyor"
17
17
  multiple_pages: "%{count} %{item_name} içerisinden %{from}-%{to} kadarı gösteriliyor"
18
18
  combo_nav_js: "Sayfa %{page_input} / %{pages}"
19
- items_selector_js: "Sayfada %{items_input} %{item_name} göster"
19
+ limit_selector_js: "Sayfada %{limit_input} %{item_name} göster"