pagy 3.9.0 → 3.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76e3d9bead25964339d54c1cd73d9e907da2339e3f06b260f9cee31fa595deca
4
- data.tar.gz: 6b4babd77239dee7f8d5bdc599fc621aeae42089fd7a2c0689010e1f5f8fafb4
3
+ metadata.gz: 9ce66549213b7c1a7f89755a31d5faec46f09372f5b854d7f7ede99fb329b5d0
4
+ data.tar.gz: 35071f34f9a15378e91efb38f060e1178ccc2d7609ff2bdc99b435f8f9242417
5
5
  SHA512:
6
- metadata.gz: d52670d1b6b9e8145589ce948fbbc4332a946fbd955a3a2bdca3acbb591c33cb6e956e83a2a8b9c50545ccd80b709c4f0709296be6330e22031990cbd8e17116
7
- data.tar.gz: 8e0c0a3ba6d655386de0a50a53e315c854a88319fdafa5792e94fd4f432be263eee420840f54bcbb206b505b26cbf850faa07db6eef66157f91391f5c43ff89f
6
+ metadata.gz: d0a3520386cf1b796c5e26fe13c65ebc158d6fccbb24547a37bfcd5ef39ede686e1d3cb771c6ce23303d83529a075d03fc5e0288704b26bd0be17e0e641f1553
7
+ data.tar.gz: 7ef28712f3e38fc05fbbebb5445d25d7f0ec97d61bebbd0c1a45830345c4bd5ba1be202b5a7417bc23d8f822d85408cd0051d1d3de22d66e6c6ee10c49caedbd
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- # Pagy initializer file (3.9.0)
4
+ # Pagy initializer file (3.10.0)
5
5
  # Customize only what you really need and notice that Pagy works also without any of the following lines.
6
6
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  function Pagy(){}
4
4
 
5
- Pagy.version = '3.9.0';
5
+ Pagy.version = '3.10.0';
6
6
 
7
7
  Pagy.init = function(arg){
8
8
  var target = arg instanceof Event || arg === undefined ? document : arg,
@@ -0,0 +1,22 @@
1
+ # :czech pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/locales/utils/p11n.rb)
2
+
3
+ cs:
4
+ pagy:
5
+ item_name:
6
+ one: "položka"
7
+ few: "položek"
8
+ other: "položky"
9
+
10
+ nav:
11
+ prev: "‹ Předchozí"
12
+ next: "Další ›"
13
+ gap: "…"
14
+
15
+ info:
16
+ no_items: "Nic nebylo nalezeno"
17
+ single_page: "Zobrazeno <b>%{count}</b> %{item_name}"
18
+ multiple_pages: "Zobrazeno %{item_name} <b>%{from}-%{to}</b> z <b>%{count}</b> celkem"
19
+
20
+ combo_nav_js: "Strana %{page_input} z %{pages}"
21
+
22
+ items_selector_js: "Zobrazit %{items_input} %{item_name} na stránce"
@@ -32,6 +32,13 @@ p11n = {
32
32
  end
33
33
  end,
34
34
 
35
+ west_slavic: lambda do |n|
36
+ if n == 1 ; 'one'
37
+ elsif [2, 3, 4].include?(n) ; 'few'
38
+ else ; 'other'
39
+ end
40
+ end,
41
+
35
42
  one_two_other: lambda do |n|
36
43
  if n == 1 ; 'one'
37
44
  elsif n == 2 ; 'two'
@@ -60,9 +67,11 @@ p11n = {
60
67
  # The default pluralization for locales not explicitly listed here
61
68
  # is the :one_other pluralization proc (used for English)
62
69
  plurals = Hash.new(p11n[:one_other]).tap do |hash|
70
+ hash['cs'] = p11n[:west_slavic]
63
71
  hash['id'] = p11n[:other]
64
72
  hash['fr'] = p11n[:one_upto_two_other]
65
73
  hash['ja'] = p11n[:other]
74
+ hash['km'] = p11n[:other]
66
75
  hash['ko'] = p11n[:other]
67
76
  hash['pl'] = p11n[:polish]
68
77
  hash['ru'] = p11n[:east_slavic]
@@ -72,7 +81,6 @@ plurals = Hash.new(p11n[:one_other]).tap do |hash|
72
81
  hash['zh-CN'] = p11n[:other]
73
82
  hash['zh-HK'] = p11n[:other]
74
83
  hash['zh-TW'] = p11n[:other]
75
- hash['km'] = p11n[:other]
76
84
  end
77
85
 
78
86
  [ plurals, p11n ]
@@ -4,7 +4,7 @@
4
4
 
5
5
  require 'pathname'
6
6
 
7
- class Pagy ; VERSION = '3.9.0'
7
+ class Pagy ; VERSION = '3.10.0'
8
8
 
9
9
  # Root pathname to get the path of Pagy files like templates or dictionaries
10
10
  def self.root; @root ||= Pathname.new(__FILE__).dirname.freeze end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagy
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.0
4
+ version: 3.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Domizio Demichelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-21 00:00:00.000000000 Z
11
+ date: 2020-11-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Agnostic pagination in plain ruby: it works with any framework, ORM
14
14
  and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays,
@@ -25,6 +25,7 @@ files:
25
25
  - lib/locales/README.md
26
26
  - lib/locales/bg.yml
27
27
  - lib/locales/ca.yml
28
+ - lib/locales/cs.yml
28
29
  - lib/locales/da.yml
29
30
  - lib/locales/de.yml
30
31
  - lib/locales/en.yml