pagy 7.0.11 → 8.6.3

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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/apps/calendar.ru +745 -0
  3. data/apps/demo.ru +435 -0
  4. data/apps/rails.ru +212 -0
  5. data/apps/repro.ru +177 -0
  6. data/apps/tmp/calendar.sqlite3 +0 -0
  7. data/apps/tmp/calendar.sqlite3-shm +0 -0
  8. data/apps/tmp/calendar.sqlite3-wal +0 -0
  9. data/apps/tmp/local_secret.txt +1 -0
  10. data/apps/tmp/pagy-keyset.sqlite3 +0 -0
  11. data/apps/tmp/pagy-keyset.sqlite3-shm +0 -0
  12. data/apps/tmp/pagy-keyset.sqlite3-wal +0 -0
  13. data/bin/pagy +100 -0
  14. data/{lib/config → config}/pagy.rb +31 -73
  15. data/javascripts/pagy-module.js +100 -0
  16. data/javascripts/pagy.js +4 -0
  17. data/javascripts/pagy.min.js +4 -0
  18. data/javascripts/pagy.min.js.map +10 -0
  19. data/javascripts/pagy.mjs +100 -0
  20. data/lib/optimist.rb +1022 -0
  21. data/lib/pagy/backend.rb +8 -3
  22. data/lib/pagy/calendar/day.rb +4 -3
  23. data/lib/pagy/calendar/month.rb +4 -3
  24. data/lib/pagy/calendar/quarter.rb +4 -3
  25. data/lib/pagy/calendar/unit.rb +106 -0
  26. data/lib/pagy/calendar/week.rb +3 -3
  27. data/lib/pagy/calendar/year.rb +4 -3
  28. data/lib/pagy/calendar.rb +55 -99
  29. data/lib/pagy/console.rb +2 -2
  30. data/lib/pagy/countless.rb +15 -10
  31. data/lib/pagy/extras/arel.rb +1 -1
  32. data/lib/pagy/extras/array.rb +1 -1
  33. data/lib/pagy/extras/bootstrap.rb +52 -63
  34. data/lib/pagy/extras/bulma.rb +49 -64
  35. data/lib/pagy/extras/calendar.rb +35 -5
  36. data/lib/pagy/extras/countless.rb +2 -2
  37. data/lib/pagy/extras/foundation.rb +52 -62
  38. data/lib/pagy/extras/gearbox.rb +28 -27
  39. data/lib/pagy/extras/headers.rb +1 -1
  40. data/lib/pagy/extras/i18n.rb +1 -1
  41. data/lib/pagy/extras/items.rb +21 -18
  42. data/lib/pagy/extras/{frontend_helpers.rb → js_tools.rb} +9 -6
  43. data/lib/pagy/extras/jsonapi.rb +2 -2
  44. data/lib/pagy/extras/materialize.rb +56 -52
  45. data/lib/pagy/extras/metadata.rb +6 -2
  46. data/lib/pagy/extras/overflow.rb +5 -4
  47. data/lib/pagy/extras/pagy.rb +82 -0
  48. data/lib/pagy/extras/semantic.rb +50 -51
  49. data/lib/pagy/extras/size.rb +40 -0
  50. data/lib/pagy/extras/standalone.rb +2 -2
  51. data/lib/pagy/extras/trim.rb +12 -12
  52. data/lib/pagy/extras/uikit.rb +51 -50
  53. data/lib/pagy/frontend.rb +39 -53
  54. data/lib/pagy/url_helpers.rb +9 -10
  55. data/lib/pagy.rb +51 -82
  56. data/{lib/locales → locales}/ar.yml +10 -11
  57. data/{lib/locales → locales}/be.yml +5 -5
  58. data/{lib/locales → locales}/bg.yml +5 -5
  59. data/{lib/locales → locales}/bs.yml +5 -5
  60. data/locales/ca.yml +21 -0
  61. data/locales/ckb.yml +18 -0
  62. data/{lib/locales → locales}/cs.yml +5 -5
  63. data/locales/da.yml +21 -0
  64. data/{lib/locales → locales}/de.yml +5 -5
  65. data/{lib/locales → locales}/en.yml +5 -5
  66. data/{lib/locales → locales}/es.yml +3 -3
  67. data/{lib/locales → locales}/fr.yml +5 -5
  68. data/{lib/locales → locales}/hr.yml +5 -5
  69. data/{lib/locales → locales}/id.yml +5 -5
  70. data/{lib/locales → locales}/it.yml +5 -5
  71. data/{lib/locales → locales}/ja.yml +5 -5
  72. data/{lib/locales → locales}/km.yml +5 -5
  73. data/locales/ko.yml +17 -0
  74. data/{lib/locales → locales}/nb.yml +5 -5
  75. data/{lib/locales → locales}/nl.yml +5 -5
  76. data/{lib/locales → locales}/nn.yml +5 -5
  77. data/{lib/locales → locales}/pl.yml +5 -5
  78. data/{lib/locales → locales}/pt-BR.yml +3 -3
  79. data/{lib/locales → locales}/pt.yml +3 -3
  80. data/locales/ru.yml +25 -0
  81. data/{lib/locales → locales}/sr.yml +5 -5
  82. data/{lib/locales → locales}/sv-SE.yml +5 -5
  83. data/{lib/locales → locales}/sv.yml +5 -5
  84. data/{lib/locales → locales}/sw.yml +5 -5
  85. data/{lib/locales → locales}/ta.yml +5 -5
  86. data/{lib/locales → locales}/tr.yml +5 -5
  87. data/{lib/locales → locales}/uk.yml +5 -5
  88. data/locales/vi.yml +17 -0
  89. data/{lib/locales → locales}/zh-CN.yml +5 -5
  90. data/{lib/locales → locales}/zh-HK.yml +5 -5
  91. data/{lib/locales → locales}/zh-TW.yml +5 -5
  92. data/{lib/stylesheets → stylesheets}/pagy.css +19 -34
  93. data/{lib/stylesheets → stylesheets}/pagy.scss +17 -19
  94. data/stylesheets/pagy.tailwind.css +21 -0
  95. metadata +76 -53
  96. data/lib/javascripts/pagy-dev.js +0 -112
  97. data/lib/javascripts/pagy-module.js +0 -111
  98. data/lib/javascripts/pagy.js +0 -1
  99. data/lib/locales/ca.yml +0 -23
  100. data/lib/locales/ckb.yml +0 -18
  101. data/lib/locales/da.yml +0 -23
  102. data/lib/locales/ko.yml +0 -19
  103. data/lib/locales/ru.yml +0 -27
  104. data/lib/locales/vi.yml +0 -17
  105. data/lib/pagy/calendar/helper.rb +0 -65
  106. data/lib/pagy/extras/navs.rb +0 -51
  107. data/lib/pagy/extras/support.rb +0 -40
  108. data/lib/stylesheets/pagy.tailwind.scss +0 -24
  109. /data/{lib/javascripts/pagy-module.d.ts → javascripts/pagy.d.ts} +0 -0
data/lib/pagy.rb CHANGED
@@ -5,39 +5,32 @@ require 'pathname'
5
5
 
6
6
  # Core class
7
7
  class Pagy
8
- VERSION = '7.0.11'
8
+ VERSION = '8.6.3'
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
16
- DEFAULT = { page: 1, # rubocop:disable Style/MutableConstant
17
- items: 20,
18
- outset: 0,
19
- size: 7,
20
- page_param: :page,
21
- params: {},
22
- fragment: '',
23
- link_extra: '',
24
- item_i18n_key: 'pagy.item_name',
25
- nav_i18n_key: 'pagy.aria_label.nav',
26
- cycle: false,
27
- request_path: '',
28
- count_args: [:all] } # AR friendly
29
-
30
- attr_reader :count, :page, :items, :vars, :pages, :last, :offset, :in, :from, :to, :prev, :next, :params, :request_path
15
+ # Core default: 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
+ ends: true,
21
+ count_args: [:all], # AR friendly
22
+ page_param: :page }
23
+
24
+ attr_reader :count, :page, :items, :vars, :last, :offset, :in, :from, :to, :prev, :next
25
+ alias pages last
31
26
 
32
27
  # Merge and validate the options, do some simple arithmetic and set the instance variables
33
28
  def initialize(vars)
34
29
  normalize_vars(vars)
35
30
  setup_vars(count: 0, page: 1, outset: 0)
36
31
  setup_items_var
37
- setup_pages_var
38
32
  setup_offset_var
39
- setup_params_var
40
- setup_request_path_var
33
+ setup_last_var
41
34
  raise OverflowError.new(self, :page, "in 1..#{@last}", @page) if @page > @last
42
35
 
43
36
  @from = [@offset - @outset + 1, @count].min
@@ -47,46 +40,35 @@ class Pagy
47
40
  @next = @page == @last ? (1 if @vars[:cycle]) : @page + 1
48
41
  end
49
42
 
50
- # 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]
51
44
  def series(size: @vars[:size], **_)
52
- series = []
53
- if size.is_a?(Array) && size.size == 4 && size.all? { |num| !num.negative? rescue false } # rubocop:disable Style/RescueModifier
54
- # This algorithm is up to ~5x faster and ~2.3x lighter than the previous one (pagy < 4.3)
55
- left_gap_start = 1 + size[0]
56
- left_gap_end = @page - size[1] - 1
57
- right_gap_start = @page + size[2] + 1
58
- right_gap_end = @last - size[3]
59
- left_gap_end = right_gap_end if left_gap_end > right_gap_end
60
- right_gap_start = left_gap_start if left_gap_start > right_gap_start
61
- start = 1
62
- if (left_gap_end - left_gap_start).positive?
63
- series.push(*start...left_gap_start, :gap)
64
- start = left_gap_end + 1
65
- end
66
- if (right_gap_end - right_gap_start).positive?
67
- series.push(*start...right_gap_start, :gap)
68
- start = right_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
69
  end
70
- series.push(*start..@last)
71
- elsif size.is_a?(Integer) && size.positive? # only central series
72
- # The simplest and fastest algorithm
73
- size = @pages if size > @pages # reduce the max size to @pages
74
- left = ((size - 1) / 2.0).floor # left half might be 1 page shorter for even size
75
- start = if @page <= left # beginning pages
76
- 1
77
- elsif @page > @pages - (size - left) # end pages
78
- @pages - size + 1
79
- else # intermediate pages
80
- @page - left
81
- end
82
- series = (start..start + size - 1).to_a
83
- else
84
- return [] if size.empty?
85
-
86
- raise VariableError.new(self, :size, 'to be a single positive Integer or an Array of 4', size)
70
+ series[series.index(@page)] = @page.to_s
87
71
  end
88
- series[series.index(@page)] = @page.to_s
89
- series
90
72
  end
91
73
 
92
74
  # Label for any page. Allow the customization of the output (overridden by the calendar extra)
@@ -119,33 +101,20 @@ class Pagy
119
101
  setup_vars(items: 1)
120
102
  end
121
103
 
122
- # Setup @pages and @last (overridden by the gearbox extra)
123
- def setup_pages_var
124
- @pages = @last = [(@count.to_f / @items).ceil, 1].max
125
- end
126
-
127
- # Setup @offset based on the :gearbox_items variable
104
+ # Setup @offset (overridden by the gearbox extra)
128
105
  def setup_offset_var
129
106
  @offset = (@items * (@page - 1)) + @outset # may be already set from gear_box
130
107
  end
131
108
 
132
- # Setup and validate @params
133
- def setup_params_var
134
- raise VariableError.new(self, :params, 'must be a Hash or a Proc', @params) \
135
- unless (@params = @vars[:params]).is_a?(Hash) || @params.is_a?(Proc)
136
- end
137
-
138
- def setup_request_path_var
139
- request_path = @vars[:request_path]
140
- return if request_path.to_s.empty?
141
-
142
- raise VariableError.new(self, :request_path, 'must be a bare path like "/foo"', request_path) \
143
- if !request_path.start_with?('/') || request_path.include?('?')
144
-
145
- @request_path = request_path
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]
146
113
  end
114
+ alias setup_pages_var setup_last_var
147
115
  end
148
116
 
149
- require 'pagy/backend'
150
- require 'pagy/frontend'
151
- 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'
@@ -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;"
@@ -24,7 +23,7 @@ ar:
24
23
  other: "عناصر"
25
24
  info:
26
25
  no_items: "لا يوجد %{item_name}"
27
- single_page: "عرض <b>%{count}</b> %{item_name}"
28
- multiple_pages: "عرض %{item_name} <b>%{from}-%{to}</b> من اجمالي <b>%{count}</b>"
26
+ single_page: "عرض %{count} %{item_name}"
27
+ multiple_pages: "عرض %{item_name} %{from}-%{to} من اجمالي %{count}"
29
28
  combo_nav_js: "الصفحة %{page_input} من %{pages}"
30
29
  items_selector_js: "عرض %{items_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:
@@ -19,7 +19,7 @@ be:
19
19
  other: "запісаў"
20
20
  info:
21
21
  no_items: "Пакуль %{item_name} няма"
22
- single_page: "<b>%{count}</b> %{item_name}"
23
- multiple_pages: "Усяго <b>%{count}</b> %{item_name}, паказаны з <b>%{from}</b> па <b>%{to}</b>"
24
- combo_nav_js: "<label>Старонка %{page_input} з %{pages}</label>"
25
- items_selector_js: "<label>Паказаць %{items_input} %{item_name} на старонцы</label>"
22
+ single_page: "%{count} %{item_name}"
23
+ multiple_pages: "Усяго %{count} %{item_name}, паказаны з %{from} па %{to}"
24
+ combo_nav_js: "Старонка %{page_input} з %{pages}"
25
+ items_selector_js: "Паказаць %{items_input} %{item_name} на старонцы"
@@ -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:
@@ -15,7 +15,7 @@ bg:
15
15
  other: "резултати"
16
16
  info:
17
17
  no_items: "Няма намерени %{item_name}"
18
- single_page: "Показани са <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Показани са %{item_name} <b>%{from}-%{to}</b> от <b>%{count}</b> общо"
20
- combo_nav_js: "<label>Страница %{page_input} от %{pages}</label>"
21
- items_selector_js: "<label>Покажи %{items_input} %{item_name} на страница</label>"
18
+ single_page: "Показани са %{count} %{item_name}"
19
+ multiple_pages: "Показани са %{item_name} %{from}-%{to} от %{count} общо"
20
+ combo_nav_js: "Страница %{page_input} от %{pages}"
21
+ items_selector_js: "Покажи %{items_input} %{item_name} на страница"
@@ -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:
@@ -19,7 +19,7 @@ bs:
19
19
  other: "stavki"
20
20
  info:
21
21
  no_items: "Nije pronađena %{item_name}"
22
- single_page: "Prikazuje se <b>%{count}</b> %{item_name}"
23
- multiple_pages: "Prikaz %{item_name} <b>%{from}-%{to}</b> od <b>%{count}</b> ukupno"
24
- combo_nav_js: "<label>Stranica %{page_input} od %{pages}</label>"
25
- items_selector_js: "<label>Prikaži %{items_input} %{item_name} po stranici</label>"
22
+ single_page: "Prikazuje se %{count} %{item_name}"
23
+ multiple_pages: "Prikaz %{item_name} %{from}-%{to} od %{count} ukupno"
24
+ combo_nav_js: "Stranica %{page_input} od %{pages}"
25
+ items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
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} لە هەر پەڕێک"
@@ -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:
@@ -17,7 +17,7 @@ cs:
17
17
  other: "položek"
18
18
  info:
19
19
  no_items: "Nic nebylo nalezeno"
20
- single_page: "Zobrazeno <b>%{count}</b> %{item_name}"
21
- multiple_pages: "Zobrazeny položky <b>%{from}-%{to}</b> z <b>%{count}</b> celkem"
22
- combo_nav_js: "<label>Strana %{page_input} z %{pages}</label>"
23
- items_selector_js: "<label>Zobrazit %{items_input} %{item_name} na stránce</label>"
20
+ single_page: "Zobrazeno %{count} %{item_name}"
21
+ multiple_pages: "Zobrazeny položky %{from}-%{to} z %{count} celkem"
22
+ combo_nav_js: "Strana %{page_input} z %{pages}"
23
+ items_selector_js: "Zobrazit %{items_input} %{item_name} na stránce"
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"
@@ -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:
@@ -15,7 +15,7 @@ de:
15
15
  other: "Einträge"
16
16
  info:
17
17
  no_items: "Keine %{item_name} gefunden"
18
- single_page: "Zeige <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Zeige %{item_name} <b>%{from}-%{to}</b> von <b>%{count}</b> gesamt"
20
- combo_nav_js: "<label>Seite %{page_input} von %{pages}</label>"
21
- items_selector_js: "<label>Zeige %{items_input} %{item_name} pro Seite</label>"
18
+ single_page: "Zeige %{count} %{item_name}"
19
+ multiple_pages: "Zeige %{item_name} %{from}-%{to} von %{count} gesamt"
20
+ combo_nav_js: "Seite %{page_input} von %{pages}"
21
+ items_selector_js: "Zeige %{items_input} %{item_name} pro Seite"
@@ -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:
@@ -15,7 +15,7 @@ en:
15
15
  other: "items"
16
16
  info:
17
17
  no_items: "No %{item_name} found"
18
- single_page: "Displaying <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Displaying %{item_name} <b>%{from}-%{to}</b> of <b>%{count}</b> in total"
20
- combo_nav_js: "<label>Page %{page_input} of %{pages}</label>"
21
- items_selector_js: "<label>Show %{items_input} %{item_name} per page</label>"
18
+ single_page: "Displaying %{count} %{item_name}"
19
+ multiple_pages: "Displaying %{item_name} %{from}-%{to} of %{count} in total"
20
+ combo_nav_js: "Page %{page_input} of %{pages}"
21
+ items_selector_js: "Show %{items_input} %{item_name} per page"
@@ -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:
@@ -17,5 +17,5 @@ es:
17
17
  no_items: "Sin resultados"
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} de %{count} en total"
20
- combo_nav_js: "<label>Página %{page_input} de %{pages}</label>"
21
- items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
20
+ combo_nav_js: "Página %{page_input} de %{pages}"
21
+ items_selector_js: "Mostrar %{items_input} %{item_name} por página"
@@ -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:
@@ -15,7 +15,7 @@ fr:
15
15
  other: "éléments"
16
16
  info:
17
17
  no_items: "Aucun %{item_name} trouvé"
18
- single_page: "Affichage de <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Affichage des %{item_name} <b>%{from} à %{to}</b> sur <b>%{count}</b> au total"
20
- combo_nav_js: "<label>Page %{page_input} sur %{pages}</label>"
21
- items_selector_js: "<label>Afficher %{items_input} %{item_name} par page</label>"
18
+ single_page: "Affichage de %{count} %{item_name}"
19
+ multiple_pages: "Affichage des %{item_name} %{from} à %{to} sur %{count} au total"
20
+ combo_nav_js: "Page %{page_input} sur %{pages}"
21
+ items_selector_js: "Afficher %{items_input} %{item_name} par page"
@@ -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:
@@ -19,7 +19,7 @@ hr:
19
19
  other: "stavki"
20
20
  info:
21
21
  no_items: "Nije pronađena %{item_name}"
22
- single_page: "Prikazuje se <b>%{count}</b> %{item_name}"
23
- multiple_pages: "Prikaz %{item_name} <b>%{from}-%{to}</b> od <b>%{count}</b> ukupno"
24
- combo_nav_js: "<label>Stranica %{page_input} od %{pages}</label>"
25
- items_selector_js: "<label>Prikaži %{items_input} %{item_name} po stranici</label>"
22
+ single_page: "Prikazuje se %{count} %{item_name}"
23
+ multiple_pages: "Prikaz %{item_name} %{from}-%{to} od %{count} ukupno"
24
+ combo_nav_js: "Stranica %{page_input} od %{pages}"
25
+ items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
@@ -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:
@@ -13,7 +13,7 @@ id:
13
13
  item_name: "item"
14
14
  info:
15
15
  no_items: "Tidak ditemukan %{item_name}"
16
- single_page: "Menampilkan <b>%{count}</b> %{item_name}"
17
- multiple_pages: "Menampilkan %{item_name} <b>%{from}-%{to}</b> dari total <b>%{count}</b>"
18
- combo_nav_js: "<label>Halaman %{page_input} dari %{pages}</label>"
19
- items_selector_js: "<label>Tampilkan %{items_input} %{item_name} per halaman</label>"
16
+ single_page: "Menampilkan %{count} %{item_name}"
17
+ multiple_pages: "Menampilkan %{item_name} %{from}-%{to} dari total %{count}"
18
+ combo_nav_js: "Halaman %{page_input} dari %{pages}"
19
+ items_selector_js: "Tampilkan %{items_input} %{item_name} per halaman"
@@ -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:
@@ -15,7 +15,7 @@ it:
15
15
  other: "elementi"
16
16
  info:
17
17
  no_items: "Nessun %{item_name} trovato"
18
- single_page: "Visualizzazione di <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Visualizzazione %{item_name} <b>%{from}-%{to}</b> di <b>%{count}</b> in totale"
20
- combo_nav_js: "<label>Pagina %{page_input} di %{pages}</label>"
21
- items_selector_js: "<label>Mostra %{items_input} %{item_name} per pagina</label>"
18
+ single_page: "Visualizzazione di %{count} %{item_name}"
19
+ multiple_pages: "Visualizzazione %{item_name} %{from}-%{to} di %{count} in totale"
20
+ combo_nav_js: "Pagina %{page_input} di %{pages}"
21
+ items_selector_js: "Mostra %{items_input} %{item_name} per pagina"
@@ -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:
@@ -13,7 +13,7 @@ ja:
13
13
  item_name: "結果"
14
14
  info:
15
15
  no_items: "見つかりませんでした"
16
- single_page: "<b>%{count}</b> 件の%{item_name}"
17
- multiple_pages: "<b>%{count}</b> 件中 <b>%{from}-%{to}</b> 件目の%{item_name}を表示中"
18
- combo_nav_js: "<label>%{page_input} / %{pages} ページ</label>"
19
- items_selector_js: "<label>%{items_input} 件ずつ表示</label>"
16
+ single_page: "%{count} 件の%{item_name}"
17
+ multiple_pages: "%{count} 件中 %{from}-%{to} 件目の%{item_name}を表示中"
18
+ combo_nav_js: "%{page_input} / %{pages} ページ"
19
+ items_selector_js: "%{items_input} 件ずつ表示"
@@ -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:
@@ -13,7 +13,7 @@ km:
13
13
  item_name: "ធាតុ"
14
14
  info:
15
15
  no_items: "មិនមាន %{item_name} ទេ"
16
- single_page: "បង្ហាញ <b>%{count}</b> %{item_name}"
17
- multiple_pages: "បង្ហាញ %{item_name} <b>%{from}-%{to}</b> នៃ <b>%{count}</b> ជាចំនួនសរុប"
18
- combo_nav_js: "<label>ទំព័រ %{page_input} នៃ %{pages}</label>"
19
- items_selector_js: "<label>បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ</label>"
16
+ single_page: "បង្ហាញ %{count} %{item_name}"
17
+ multiple_pages: "បង្ហាញ %{item_name} %{from}-%{to} នៃ %{count} ជាចំនួនសរុប"
18
+ combo_nav_js: "ទំព័រ %{page_input} នៃ %{pages}"
19
+ items_selector_js: "បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ"
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}개 표시%"
@@ -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:
@@ -15,7 +15,7 @@ nb:
15
15
  other: "resultater"
16
16
  info:
17
17
  no_items: "Ingen %{item_name} funnet"
18
- single_page: "Viser <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> av totalt <b>%{count}</b>"
20
- combo_nav_js: "<label>Side %{page_input} av %{pages}</label>"
21
- items_selector_js: "<label>Vis %{items_input} %{item_name} per side</label>"
18
+ single_page: "Viser %{count} %{item_name}"
19
+ multiple_pages: "Viser %{item_name} %{from}-%{to} av totalt %{count}"
20
+ combo_nav_js: "Side %{page_input} av %{pages}"
21
+ items_selector_js: "Vis %{items_input} %{item_name} per side"
@@ -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:
@@ -15,7 +15,7 @@ nl:
15
15
  other: "stuks"
16
16
  info:
17
17
  no_items: "Geen %{item_name} gevonden"
18
- single_page: "Toont <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Toont <b>%{from}-%{to}</b> %{item_name} van <b>%{count}</b> in totaal"
20
- combo_nav_js: "<label>Pagina %{page_input} van %{pages}</label>"
21
- items_selector_js: "<label>Toont %{items_input} %{item_name} per pagina</label>"
18
+ single_page: "Toont %{count} %{item_name}"
19
+ multiple_pages: "Toont %{from}-%{to} %{item_name} van %{count} in totaal"
20
+ combo_nav_js: "Pagina %{page_input} van %{pages}"
21
+ items_selector_js: "Toont %{items_input} %{item_name} per pagina"
@@ -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:
@@ -15,7 +15,7 @@ nn:
15
15
  other: "resultat"
16
16
  info:
17
17
  no_items: "Ingen %{item_name} funne"
18
- single_page: "Viser <b>%{count}</b> %{item_name}"
19
- multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> av totalt <b>%{count}</b>"
20
- combo_nav_js: "<label>Side %{page_input} av %{pages}</label>"
21
- items_selector_js: "<label>Vis %{items_input} %{item_name} per side</label>"
18
+ single_page: "Viser %{count} %{item_name}"
19
+ multiple_pages: "Viser %{item_name} %{from}-%{to} av totalt %{count}"
20
+ combo_nav_js: "Side %{page_input} av %{pages}"
21
+ items_selector_js: "Vis %{items_input} %{item_name} per side"
@@ -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:
@@ -19,7 +19,7 @@ pl:
19
19
  other: "elementów"
20
20
  info:
21
21
  no_items: "Nie znaleziono %{item_name}"
22
- single_page: "Wyświetlono <b>%{count}</b> %{item_name}"
23
- multiple_pages: "Wyświetlono %{item_name} <b>%{from}-%{to}</b> z wszystkich <b>%{count}</b>"
24
- combo_nav_js: "<label>Strona %{page_input} z %{pages}</label>"
25
- items_selector_js: "<label>Pokaż %{items_input} %{item_name} na stronie</label>"
22
+ single_page: "Wyświetlono %{count} %{item_name}"
23
+ multiple_pages: "Wyświetlono %{item_name} %{from}-%{to} z wszystkich %{count}"
24
+ combo_nav_js: "Strona %{page_input} z %{pages}"
25
+ items_selector_js: "Pokaż %{items_input} %{item_name} na stronie"
@@ -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:
@@ -17,5 +17,5 @@ pt-BR:
17
17
  no_items: "Sem resultados"
18
18
  single_page: "Mostrando %{count} %{item_name}"
19
19
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} do total de %{count}"
20
- combo_nav_js: "<label>Página %{page_input} de %{pages}</label>"
21
- items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
20
+ combo_nav_js: "Página %{page_input} de %{pages}"
21
+ items_selector_js: "Mostrar %{items_input} %{item_name} por página"