pagy 8.4.0 → 9.0.0
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.
- checksums.yaml +4 -4
- data/apps/calendar.ru +682 -2137
- data/apps/demo.ru +17 -13
- data/apps/keyset_ar.ru +236 -0
- data/apps/keyset_s.ru +238 -0
- data/apps/rails.ru +19 -15
- data/apps/repro.ru +17 -14
- data/apps/tmp/calendar.sqlite3 +0 -0
- data/apps/tmp/calendar.sqlite3-shm +0 -0
- data/apps/tmp/calendar.sqlite3-wal +0 -0
- data/apps/tmp/local_secret.txt +1 -0
- data/apps/tmp/pagy-keyset-ar.sqlite3 +0 -0
- data/apps/tmp/pagy-keyset-ar.sqlite3-shm +0 -0
- data/apps/tmp/pagy-keyset-ar.sqlite3-wal +0 -0
- data/apps/tmp/pagy-keyset-s.sqlite3 +0 -0
- data/bin/pagy +17 -12
- data/config/pagy.rb +32 -33
- data/javascripts/pagy-module.js +94 -107
- data/javascripts/pagy.js +4 -1
- data/javascripts/pagy.min.js +4 -0
- data/javascripts/pagy.min.js.map +10 -0
- data/javascripts/pagy.mjs +100 -0
- data/lib/optimist.rb +1 -1
- data/lib/pagy/b64.rb +33 -0
- data/lib/pagy/backend.rb +21 -17
- data/lib/pagy/calendar/day.rb +4 -3
- data/lib/pagy/calendar/month.rb +4 -3
- data/lib/pagy/calendar/quarter.rb +4 -3
- data/lib/pagy/calendar/unit.rb +103 -0
- data/lib/pagy/calendar/week.rb +3 -3
- data/lib/pagy/calendar/year.rb +4 -3
- data/lib/pagy/calendar.rb +54 -97
- data/lib/pagy/countless.rb +15 -16
- data/lib/pagy/extras/arel.rb +8 -10
- data/lib/pagy/extras/array.rb +4 -6
- data/lib/pagy/extras/bootstrap.rb +5 -5
- data/lib/pagy/extras/bulma.rb +10 -7
- data/lib/pagy/extras/calendar.rb +34 -5
- data/lib/pagy/extras/countless.rb +6 -13
- data/lib/pagy/extras/elasticsearch_rails.rb +15 -15
- data/lib/pagy/extras/gearbox.rb +26 -26
- data/lib/pagy/extras/headers.rb +25 -24
- data/lib/pagy/extras/i18n.rb +1 -1
- data/lib/pagy/extras/js_tools.rb +9 -9
- data/lib/pagy/extras/jsonapi.rb +26 -16
- data/lib/pagy/extras/keyset.rb +26 -0
- data/lib/pagy/extras/limit.rb +63 -0
- data/lib/pagy/extras/meilisearch.rb +11 -11
- data/lib/pagy/extras/metadata.rb +6 -2
- data/lib/pagy/extras/overflow.rb +9 -8
- data/lib/pagy/extras/pagy.rb +16 -16
- data/lib/pagy/extras/searchkick.rb +11 -11
- data/lib/pagy/extras/size.rb +40 -0
- data/lib/pagy/extras/standalone.rb +6 -6
- data/lib/pagy/extras/trim.rb +3 -3
- data/lib/pagy/frontend.rb +38 -36
- data/lib/pagy/i18n.rb +1 -1
- data/lib/pagy/keyset/active_record.rb +38 -0
- data/lib/pagy/keyset/sequel.rb +51 -0
- data/lib/pagy/keyset.rb +99 -0
- data/lib/pagy/url_helpers.rb +5 -5
- data/lib/pagy.rb +92 -94
- data/locales/ar.yml +9 -10
- data/locales/be.yml +2 -2
- data/locales/bg.yml +2 -2
- data/locales/bs.yml +2 -2
- data/locales/ca.yml +5 -7
- data/locales/ckb.yml +2 -2
- data/locales/cs.yml +2 -2
- data/locales/da.yml +2 -2
- data/locales/de.yml +2 -2
- data/locales/en.yml +2 -2
- data/locales/es.yml +2 -2
- data/locales/fr.yml +2 -2
- data/locales/hr.yml +2 -2
- data/locales/id.yml +2 -2
- data/locales/it.yml +2 -2
- data/locales/ja.yml +2 -2
- data/locales/km.yml +2 -2
- data/locales/ko.yml +2 -2
- data/locales/nb.yml +2 -2
- data/locales/nl.yml +2 -2
- data/locales/nn.yml +2 -2
- data/locales/pl.yml +2 -2
- data/locales/pt-BR.yml +2 -2
- data/locales/pt.yml +2 -2
- data/locales/ru.yml +2 -2
- data/locales/sr.yml +2 -2
- data/locales/sv-SE.yml +2 -2
- data/locales/sv.yml +2 -2
- data/locales/sw.yml +2 -2
- data/locales/ta.yml +2 -2
- data/locales/tr.yml +2 -2
- data/locales/uk.yml +2 -2
- data/locales/vi.yml +2 -2
- data/locales/zh-CN.yml +2 -2
- data/locales/zh-HK.yml +2 -2
- data/locales/zh-TW.yml +2 -2
- data/pkg/pagy-9.0.0.gem +0 -0
- metadata +27 -17
- data/javascripts/pagy-dev.js +0 -114
- data/lib/pagy/calendar/helper.rb +0 -65
- data/lib/pagy/extras/foundation.rb +0 -95
- data/lib/pagy/extras/items.rb +0 -64
- data/lib/pagy/extras/materialize.rb +0 -100
- data/lib/pagy/extras/semantic.rb +0 -94
- data/lib/pagy/extras/uikit.rb +0 -98
- /data/javascripts/{pagy-module.d.ts → pagy.d.ts} +0 -0
data/lib/pagy/keyset.rb
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# See Pagy API documentation: https://ddnexus.github.io/pagy/docs/api/keyset
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require 'json'
|
|
5
|
+
require_relative 'b64'
|
|
6
|
+
|
|
7
|
+
class Pagy
|
|
8
|
+
# Implement wicked-fast keyset pagination for big data
|
|
9
|
+
class Keyset
|
|
10
|
+
class TypeError < ::TypeError; end
|
|
11
|
+
|
|
12
|
+
include SharedMethods
|
|
13
|
+
|
|
14
|
+
# Pick the right adapter for the set
|
|
15
|
+
def self.new(set, **vars)
|
|
16
|
+
if self == Pagy::Keyset
|
|
17
|
+
if defined?(::ActiveRecord) && set.is_a?(::ActiveRecord::Relation)
|
|
18
|
+
ActiveRecord
|
|
19
|
+
elsif defined?(::Sequel) && set.is_a?(::Sequel::Dataset)
|
|
20
|
+
Sequel
|
|
21
|
+
else
|
|
22
|
+
raise TypeError, "expected set to be an instance of ActiveRecord::Relation or Sequel::Dataset; got #{set.class}"
|
|
23
|
+
end.new(set, **vars)
|
|
24
|
+
else
|
|
25
|
+
allocate.tap { |instance| instance.send(:initialize, set, **vars) }
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
attr_reader :latest # Other readers from SharedMethods
|
|
30
|
+
|
|
31
|
+
def initialize(set, **vars)
|
|
32
|
+
default = DEFAULT.slice(:limit, :page_param, # from pagy
|
|
33
|
+
:headers, # from headers extra
|
|
34
|
+
:jsonapi, # from jsonapi extra
|
|
35
|
+
:limit_param, :limit_max, :limit_extra) # from limit_extra
|
|
36
|
+
assign_vars({ **default, page: nil }, vars)
|
|
37
|
+
assign_limit
|
|
38
|
+
@set = set
|
|
39
|
+
@page = @vars[:page]
|
|
40
|
+
@keyset = extract_keyset
|
|
41
|
+
raise InternalError, 'the set must be ordered' if @keyset.empty?
|
|
42
|
+
return unless @page
|
|
43
|
+
|
|
44
|
+
latest = JSON.parse(B64.urlsafe_decode(@page)).transform_keys(&:to_sym)
|
|
45
|
+
@latest = @vars[:typecast_latest]&.(latest) || typecast_latest(latest)
|
|
46
|
+
raise InternalError, 'page and keyset are not consistent' \
|
|
47
|
+
unless @latest.keys == @keyset.keys
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Return the next page
|
|
51
|
+
def next
|
|
52
|
+
records
|
|
53
|
+
return unless @more
|
|
54
|
+
|
|
55
|
+
@next ||= B64.urlsafe_encode(latest_from(@records.last).to_json)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Retrieve the array of records for the current page
|
|
59
|
+
def records
|
|
60
|
+
@records ||= begin
|
|
61
|
+
@set = apply_select if select?
|
|
62
|
+
@set = @vars[:after_latest]&.(@set, @latest) || after_latest if @latest
|
|
63
|
+
records = @set.limit(@limit + 1).to_a
|
|
64
|
+
@more = records.size > @limit && !records.pop.nil?
|
|
65
|
+
records
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
protected
|
|
70
|
+
|
|
71
|
+
# Prepare the literal query to filter out the already retrieved records
|
|
72
|
+
def after_latest_query
|
|
73
|
+
operator = { asc: '>', desc: '<' }
|
|
74
|
+
directions = @keyset.values
|
|
75
|
+
if @vars[:row_comparison]
|
|
76
|
+
# Row comparison: check if your DB supports it (especially if you have mixed order rows)
|
|
77
|
+
columns = @keyset.keys
|
|
78
|
+
placeholders = columns.map { |column| ":#{column}" }.join(', ')
|
|
79
|
+
"( #{columns.join(', ')} ) #{operator[directions.first]} ( #{placeholders} )"
|
|
80
|
+
else
|
|
81
|
+
# Generic comparison: works for keysets ordered in mixed or same directions
|
|
82
|
+
keyset = @keyset.to_a
|
|
83
|
+
where = []
|
|
84
|
+
until keyset.empty?
|
|
85
|
+
last_column, last_direction = keyset.pop
|
|
86
|
+
query = +'( '
|
|
87
|
+
query << (keyset.map { |column, _d| "#{column} = :#{column}" } \
|
|
88
|
+
<< "#{last_column} #{operator[last_direction]} :#{last_column}").join(' AND ')
|
|
89
|
+
query << ' )'
|
|
90
|
+
where << query
|
|
91
|
+
end
|
|
92
|
+
where.join(' OR ')
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
require_relative 'keyset/active_record'
|
|
99
|
+
require_relative 'keyset/sequel'
|
data/lib/pagy/url_helpers.rb
CHANGED
|
@@ -6,21 +6,21 @@ class Pagy
|
|
|
6
6
|
# Return the URL for the page, relying on the params method and Rack by default.
|
|
7
7
|
# It supports all Rack-based frameworks (Sinatra, Padrino, Rails, ...).
|
|
8
8
|
# For non-rack environments you can use the standalone extra
|
|
9
|
-
def pagy_url_for(pagy, page, absolute: false, **_)
|
|
9
|
+
def pagy_url_for(pagy, page, absolute: false, fragment: nil, **_)
|
|
10
10
|
vars = pagy.vars
|
|
11
11
|
query_params = request.GET.clone
|
|
12
12
|
query_params.merge!(vars[:params].transform_keys(&:to_s)) if vars[:params].is_a?(Hash)
|
|
13
13
|
pagy_set_query_params(page, vars, query_params)
|
|
14
14
|
query_params = vars[:params].(query_params) if vars[:params].is_a?(Proc)
|
|
15
15
|
query_string = "?#{Rack::Utils.build_nested_query(query_params)}"
|
|
16
|
-
"#{request.base_url if absolute}#{vars[:request_path] || request.path}#{query_string}#{
|
|
16
|
+
"#{request.base_url if absolute}#{vars[:request_path] || request.path}#{query_string}#{fragment}"
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
# Add the page and
|
|
19
|
+
# Add the page and limit params
|
|
20
20
|
# Overridable by the jsonapi extra
|
|
21
21
|
def pagy_set_query_params(page, vars, query_params)
|
|
22
|
-
query_params[vars[:page_param].to_s] = page
|
|
23
|
-
query_params[vars[:
|
|
22
|
+
query_params[vars[:page_param].to_s] = page if page
|
|
23
|
+
query_params[vars[:limit_param].to_s] = vars[:limit] if vars[:limit_extra]
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
data/lib/pagy.rb
CHANGED
|
@@ -3,125 +3,123 @@
|
|
|
3
3
|
|
|
4
4
|
require 'pathname'
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Top superclass: it should define only what's common to all the subclasses
|
|
7
7
|
class Pagy
|
|
8
|
-
VERSION = '
|
|
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
|
|
9
18
|
|
|
10
19
|
# Gem root pathname to get the path of Pagy files stylesheets, javascripts, apps, locales, etc.
|
|
11
20
|
def self.root
|
|
12
21
|
@root ||= Pathname.new(__dir__).parent.freeze
|
|
13
22
|
end
|
|
14
23
|
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
# Shared with Keyset
|
|
25
|
+
module SharedMethods
|
|
26
|
+
attr_reader :page, :limit, :vars
|
|
27
|
+
|
|
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
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Assign @limit (overridden by the gearbox extra)
|
|
38
|
+
def assign_limit
|
|
39
|
+
assign_and_check(limit: 1)
|
|
40
|
+
end
|
|
23
41
|
|
|
24
|
-
|
|
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
|
|
46
|
+
end
|
|
47
|
+
include SharedMethods
|
|
48
|
+
|
|
49
|
+
attr_reader :count, :from, :in, :last, :next, :offset, :prev, :to
|
|
25
50
|
alias pages last
|
|
26
51
|
|
|
27
52
|
# Merge and validate the options, do some simple arithmetic and set the instance variables
|
|
28
|
-
def initialize(vars)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
setup_offset_var
|
|
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
|
|
36
60
|
@from = [@offset - @outset + 1, @count].min
|
|
37
|
-
@to = [@offset - @outset + @
|
|
61
|
+
@to = [@offset - @outset + @limit, @count].min
|
|
38
62
|
@in = [@to - @from + 1, @count].min
|
|
39
|
-
|
|
40
|
-
@next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
|
|
63
|
+
assign_prev_and_next
|
|
41
64
|
end
|
|
42
65
|
|
|
43
|
-
#
|
|
44
|
-
def
|
|
45
|
-
|
|
46
|
-
|
|
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
|
|
83
|
-
end
|
|
84
|
-
|
|
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
|
|
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]
|
|
88
70
|
end
|
|
89
71
|
|
|
90
|
-
#
|
|
91
|
-
def
|
|
92
|
-
@page
|
|
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
|
|
93
75
|
end
|
|
94
76
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
@vars = DEFAULT.merge(vars.delete_if { |k, v| DEFAULT.key?(k) && (v.nil? || v == '') })
|
|
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
|
|
100
81
|
end
|
|
101
82
|
|
|
102
|
-
#
|
|
103
|
-
def
|
|
104
|
-
|
|
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
|
|
83
|
+
# Checks the @page <= @last
|
|
84
|
+
def check_overflow
|
|
85
|
+
raise OverflowError.new(self, :page, "in 1..#{@last}", @page) if @page > @last
|
|
108
86
|
end
|
|
109
87
|
|
|
110
|
-
#
|
|
111
|
-
def
|
|
112
|
-
setup_vars(items: 1)
|
|
113
|
-
end
|
|
88
|
+
# Label for the current page. Allow the customization of the output (overridden by the calendar extra)
|
|
89
|
+
def label = @page.to_s
|
|
114
90
|
|
|
115
|
-
#
|
|
116
|
-
def
|
|
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
|
|
91
|
+
# Label for any page. Allow the customization of the output (overridden by the calendar extra)
|
|
92
|
+
def label_for(page) = page.to_s
|
|
121
93
|
|
|
122
|
-
#
|
|
123
|
-
def
|
|
124
|
-
|
|
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
|
|
125
123
|
end
|
|
126
124
|
end
|
|
127
125
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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: "<"
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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: "<"
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
21
|
+
limit_selector_js: "Vis %{limit_input} %{item_name} per side"
|