pagy 5.7.5 → 8.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (153) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/apps/calendar.ru +745 -0
  4. data/apps/demo.ru +435 -0
  5. data/apps/rails.ru +213 -0
  6. data/apps/repro.ru +177 -0
  7. data/apps/tmp/calendar.sqlite3 +0 -0
  8. data/apps/tmp/calendar.sqlite3-shm +0 -0
  9. data/apps/tmp/calendar.sqlite3-wal +0 -0
  10. data/apps/tmp/local_secret.txt +1 -0
  11. data/bin/pagy +100 -0
  12. data/{lib/config → config}/pagy.rb +72 -96
  13. data/javascripts/pagy-module.js +100 -0
  14. data/javascripts/pagy.d.ts +5 -0
  15. data/javascripts/pagy.js +4 -0
  16. data/javascripts/pagy.min.js +4 -0
  17. data/javascripts/pagy.min.js.map +10 -0
  18. data/javascripts/pagy.mjs +100 -0
  19. data/lib/optimist.rb +1022 -0
  20. data/lib/pagy/backend.rb +16 -4
  21. data/lib/pagy/calendar/day.rb +22 -10
  22. data/lib/pagy/calendar/month.rb +35 -9
  23. data/lib/pagy/calendar/quarter.rb +36 -10
  24. data/lib/pagy/calendar/unit.rb +106 -0
  25. data/lib/pagy/calendar/week.rb +16 -16
  26. data/lib/pagy/calendar/year.rb +15 -9
  27. data/lib/pagy/calendar.rb +60 -68
  28. data/lib/pagy/console.rb +3 -3
  29. data/lib/pagy/countless.rb +17 -12
  30. data/lib/pagy/exceptions.rb +1 -1
  31. data/lib/pagy/extras/arel.rb +2 -2
  32. data/lib/pagy/extras/array.rb +2 -2
  33. data/lib/pagy/extras/bootstrap.rb +57 -53
  34. data/lib/pagy/extras/bulma.rb +53 -57
  35. data/lib/pagy/extras/calendar.rb +54 -37
  36. data/lib/pagy/extras/countless.rb +3 -3
  37. data/lib/pagy/extras/elasticsearch_rails.rb +12 -11
  38. data/lib/pagy/extras/foundation.rb +59 -54
  39. data/lib/pagy/extras/gearbox.rb +32 -19
  40. data/lib/pagy/extras/headers.rb +11 -11
  41. data/lib/pagy/extras/i18n.rb +5 -5
  42. data/lib/pagy/extras/items.rb +34 -24
  43. data/lib/pagy/extras/{frontend_helpers.rb → js_tools.rb} +24 -24
  44. data/lib/pagy/extras/jsonapi.rb +79 -0
  45. data/lib/pagy/extras/materialize.rb +63 -47
  46. data/lib/pagy/extras/meilisearch.rb +26 -22
  47. data/lib/pagy/extras/metadata.rb +13 -9
  48. data/lib/pagy/extras/overflow.rb +13 -10
  49. data/lib/pagy/extras/pagy.rb +82 -0
  50. data/lib/pagy/extras/searchkick.rb +12 -11
  51. data/lib/pagy/extras/semantic.rb +57 -45
  52. data/lib/pagy/extras/size.rb +40 -0
  53. data/lib/pagy/extras/standalone.rb +12 -16
  54. data/lib/pagy/extras/trim.rb +13 -13
  55. data/lib/pagy/extras/uikit.rb +60 -46
  56. data/lib/pagy/frontend.rb +62 -45
  57. data/lib/pagy/i18n.rb +4 -3
  58. data/lib/pagy/url_helpers.rb +13 -25
  59. data/lib/pagy.rb +61 -59
  60. data/locales/ar.yml +28 -0
  61. data/locales/be.yml +25 -0
  62. data/locales/bg.yml +21 -0
  63. data/locales/bs.yml +25 -0
  64. data/locales/ca.yml +21 -0
  65. data/locales/ckb.yml +18 -0
  66. data/locales/cs.yml +23 -0
  67. data/locales/da.yml +21 -0
  68. data/locales/de.yml +21 -0
  69. data/locales/en.yml +21 -0
  70. data/locales/es.yml +21 -0
  71. data/locales/fr.yml +21 -0
  72. data/locales/hr.yml +25 -0
  73. data/locales/id.yml +19 -0
  74. data/locales/it.yml +21 -0
  75. data/locales/ja.yml +19 -0
  76. data/locales/km.yml +19 -0
  77. data/locales/ko.yml +17 -0
  78. data/locales/nb.yml +21 -0
  79. data/locales/nl.yml +21 -0
  80. data/locales/nn.yml +21 -0
  81. data/locales/pl.yml +25 -0
  82. data/locales/pt-BR.yml +21 -0
  83. data/locales/pt.yml +21 -0
  84. data/locales/ru.yml +25 -0
  85. data/locales/sr.yml +25 -0
  86. data/locales/sv-SE.yml +21 -0
  87. data/locales/sv.yml +21 -0
  88. data/locales/sw.yml +23 -0
  89. data/locales/ta.yml +23 -0
  90. data/locales/tr.yml +19 -0
  91. data/locales/uk.yml +25 -0
  92. data/locales/vi.yml +17 -0
  93. data/locales/zh-CN.yml +19 -0
  94. data/locales/zh-HK.yml +19 -0
  95. data/locales/zh-TW.yml +19 -0
  96. data/stylesheets/pagy.css +46 -0
  97. data/stylesheets/pagy.scss +48 -0
  98. data/stylesheets/pagy.tailwind.css +21 -0
  99. metadata +79 -66
  100. data/lib/javascripts/pagy-dev.js +0 -118
  101. data/lib/javascripts/pagy-module.d.ts +0 -30
  102. data/lib/javascripts/pagy-module.js +0 -117
  103. data/lib/javascripts/pagy.js +0 -1
  104. data/lib/locales/ar.yml +0 -26
  105. data/lib/locales/bg.yml +0 -22
  106. data/lib/locales/bs.yml +0 -24
  107. data/lib/locales/ca.yml +0 -22
  108. data/lib/locales/cs.yml +0 -22
  109. data/lib/locales/da.yml +0 -22
  110. data/lib/locales/de.yml +0 -22
  111. data/lib/locales/en.yml +0 -22
  112. data/lib/locales/es.yml +0 -22
  113. data/lib/locales/fr.yml +0 -22
  114. data/lib/locales/hr.yml +0 -24
  115. data/lib/locales/id.yml +0 -20
  116. data/lib/locales/it.yml +0 -22
  117. data/lib/locales/ja.yml +0 -20
  118. data/lib/locales/km.yml +0 -19
  119. data/lib/locales/ko.yml +0 -20
  120. data/lib/locales/nb.yml +0 -22
  121. data/lib/locales/nl.yml +0 -22
  122. data/lib/locales/pl.yml +0 -24
  123. data/lib/locales/pt-BR.yml +0 -22
  124. data/lib/locales/pt.yml +0 -22
  125. data/lib/locales/ru.yml +0 -24
  126. data/lib/locales/sr.yml +0 -23
  127. data/lib/locales/sv-SE.yml +0 -23
  128. data/lib/locales/sv.yml +0 -23
  129. data/lib/locales/sw.yml +0 -22
  130. data/lib/locales/ta.yml +0 -22
  131. data/lib/locales/tr.yml +0 -20
  132. data/lib/locales/uk.yml +0 -24
  133. data/lib/locales/zh-CN.yml +0 -20
  134. data/lib/locales/zh-HK.yml +0 -20
  135. data/lib/locales/zh-TW.yml +0 -20
  136. data/lib/pagy/calendar/month_mixin.rb +0 -49
  137. data/lib/pagy/extras/navs.rb +0 -63
  138. data/lib/pagy/extras/support.rb +0 -54
  139. data/lib/templates/bootstrap_nav.html.erb +0 -24
  140. data/lib/templates/bootstrap_nav.html.haml +0 -34
  141. data/lib/templates/bootstrap_nav.html.slim +0 -34
  142. data/lib/templates/bulma_nav.html.erb +0 -24
  143. data/lib/templates/bulma_nav.html.haml +0 -32
  144. data/lib/templates/bulma_nav.html.slim +0 -32
  145. data/lib/templates/foundation_nav.html.erb +0 -24
  146. data/lib/templates/foundation_nav.html.haml +0 -34
  147. data/lib/templates/foundation_nav.html.slim +0 -34
  148. data/lib/templates/nav.html.erb +0 -22
  149. data/lib/templates/nav.html.haml +0 -30
  150. data/lib/templates/nav.html.slim +0 -29
  151. data/lib/templates/uikit_nav.html.erb +0 -15
  152. data/lib/templates/uikit_nav.html.haml +0 -28
  153. data/lib/templates/uikit_nav.html.slim +0 -28
data/lib/pagy.rb CHANGED
@@ -1,82 +1,82 @@
1
- # See Pagy API documentation: https://ddnexus.github.io/pagy/api/pagy
1
+ # See Pagy API documentation: https://ddnexus.github.io/pagy/docs/api/pagy
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'pathname'
5
5
 
6
6
  # Core class
7
7
  class Pagy
8
- VERSION = '5.7.5'
8
+ VERSION = '8.6.2'
9
9
 
10
- # Root pathname to get the path of Pagy files like templates or dictionaries
10
+ # Gem root pathname to get the path of Pagy files stylesheets, javascripts, apps, locales, etc.
11
11
  def self.root
12
- @root ||= Pathname.new(__dir__).freeze
12
+ @root ||= Pathname.new(__dir__).parent.freeze
13
13
  end
14
14
 
15
- # Default core vars: constant for easy access, but mutable for customizable defaults
15
+ # Core default: constant for easy access, but mutable for customizable defaults
16
16
  DEFAULT = { page: 1, # rubocop:disable Style/MutableConstant
17
17
  items: 20,
18
18
  outset: 0,
19
- size: [1, 4, 4, 1],
20
- page_param: :page,
21
- params: {},
22
- fragment: '',
23
- link_extra: '',
24
- i18n_key: 'pagy.item_name',
25
- cycle: false }
19
+ size: 7,
20
+ ends: true,
21
+ count_args: [:all], # AR friendly
22
+ page_param: :page }
26
23
 
27
- attr_reader :count, :page, :items, :vars, :pages, :last, :offset, :in, :from, :to, :prev, :next, :params
24
+ attr_reader :count, :page, :items, :vars, :last, :offset, :in, :from, :to, :prev, :next
25
+ alias pages last
28
26
 
29
27
  # Merge and validate the options, do some simple arithmetic and set the instance variables
30
28
  def initialize(vars)
31
29
  normalize_vars(vars)
32
30
  setup_vars(count: 0, page: 1, outset: 0)
33
31
  setup_items_var
34
- setup_pages_var
35
- setup_params_var
32
+ setup_offset_var
33
+ setup_last_var
36
34
  raise OverflowError.new(self, :page, "in 1..#{@last}", @page) if @page > @last
37
35
 
38
- @offset = (@items * (@page - 1)) + @outset
39
- @from = [@offset - @outset + 1, @count].min
40
- @to = [@offset - @outset + @items, @count].min
41
- @in = [@to - @from + 1, @count].min
42
- @prev = (@page - 1 unless @page == 1)
43
- @next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
36
+ @from = [@offset - @outset + 1, @count].min
37
+ @to = [@offset - @outset + @items, @count].min
38
+ @in = [@to - @from + 1, @count].min
39
+ @prev = (@page - 1 unless @page == 1)
40
+ @next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
44
41
  end
45
42
 
46
- # Return the array of page numbers and :gap items e.g. [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
43
+ # Return the array of page numbers and :gap items e.g. [1, :gap, 8, "9", 10, :gap, 36]
47
44
  def series(size: @vars[:size], **_)
48
- return [] if size.empty?
49
- raise VariableError.new(self, :size, 'to contain 4 items >= 0', size) \
50
- unless size.is_a?(Array) && size.size == 4 && size.all? { |num| !num.negative? rescue false } # rubocop:disable Style/RescueModifier
51
-
52
- # This algorithm is up to ~5x faster and ~2.3x lighter than the previous one (pagy < 4.3)
53
- left_gap_start = 1 + size[0] # rubocop:disable Layout/ExtraSpacing, Layout/SpaceAroundOperators
54
- left_gap_end = @page - size[1] - 1
55
- right_gap_start = @page + size[2] + 1
56
- right_gap_end = @last - size[3]
57
- left_gap_end = right_gap_end if left_gap_end > right_gap_end
58
- right_gap_start = left_gap_start if left_gap_start > right_gap_start
59
- series = []
60
- start = 1
61
- if (left_gap_end - left_gap_start).positive?
62
- series.push(*start...left_gap_start, :gap)
63
- start = left_gap_end + 1
45
+ raise VariableError.new(self, :size, 'to be an Integer >= 0', size) \
46
+ unless size.is_a?(Integer) && size >= 0
47
+ return [] if size.zero?
48
+
49
+ [].tap do |series|
50
+ if size >= @last
51
+ series.push(*1..@last)
52
+ else
53
+ left = ((size - 1) / 2.0).floor # left half might be 1 page shorter for even size
54
+ start = if @page <= left # beginning pages
55
+ 1
56
+ elsif @page > (@last - size + left) # end pages
57
+ @last - size + 1
58
+ else # intermediate pages
59
+ @page - left
60
+ end
61
+ series.push(*start...start + size)
62
+ # Set first and last pages plus gaps when needed, respecting the size
63
+ if vars[:ends] && size >= 7
64
+ series[0] = 1 unless series[0] == 1
65
+ series[1] = :gap unless series[1] == 2
66
+ series[-2] = :gap unless series[-2] == @last - 1
67
+ series[-1] = @last unless series[-1] == @last
68
+ end
69
+ end
70
+ series[series.index(@page)] = @page.to_s
64
71
  end
65
- if (right_gap_end - right_gap_start).positive?
66
- series.push(*start...right_gap_start, :gap)
67
- start = right_gap_end + 1
68
- end
69
- series.push(*start..@last)
70
- series[series.index(@page)] = @page.to_s
71
- series
72
72
  end
73
73
 
74
- # Allow the customization of the output (overridden by the calendar extra)
74
+ # Label for any page. Allow the customization of the output (overridden by the calendar extra)
75
75
  def label_for(page)
76
76
  page.to_s
77
77
  end
78
78
 
79
- # Allow the customization of the output (overridden by the calendar extra)
79
+ # Label for the current page. Allow the customization of the output (overridden by the calendar extra)
80
80
  def label
81
81
  @page.to_s
82
82
  end
@@ -92,27 +92,29 @@ class Pagy
92
92
  def setup_vars(name_min)
93
93
  name_min.each do |name, min|
94
94
  raise VariableError.new(self, name, ">= #{min}", @vars[name]) \
95
- unless @vars[name] && instance_variable_set(:"@#{name}", @vars[name].to_i) >= min
95
+ unless @vars[name]&.respond_to?(:to_i) && instance_variable_set(:"@#{name}", @vars[name].to_i) >= min
96
96
  end
97
97
  end
98
98
 
99
- # Setup and validate the items (overridden by the gearbox extra)
99
+ # Setup @items (overridden by the gearbox extra)
100
100
  def setup_items_var
101
101
  setup_vars(items: 1)
102
102
  end
103
103
 
104
- # Setup and validates the pages (overridden by the gearbox extra)
105
- def setup_pages_var
106
- @pages = @last = [(@count.to_f / @items).ceil, 1].max
104
+ # Setup @offset (overridden by the gearbox extra)
105
+ def setup_offset_var
106
+ @offset = (@items * (@page - 1)) + @outset # may be already set from gear_box
107
107
  end
108
108
 
109
- # Setup and validates the params
110
- def setup_params_var
111
- raise VariableError.new(self, :params, 'must be a Hash or a Proc', @params) \
112
- unless (@params = @vars[:params]).is_a?(Hash) || @params.is_a?(Proc)
109
+ # Setup @last (overridden by the gearbox extra)
110
+ def setup_last_var
111
+ @last = [(@count.to_f / @items).ceil, 1].max
112
+ @last = vars[:max_pages] if vars[:max_pages] && @last > vars[:max_pages]
113
113
  end
114
+ alias setup_pages_var setup_last_var
114
115
  end
115
116
 
116
- require 'pagy/backend'
117
- require 'pagy/frontend'
118
- require 'pagy/exceptions'
117
+ require_relative 'pagy/extras/size' # will be opt in in v9.0
118
+ require_relative 'pagy/backend'
119
+ require_relative 'pagy/frontend'
120
+ require_relative 'pagy/exceptions'
data/locales/ar.yml ADDED
@@ -0,0 +1,28 @@
1
+ # :arabic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ ar:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ zero: "لا يوجد صفحات"
7
+ one: "صفحة"
8
+ two: "صفحتين"
9
+ few: "صفحات"
10
+ many: "صفحات"
11
+ prev: "السابق"
12
+ next: "التالي"
13
+ prev: "&lt;"
14
+ next: "&gt;"
15
+ gap: "&hellip;"
16
+ item_name:
17
+ zero: "صفر"
18
+ one: "عنصر"
19
+ two: "عنصرين"
20
+ few: "قليل"
21
+ many: "كثير"
22
+ other: "عناصر"
23
+ info:
24
+ no_items: "لا يوجد %{item_name}"
25
+ single_page: "عرض %{count} %{item_name}"
26
+ multiple_pages: "عرض %{item_name} %{from}-%{to} من اجمالي %{count}"
27
+ combo_nav_js: "الصفحة %{page_input} من %{pages}"
28
+ items_selector_js: "عرض %{items_input} %{item_name} لكل صفحة"
data/locales/be.yml ADDED
@@ -0,0 +1,25 @@
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ be:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Старонка"
7
+ few: "Старонкi"
8
+ many: "Старонкi"
9
+ other: "Старонкi"
10
+ prev: "Назад"
11
+ next: "Наперад"
12
+ prev: "&lt;"
13
+ next: "&gt;"
14
+ gap: "&hellip;"
15
+ item_name:
16
+ one: "запіс"
17
+ few: "запісы"
18
+ many: "запісаў"
19
+ other: "запісаў"
20
+ info:
21
+ no_items: "Пакуль %{item_name} няма"
22
+ single_page: "%{count} %{item_name}"
23
+ multiple_pages: "Усяго %{count} %{item_name}, паказаны з %{from} па %{to}"
24
+ combo_nav_js: "Старонка %{page_input} з %{pages}"
25
+ items_selector_js: "Паказаць %{items_input} %{item_name} на старонцы"
data/locales/bg.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ bg:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Страница"
7
+ other: "Страници"
8
+ prev: "Предишна"
9
+ next: "Следваща"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "резултат"
15
+ other: "резултати"
16
+ info:
17
+ no_items: "Няма намерени %{item_name}"
18
+ single_page: "Показани са %{count} %{item_name}"
19
+ multiple_pages: "Показани са %{item_name} %{from}-%{to} от %{count} общо"
20
+ combo_nav_js: "Страница %{page_input} от %{pages}"
21
+ items_selector_js: "Покажи %{items_input} %{item_name} на страница"
data/locales/bs.yml ADDED
@@ -0,0 +1,25 @@
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ bs:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Stranica"
7
+ few: "Stranice"
8
+ many: "Stranica"
9
+ other: "Stranice"
10
+ prev: "Prethodna"
11
+ next: "Sljedeća"
12
+ prev: "&lt;"
13
+ next: "&gt;"
14
+ gap: "&hellip;"
15
+ item_name:
16
+ one: "stavka"
17
+ few: "stavke"
18
+ many: "stavki"
19
+ other: "stavki"
20
+ info:
21
+ no_items: "Nije pronađena %{item_name}"
22
+ single_page: "Prikazuje se %{count} %{item_name}"
23
+ multiple_pages: "Prikaz %{item_name} %{from}-%{to} od %{count} ukupno"
24
+ combo_nav_js: "Stranica %{page_input} od %{pages}"
25
+ items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
data/locales/ca.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ ca:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Pàgina"
7
+ other: "Pàgines"
8
+ prev: "Anterior"
9
+ next: "Següent"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "element"
15
+ other: "elements"
16
+ info:
17
+ no_items: "No s'ha trobat cap resultat"
18
+ single_page: "Mostrant %{count} %{item_name}"
19
+ multiple_pages: "Mostrant %{item_name} %{from}-%{to} de %{count} en total"
20
+ combo_nav_js: "Pàgina %{page_input} de %{pages}"
21
+ items_selector_js: "Mostra %{items_input} %{item_name} per pàgina"
data/locales/ckb.yml ADDED
@@ -0,0 +1,18 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+
3
+ ckb:
4
+ pagy:
5
+ item_name: "بابەت"
6
+ aria_label:
7
+ nav: "پەڕەکان"
8
+ prev: "پاش"
9
+ next: "پێش"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ info:
14
+ no_items: "هیچ %{item_name}ێک نەدۆزرایەوە"
15
+ single_page: "پیشاندانی %{count} %{item_name}"
16
+ multiple_pages: "پشاندانی %{item_name}ی %{from}-%{to} لە کۆی %{count} بە گشتی"
17
+ combo_nav_js: "پەڕی %{page_input} لە %{pages}"
18
+ items_selector_js: "نیشاندانی %{items_input} %{item_name} لە هەر پەڕێک"
data/locales/cs.yml ADDED
@@ -0,0 +1,23 @@
1
+ # :west_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ cs:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Stránka"
7
+ few: "Stránky" # use the other variant as this word is used as a bare plural without the numeral
8
+ other: "Stránky"
9
+ prev: "Předchozí"
10
+ next: "Další"
11
+ prev: "&lt;"
12
+ next: "&gt;"
13
+ gap: "&hellip;"
14
+ item_name:
15
+ one: "položka"
16
+ few: "položky"
17
+ other: "položek"
18
+ info:
19
+ no_items: "Nic nebylo nalezeno"
20
+ single_page: "Zobrazeno %{count} %{item_name}"
21
+ multiple_pages: "Zobrazeny položky %{from}-%{to} z %{count} celkem"
22
+ combo_nav_js: "Strana %{page_input} z %{pages}"
23
+ items_selector_js: "Zobrazit %{items_input} %{item_name} na stránce"
data/locales/da.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ da:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Side"
7
+ other: "Sider"
8
+ prev: "Forrige"
9
+ next: "Næste"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "resultat"
15
+ other: "resultater"
16
+ info:
17
+ no_items: "Ingen %{item_name} fundet"
18
+ single_page: "Viser %{count} %{item_name}"
19
+ multiple_pages: "Viser %{item_name} %{from}-%{to} af %{count} totalt"
20
+ combo_nav_js: "Side %{page_input} af %{pages}"
21
+ items_selector_js: "Antal %{items_input} %{item_name} per side"
data/locales/de.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ de:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Seite"
7
+ other: "Seiten"
8
+ prev: "Zurück"
9
+ next: "Weiter"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "Eintrag"
15
+ other: "Einträge"
16
+ info:
17
+ no_items: "Keine %{item_name} gefunden"
18
+ single_page: "Zeige %{count} %{item_name}"
19
+ multiple_pages: "Zeige %{item_name} %{from}-%{to} von %{count} gesamt"
20
+ combo_nav_js: "Seite %{page_input} von %{pages}"
21
+ items_selector_js: "Zeige %{items_input} %{item_name} pro Seite"
data/locales/en.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ en:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Page"
7
+ other: "Pages"
8
+ prev: "Previous"
9
+ next: "Next"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "item"
15
+ other: "items"
16
+ info:
17
+ no_items: "No %{item_name} found"
18
+ single_page: "Displaying %{count} %{item_name}"
19
+ multiple_pages: "Displaying %{item_name} %{from}-%{to} of %{count} in total"
20
+ combo_nav_js: "Page %{page_input} of %{pages}"
21
+ items_selector_js: "Show %{items_input} %{item_name} per page"
data/locales/es.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ es:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Página"
7
+ other: "Páginas"
8
+ prev: "Anterior"
9
+ next: "Siguiente"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "ítem"
15
+ other: "ítems"
16
+ info:
17
+ no_items: "Sin resultados"
18
+ single_page: "Mostrando %{count} %{item_name}"
19
+ multiple_pages: "Mostrando %{item_name} %{from}-%{to} de %{count} en total"
20
+ combo_nav_js: "Página %{page_input} de %{pages}"
21
+ items_selector_js: "Mostrar %{items_input} %{item_name} por página"
data/locales/fr.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_upto_two_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ fr:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Page"
7
+ other: "Pages"
8
+ prev: "Précédent"
9
+ next: "Suivant"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "élément"
15
+ other: "éléments"
16
+ info:
17
+ no_items: "Aucun %{item_name} trouvé"
18
+ single_page: "Affichage de %{count} %{item_name}"
19
+ multiple_pages: "Affichage des %{item_name} %{from} à %{to} sur %{count} au total"
20
+ combo_nav_js: "Page %{page_input} sur %{pages}"
21
+ items_selector_js: "Afficher %{items_input} %{item_name} par page"
data/locales/hr.yml ADDED
@@ -0,0 +1,25 @@
1
+ # :east_slavic pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ hr:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Stranica"
7
+ few: "Stranice"
8
+ many: "Stranica"
9
+ other: "Stranice"
10
+ prev: "Prethodna"
11
+ next: "Sljedeća "
12
+ prev: "&lt;"
13
+ next: "&gt;"
14
+ gap: "&hellip;"
15
+ item_name:
16
+ one: "stavka"
17
+ few: "stavke"
18
+ many: "stavki"
19
+ other: "stavki"
20
+ info:
21
+ no_items: "Nije pronađena %{item_name}"
22
+ single_page: "Prikazuje se %{count} %{item_name}"
23
+ multiple_pages: "Prikaz %{item_name} %{from}-%{to} od %{count} ukupno"
24
+ combo_nav_js: "Stranica %{page_input} od %{pages}"
25
+ items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
data/locales/id.yml ADDED
@@ -0,0 +1,19 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ id:
3
+ pagy:
4
+ aria_label:
5
+ # please add a comment in the https://github.com/ddnexus/pagy/issues/588
6
+ # posting the translation of the following "Page"/"Pages" with the plurals for this locale
7
+ nav: "Pages"
8
+ prev: "Sebelumnya"
9
+ next: "Selanjutnya"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name: "item"
14
+ info:
15
+ no_items: "Tidak ditemukan %{item_name}"
16
+ single_page: "Menampilkan %{count} %{item_name}"
17
+ multiple_pages: "Menampilkan %{item_name} %{from}-%{to} dari total %{count}"
18
+ combo_nav_js: "Halaman %{page_input} dari %{pages}"
19
+ items_selector_js: "Tampilkan %{items_input} %{item_name} per halaman"
data/locales/it.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ it:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Pagina"
7
+ other: "Pagine"
8
+ prev: "Precedente"
9
+ next: "Seguente"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "elemento"
15
+ other: "elementi"
16
+ info:
17
+ no_items: "Nessun %{item_name} trovato"
18
+ single_page: "Visualizzazione di %{count} %{item_name}"
19
+ multiple_pages: "Visualizzazione %{item_name} %{from}-%{to} di %{count} in totale"
20
+ combo_nav_js: "Pagina %{page_input} di %{pages}"
21
+ items_selector_js: "Mostra %{items_input} %{item_name} per pagina"
data/locales/ja.yml ADDED
@@ -0,0 +1,19 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ ja:
3
+ pagy:
4
+ aria_label:
5
+ # please add a comment in the https://github.com/ddnexus/pagy/issues/590
6
+ # posting the translation of the following "Page"/"Pages" with the plurals for this locale
7
+ nav: "Pages"
8
+ prev: "前へ"
9
+ next: "次へ"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name: "結果"
14
+ info:
15
+ no_items: "見つかりませんでした"
16
+ single_page: "%{count} 件の%{item_name}"
17
+ multiple_pages: "%{count} 件中 %{from}-%{to} 件目の%{item_name}を表示中"
18
+ combo_nav_js: "%{page_input} / %{pages} ページ"
19
+ items_selector_js: "%{items_input} 件ずつ表示"
data/locales/km.yml ADDED
@@ -0,0 +1,19 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ km:
3
+ pagy:
4
+ aria_label:
5
+ # please add a comment in the https://github.com/ddnexus/pagy/issues/591
6
+ # posting the translation of the following "Page"/"Pages" with the plurals for this locale
7
+ nav: "Pages"
8
+ prev: "មុន"
9
+ next: "បន្ទាប់"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name: "ធាតុ"
14
+ info:
15
+ no_items: "មិនមាន %{item_name} ទេ"
16
+ single_page: "បង្ហាញ %{count} %{item_name}"
17
+ multiple_pages: "បង្ហាញ %{item_name} %{from}-%{to} នៃ %{count} ជាចំនួនសរុប"
18
+ combo_nav_js: "ទំព័រ %{page_input} នៃ %{pages}"
19
+ items_selector_js: "បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ"
data/locales/ko.yml ADDED
@@ -0,0 +1,17 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ ko:
3
+ pagy:
4
+ aria_label:
5
+ nav: "페이지"
6
+ prev: "이전"
7
+ next: "다음"
8
+ prev: "&lt;"
9
+ next: "&gt;"
10
+ gap: "&hellip;"
11
+ item_name: "항목"
12
+ info:
13
+ no_items: "%{item_name} 없음"
14
+ single_page: "%{count}개의 %{item_name} 표시됨"
15
+ multiple_pages: "총 %{count}개의 %{item_name} 중 %{from}-%{to}"
16
+ combo_nav_js: "총 %{pages} 중 %{page_input} 페이지"
17
+ items_selector_js: "페이지 당 %{items_input}개 표시%"
data/locales/nb.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ nb:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Side"
7
+ other: "Sider"
8
+ prev: "Forrige"
9
+ next: "Neste"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "resultat"
15
+ other: "resultater"
16
+ info:
17
+ no_items: "Ingen %{item_name} funnet"
18
+ single_page: "Viser %{count} %{item_name}"
19
+ multiple_pages: "Viser %{item_name} %{from}-%{to} av totalt %{count}"
20
+ combo_nav_js: "Side %{page_input} av %{pages}"
21
+ items_selector_js: "Vis %{items_input} %{item_name} per side"
data/locales/nl.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ nl:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Pagina"
7
+ other: "Pagina's"
8
+ prev: "Vorige"
9
+ next: "Volgende"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "stuk"
15
+ other: "stuks"
16
+ info:
17
+ no_items: "Geen %{item_name} gevonden"
18
+ single_page: "Toont %{count} %{item_name}"
19
+ multiple_pages: "Toont %{from}-%{to} %{item_name} van %{count} in totaal"
20
+ combo_nav_js: "Pagina %{page_input} van %{pages}"
21
+ items_selector_js: "Toont %{items_input} %{item_name} per pagina"
data/locales/nn.yml ADDED
@@ -0,0 +1,21 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/gem/lib/pagy/i18n.rb)
2
+ nn:
3
+ pagy:
4
+ aria_label:
5
+ nav:
6
+ one: "Side"
7
+ other: "Sider"
8
+ prev: "Førre"
9
+ next: "Neste"
10
+ prev: "&lt;"
11
+ next: "&gt;"
12
+ gap: "&hellip;"
13
+ item_name:
14
+ one: "resultat"
15
+ other: "resultat"
16
+ info:
17
+ no_items: "Ingen %{item_name} funne"
18
+ single_page: "Viser %{count} %{item_name}"
19
+ multiple_pages: "Viser %{item_name} %{from}-%{to} av totalt %{count}"
20
+ combo_nav_js: "Side %{page_input} av %{pages}"
21
+ items_selector_js: "Vis %{items_input} %{item_name} per side"