pagy 8.0.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/apps/calendar.ru +745 -0
  3. data/{lib/apps → apps}/demo.ru +35 -52
  4. data/apps/keyset_ar.ru +236 -0
  5. data/apps/keyset_s.ru +238 -0
  6. data/{lib/apps → apps}/rails.ru +40 -33
  7. data/{lib/apps → apps}/repro.ru +33 -24
  8. data/apps/tmp/calendar.sqlite3 +0 -0
  9. data/apps/tmp/calendar.sqlite3-shm +0 -0
  10. data/apps/tmp/calendar.sqlite3-wal +0 -0
  11. data/apps/tmp/local_secret.txt +1 -0
  12. data/apps/tmp/pagy-keyset-ar.sqlite3 +0 -0
  13. data/apps/tmp/pagy-keyset-ar.sqlite3-shm +0 -0
  14. data/apps/tmp/pagy-keyset-ar.sqlite3-wal +0 -0
  15. data/apps/tmp/pagy-keyset-s.sqlite3 +0 -0
  16. data/{lib/bin → bin}/pagy +36 -17
  17. data/{lib/config → config}/pagy.rb +37 -68
  18. data/javascripts/pagy-module.js +100 -0
  19. data/javascripts/pagy.js +4 -0
  20. data/javascripts/pagy.min.js +4 -0
  21. data/javascripts/pagy.min.js.map +10 -0
  22. data/javascripts/pagy.mjs +100 -0
  23. data/lib/optimist.rb +1 -1
  24. data/lib/pagy/b64.rb +33 -0
  25. data/lib/pagy/backend.rb +24 -15
  26. data/lib/pagy/calendar/day.rb +5 -4
  27. data/lib/pagy/calendar/month.rb +5 -4
  28. data/lib/pagy/calendar/quarter.rb +5 -4
  29. data/lib/pagy/calendar/unit.rb +103 -0
  30. data/lib/pagy/calendar/week.rb +4 -4
  31. data/lib/pagy/calendar/year.rb +5 -4
  32. data/lib/pagy/calendar.rb +55 -99
  33. data/lib/pagy/console.rb +2 -2
  34. data/lib/pagy/countless.rb +17 -16
  35. data/lib/pagy/extras/arel.rb +8 -10
  36. data/lib/pagy/extras/array.rb +4 -6
  37. data/lib/pagy/extras/bootstrap.rb +7 -7
  38. data/lib/pagy/extras/bulma.rb +13 -9
  39. data/lib/pagy/extras/calendar.rb +35 -6
  40. data/lib/pagy/extras/countless.rb +7 -14
  41. data/lib/pagy/extras/elasticsearch_rails.rb +15 -15
  42. data/lib/pagy/extras/gearbox.rb +36 -35
  43. data/lib/pagy/extras/headers.rb +26 -25
  44. data/lib/pagy/extras/i18n.rb +1 -1
  45. data/lib/pagy/extras/js_tools.rb +12 -9
  46. data/lib/pagy/extras/jsonapi.rb +27 -17
  47. data/lib/pagy/extras/keyset.rb +26 -0
  48. data/lib/pagy/extras/limit.rb +63 -0
  49. data/lib/pagy/extras/meilisearch.rb +11 -11
  50. data/lib/pagy/extras/metadata.rb +7 -3
  51. data/lib/pagy/extras/overflow.rb +9 -8
  52. data/lib/pagy/extras/pagy.rb +18 -18
  53. data/lib/pagy/extras/searchkick.rb +11 -11
  54. data/lib/pagy/extras/size.rb +40 -0
  55. data/lib/pagy/extras/standalone.rb +8 -8
  56. data/lib/pagy/extras/trim.rb +3 -3
  57. data/lib/pagy/frontend.rb +39 -37
  58. data/lib/pagy/i18n.rb +1 -1
  59. data/lib/pagy/keyset/active_record.rb +38 -0
  60. data/lib/pagy/keyset/sequel.rb +51 -0
  61. data/lib/pagy/keyset.rb +99 -0
  62. data/lib/pagy/url_helpers.rb +11 -11
  63. data/lib/pagy.rb +96 -120
  64. data/{lib/locales → locales}/ar.yml +9 -10
  65. data/{lib/locales → locales}/be.yml +2 -2
  66. data/{lib/locales → locales}/bg.yml +2 -2
  67. data/{lib/locales → locales}/bs.yml +2 -2
  68. data/{lib/locales → locales}/ca.yml +5 -7
  69. data/{lib/locales → locales}/ckb.yml +2 -2
  70. data/{lib/locales → locales}/cs.yml +2 -2
  71. data/{lib/locales → locales}/da.yml +5 -7
  72. data/{lib/locales → locales}/de.yml +2 -2
  73. data/{lib/locales → locales}/en.yml +2 -2
  74. data/{lib/locales → locales}/es.yml +2 -2
  75. data/{lib/locales → locales}/fr.yml +2 -2
  76. data/{lib/locales → locales}/hr.yml +2 -2
  77. data/{lib/locales → locales}/id.yml +2 -2
  78. data/{lib/locales → locales}/it.yml +2 -2
  79. data/{lib/locales → locales}/ja.yml +2 -2
  80. data/{lib/locales → locales}/km.yml +2 -2
  81. data/{lib/locales → locales}/ko.yml +3 -5
  82. data/{lib/locales → locales}/nb.yml +2 -2
  83. data/{lib/locales → locales}/nl.yml +2 -2
  84. data/{lib/locales → locales}/nn.yml +2 -2
  85. data/{lib/locales → locales}/pl.yml +2 -2
  86. data/{lib/locales → locales}/pt-BR.yml +2 -2
  87. data/{lib/locales → locales}/pt.yml +2 -2
  88. data/{lib/locales → locales}/ru.yml +7 -9
  89. data/{lib/locales → locales}/sr.yml +2 -2
  90. data/{lib/locales → locales}/sv-SE.yml +2 -2
  91. data/{lib/locales → locales}/sv.yml +2 -2
  92. data/{lib/locales → locales}/sw.yml +2 -2
  93. data/{lib/locales → locales}/ta.yml +2 -2
  94. data/{lib/locales → locales}/tr.yml +2 -2
  95. data/{lib/locales → locales}/uk.yml +2 -2
  96. data/{lib/locales → locales}/vi.yml +2 -2
  97. data/{lib/locales → locales}/zh-CN.yml +2 -2
  98. data/{lib/locales → locales}/zh-HK.yml +2 -2
  99. data/{lib/locales → locales}/zh-TW.yml +2 -2
  100. data/pkg/pagy-9.0.0.gem +0 -0
  101. metadata +75 -70
  102. data/lib/apps/calendar.ru +0 -2196
  103. data/lib/javascripts/pagy-dev.js +0 -112
  104. data/lib/javascripts/pagy-module.js +0 -111
  105. data/lib/javascripts/pagy.js +0 -1
  106. data/lib/pagy/calendar/helper.rb +0 -65
  107. data/lib/pagy/extras/foundation.rb +0 -93
  108. data/lib/pagy/extras/items.rb +0 -64
  109. data/lib/pagy/extras/materialize.rb +0 -97
  110. data/lib/pagy/extras/semantic.rb +0 -91
  111. data/lib/pagy/extras/uikit.rb +0 -96
  112. /data/{lib/javascripts/pagy-module.d.ts → javascripts/pagy.d.ts} +0 -0
  113. /data/{lib/stylesheets → stylesheets}/pagy.css +0 -0
  114. /data/{lib/stylesheets → stylesheets}/pagy.scss +0 -0
  115. /data/{lib/stylesheets → stylesheets}/pagy.tailwind.css +0 -0
data/lib/pagy.rb CHANGED
@@ -3,150 +3,126 @@
3
3
 
4
4
  require 'pathname'
5
5
 
6
- # Core class
6
+ # Top superclass: it should define only what's common to all the subclasses
7
7
  class Pagy
8
- VERSION = '8.0.0'
9
-
10
- # Root pathname to get the path of Pagy files like templates or dictionaries
8
+ VERSION = '9.0.0'
9
+
10
+ # Core default: constant for easy access, but mutable for customizable defaults
11
+ DEFAULT = { count_args: [:all], # rubocop:disable Style/MutableConstant
12
+ ends: true,
13
+ limit: 20,
14
+ outset: 0,
15
+ page: 1,
16
+ page_param: :page,
17
+ size: 7 } # AR friendly
18
+
19
+ # Gem root pathname to get the path of Pagy files stylesheets, javascripts, apps, locales, etc.
11
20
  def self.root
12
- @root ||= Pathname.new(__dir__).freeze
21
+ @root ||= Pathname.new(__dir__).parent.freeze
13
22
  end
14
23
 
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
- # backend/collection
22
- count_args: [:all], # AR friendly
23
- # backend/url
24
- params: {},
25
- page_param: :page,
26
- fragment: '',
27
- request_path: nil,
28
- # frontend/helpers
29
- anchor_string: nil }
30
-
31
- attr_reader :count, :page, :items, :vars, :pages, :last, :offset, :in, :from, :to, :prev, :next, :params, :request_path
32
-
33
- # Merge and validate the options, do some simple arithmetic and set the instance variables
34
- def initialize(vars)
35
- normalize_vars(vars)
36
- setup_vars(count: 0, page: 1, outset: 0)
37
- setup_items_var
38
- setup_pages_var
39
- setup_offset_var
40
- setup_params_var
41
- setup_request_path_var
42
- raise OverflowError.new(self, :page, "in 1..#{@last}", @page) if @page > @last
43
-
44
- @from = [@offset - @outset + 1, @count].min
45
- @to = [@offset - @outset + @items, @count].min
46
- @in = [@to - @from + 1, @count].min
47
- @prev = (@page - 1 unless @page == 1)
48
- @next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
49
- end
24
+ # Shared with Keyset
25
+ module SharedMethods
26
+ attr_reader :page, :limit, :vars
50
27
 
51
- # Return the array of page numbers and :gap items e.g. [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
52
- def series(size: @vars[:size], **_)
53
- series = []
54
- if size.is_a?(Array) && size.size == 4 && size.all? { |num| !num.negative? rescue false } # rubocop:disable Style/RescueModifier
55
- # This algorithm is up to ~5x faster and ~2.3x lighter than the previous one (pagy < 4.3)
56
- left_gap_start = 1 + size[0]
57
- left_gap_end = @page - size[1] - 1
58
- right_gap_start = @page + size[2] + 1
59
- right_gap_end = @last - size[3]
60
- left_gap_end = right_gap_end if left_gap_end > right_gap_end
61
- right_gap_start = left_gap_start if left_gap_start > right_gap_start
62
- start = 1
63
- if (left_gap_end - left_gap_start).positive?
64
- series.push(*start...left_gap_start, :gap)
65
- start = left_gap_end + 1
66
- end
67
- if (right_gap_end - right_gap_start).positive?
68
- series.push(*start...right_gap_start, :gap)
69
- start = right_gap_end + 1
28
+ # Validates and assign the passed vars: var must be present and value.to_i must be >= to min
29
+ def assign_and_check(name_min)
30
+ name_min.each do |name, min|
31
+ raise VariableError.new(self, name, ">= #{min}", @vars[name]) \
32
+ unless @vars[name]&.respond_to?(:to_i) && \
33
+ instance_variable_set(:"@#{name}", @vars[name].to_i) >= min
70
34
  end
71
- series.push(*start..@last)
72
- elsif size.is_a?(Integer) && size.positive? # only central series
73
- # The simplest and fastest algorithm
74
- size = @pages if size > @pages # reduce the max size to @pages
75
- left = ((size - 1) / 2.0).floor # left half might be 1 page shorter for even size
76
- start = if @page <= left # beginning pages
77
- 1
78
- elsif @page > @pages - (size - left) # end pages
79
- @pages - size + 1
80
- else # intermediate pages
81
- @page - left
82
- end
83
- series = (start..start + size - 1).to_a
84
- else
85
- return [] if size.empty?
86
-
87
- raise VariableError.new(self, :size, 'to be a single positive Integer or an Array of 4', size)
88
35
  end
89
- series[series.index(@page)] = @page.to_s
90
- series
91
- end
92
36
 
93
- # Label for any page. Allow the customization of the output (overridden by the calendar extra)
94
- def label_for(page)
95
- page.to_s
96
- end
37
+ # Assign @limit (overridden by the gearbox extra)
38
+ def assign_limit
39
+ assign_and_check(limit: 1)
40
+ end
97
41
 
98
- # Label for the current page. Allow the customization of the output (overridden by the calendar extra)
99
- def label
100
- @page.to_s
42
+ # Assign @vars
43
+ def assign_vars(default, vars)
44
+ @vars = { **default, **vars.delete_if { |k, v| default.key?(k) && (v.nil? || v == '') } }
45
+ end
101
46
  end
47
+ include SharedMethods
102
48
 
103
- protected
104
-
105
- # Apply defaults, cleanup blanks and set @vars
106
- def normalize_vars(vars)
107
- @vars = DEFAULT.merge(vars.delete_if { |k, v| DEFAULT.key?(k) && (v.nil? || v == '') })
108
- end
49
+ attr_reader :count, :from, :in, :last, :next, :offset, :prev, :to
50
+ alias pages last
109
51
 
110
- # Setup and validates the passed vars: var must be present and value.to_i must be >= to min
111
- def setup_vars(name_min)
112
- name_min.each do |name, min|
113
- raise VariableError.new(self, name, ">= #{min}", @vars[name]) \
114
- unless @vars[name]&.respond_to?(:to_i) && instance_variable_set(:"@#{name}", @vars[name].to_i) >= min
115
- end
52
+ # Merge and validate the options, do some simple arithmetic and set the instance variables
53
+ def initialize(**vars)
54
+ assign_vars(DEFAULT, vars)
55
+ assign_and_check(count: 0, page: 1, outset: 0)
56
+ assign_limit
57
+ assign_offset
58
+ assign_last
59
+ check_overflow
60
+ @from = [@offset - @outset + 1, @count].min
61
+ @to = [@offset - @outset + @limit, @count].min
62
+ @in = [@to - @from + 1, @count].min
63
+ assign_prev_and_next
116
64
  end
117
65
 
118
- # Setup @items (overridden by the gearbox extra)
119
- def setup_items_var
120
- setup_vars(items: 1)
66
+ # Setup @last (overridden by the gearbox extra)
67
+ def assign_last
68
+ @last = [(@count.to_f / @limit).ceil, 1].max
69
+ @last = @vars[:max_pages] if @vars[:max_pages] && @last > vars[:max_pages]
121
70
  end
122
71
 
123
- # Setup @pages and @last (overridden by the gearbox extra)
124
- def setup_pages_var
125
- @pages = @last = [(@count.to_f / @items).ceil, 1].max
72
+ # Assign @offset (overridden by the gearbox extra)
73
+ def assign_offset
74
+ @offset = (@limit * (@page - 1)) + @outset # may be already set from gear_box
126
75
  end
127
76
 
128
- # Setup @offset based on the :gearbox_items variable
129
- def setup_offset_var
130
- @offset = (@items * (@page - 1)) + @outset # may be already set from gear_box
77
+ # Assign @prev and @next
78
+ def assign_prev_and_next
79
+ @prev = (@page - 1 unless @page == 1)
80
+ @next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
131
81
  end
132
82
 
133
- # Setup and validate @params
134
- def setup_params_var
135
- raise VariableError.new(self, :params, 'must be a Hash or a Proc', @params) \
136
- unless (@params = @vars[:params]).is_a?(Hash) || @params.is_a?(Proc)
83
+ # Checks the @page <= @last
84
+ def check_overflow
85
+ raise OverflowError.new(self, :page, "in 1..#{@last}", @page) if @page > @last
137
86
  end
138
87
 
139
- def setup_request_path_var
140
- request_path = @vars[:request_path]
141
- return if request_path.to_s.empty?
88
+ # Label for the current page. Allow the customization of the output (overridden by the calendar extra)
89
+ def label = @page.to_s
142
90
 
143
- raise VariableError.new(self, :request_path, 'must be a bare path like "/foo"', request_path) \
144
- if !request_path.start_with?('/') || request_path.include?('?')
91
+ # Label for any page. Allow the customization of the output (overridden by the calendar extra)
92
+ def label_for(page) = page.to_s
145
93
 
146
- @request_path = request_path
94
+ # Return the array of page numbers and :gap e.g. [1, :gap, 8, "9", 10, :gap, 36]
95
+ def series(size: @vars[:size], **_)
96
+ raise VariableError.new(self, :size, 'to be an Integer >= 0', size) \
97
+ unless size.is_a?(Integer) && size >= 0
98
+ return [] if size.zero?
99
+
100
+ [].tap do |series|
101
+ if size >= @last
102
+ series.push(*1..@last)
103
+ else
104
+ left = ((size - 1) / 2.0).floor # left half might be 1 page shorter for even size
105
+ start = if @page <= left # beginning pages
106
+ 1
107
+ elsif @page > (@last - size + left) # end pages
108
+ @last - size + 1
109
+ else # intermediate pages
110
+ @page - left
111
+ end
112
+ series.push(*start...start + size)
113
+ # Set first and last pages plus gaps when needed, respecting the size
114
+ if vars[:ends] && size >= 7
115
+ series[0] = 1 unless series[0] == 1
116
+ series[1] = :gap unless series[1] == 2
117
+ series[-2] = :gap unless series[-2] == @last - 1
118
+ series[-1] = @last unless series[-1] == @last
119
+ end
120
+ end
121
+ series[series.index(@page)] = @page.to_s
122
+ end
147
123
  end
148
124
  end
149
125
 
150
- require 'pagy/backend'
151
- require 'pagy/frontend'
152
- require 'pagy/exceptions'
126
+ require_relative 'pagy/backend'
127
+ require_relative 'pagy/frontend'
128
+ require_relative 'pagy/exceptions'
@@ -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} لكل صفحة"
@@ -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} на старонцы"
@@ -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} на страница"
@@ -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"
@@ -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"
@@ -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} لە هەر پەڕێک"
@@ -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"
@@ -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
  da:
3
3
  pagy:
4
4
  aria_label:
5
- # please add a comment in the https://github.com/ddnexus/pagy/issues/583
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: "Side"
7
+ other: "Sider"
10
8
  prev: "Forrige"
11
9
  next: "Næste"
12
10
  prev: "&lt;"
@@ -20,4 +18,4 @@ da:
20
18
  single_page: "Viser %{count} %{item_name}"
21
19
  multiple_pages: "Viser %{item_name} %{from}-%{to} af %{count} totalt"
22
20
  combo_nav_js: "Side %{page_input} af %{pages}"
23
- items_selector_js: "Antal %{items_input} %{item_name} per side"
21
+ limit_selector_js: "Antal %{limit_input} %{item_name} per side"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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} 件ずつ表示"
@@ -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} ក្នុង ១ ទំព័រ"
@@ -1,10 +1,8 @@
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:
5
- # please add a comment in the https://github.com/ddnexus/pagy/issues/592
6
- # posting the translation of the following "Page"/"Pages" with the plurals for this locale
7
- nav: "Pages"
5
+ nav: "페이지"
8
6
  prev: "이전"
9
7
  next: "다음"
10
8
  prev: "&lt;"
@@ -16,4 +14,4 @@ ko:
16
14
  single_page: "%{count}개의 %{item_name} 표시됨"
17
15
  multiple_pages: "총 %{count}개의 %{item_name} 중 %{from}-%{to}"
18
16
  combo_nav_js: "총 %{pages} 중 %{page_input} 페이지"
19
- items_selector_js: "페이지 당 %{items_input}개 표시%"
17
+ limit_selector_js: "페이지 당 %{limit_input}개 표시%"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -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"
@@ -1,14 +1,12 @@
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:
5
- # please add a comment in the https://github.com/ddnexus/pagy/issues/599
6
- # posting the translation of the following "Page"/"Pages" with the plurals for this locale
7
- nav: "Pages"
8
- # one: ""
9
- # few: ""
10
- # many: ""
11
- # other: ""
5
+ nav:
6
+ one: "Страница"
7
+ few: "Страницы"
8
+ many: "Страниц"
9
+ other: "Страниц"
12
10
  prev: "Назад"
13
11
  next: "Вперёд"
14
12
  prev: "&lt;"
@@ -24,4 +22,4 @@ ru:
24
22
  single_page: "%{count} %{item_name}"
25
23
  multiple_pages: "Всего %{count} %{item_name}, показаны с %{from} по %{to}"
26
24
  combo_nav_js: "Страница %{page_input} из %{pages}"
27
- items_selector_js: "Показать %{items_input} %{item_name} на странице"
25
+ limit_selector_js: "Показать %{limit_input} %{item_name} на странице"