pagy 3.7.5 → 3.8.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: f1294620f428cf3807db1ab558bebf4bc01cc43d1e5d1fce668eec802b8a3088
4
- data.tar.gz: '094b895627f5bb472d952fbc8e078a23d9f830cc2f2b629945733853e83ef1ce'
3
+ metadata.gz: 4a3ba0f375dbf0278f8701c8cd68b628c207543556da9779c195a441c8c92896
4
+ data.tar.gz: 40656e0eaeb6b8bfe45126100242e6b89edd588e6723b98c1a120787e2ff77cb
5
5
  SHA512:
6
- metadata.gz: 1a041ca4fad15e46930d178ff9f86c20d66f60408d0ca270d127e615fca4ea29529a04e376905b45742405240b8d55438fbb4be4b60fe9c400171cce222eac64
7
- data.tar.gz: bd9f46987b98a2d83e8a03f3e16cf9f02272cbb9177d74e7a2b3e6eca30dcc20b1ed901d5d59a240a521decb0b359c9d5f5be21e10dbf1e970e67e5fc0499e21
6
+ metadata.gz: d2e5fe320e18656b1c9e7fb0d36597ee6a4ad8fcb55579b269ea8f394b390975e7f7e1138484b158ee5099bccfa6ee16e6c780513c68866d0b08367aa77c8919
7
+ data.tar.gz: 5b3c2c1deeb0f4131044e8b5830394080c31e5ddd49cb6c07e9124da5a14d5d15dfcf9c69e34775b7f9249193e6d6064c52316ce7703e9b53319b3c235b08adc
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- # Pagy initializer file (3.7.5)
4
+ # Pagy initializer file (3.8.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.7.5';
5
+ Pagy.version = '3.8.0';
6
6
 
7
7
  Pagy.init = function(arg){
8
8
  var target = arg instanceof Event || arg === undefined ? document : arg,
@@ -0,0 +1,19 @@
1
+ # :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/locales/utils/p11n.rb)
2
+
3
+ km:
4
+ pagy:
5
+ item_name: "ធាតុ"
6
+
7
+ nav:
8
+ prev: "‹ មុន"
9
+ next: "បន្ទាប់ ›"
10
+ gap: "…"
11
+
12
+ info:
13
+ no_items: "មិនមាន %{item_name} ទេ"
14
+ single_page: "បង្ហាញ <b>%{count}</b> %{item_name}"
15
+ multiple_pages: "បង្ហាញ %{item_name} <b>%{from}-%{to}</b> នៃ <b>%{count}</b> ជាចំនួនសរុប"
16
+
17
+ combo_nav_js: "ទំព័រ %{page_input} នៃ %{pages}"
18
+
19
+ items_selector_js: "បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ"
@@ -72,6 +72,7 @@ plurals = Hash.new(p11n[:one_other]).tap do |hash|
72
72
  hash['zh-CN'] = p11n[:other]
73
73
  hash['zh-HK'] = p11n[:other]
74
74
  hash['zh-TW'] = p11n[:other]
75
+ hash['km'] = p11n[:other]
75
76
  end
76
77
 
77
78
  [ plurals, p11n ]
@@ -4,7 +4,7 @@
4
4
 
5
5
  require 'pathname'
6
6
 
7
- class Pagy ; VERSION = '3.7.5'
7
+ class Pagy ; VERSION = '3.8.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
@@ -13,7 +13,7 @@ class Pagy
13
13
  def self.new_from_elasticsearch_rails(response, vars={})
14
14
  vars[:items] = response.search.options[:size] || 10
15
15
  vars[:page] = (response.search.options[:from] || 0) / vars[:items] + 1
16
- total = response.raw_response['hits']['total']
16
+ total = response.respond_to?(:raw_response) ? response.raw_response['hits']['total'] : response.response['hits']['total']
17
17
  vars[:count] = total.is_a?(Hash) ? total['value'] : total
18
18
  new(vars)
19
19
  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.7.5
4
+ version: 3.8.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-03-31 00:00:00.000000000 Z
11
+ date: 2020-04-23 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,
@@ -33,6 +33,7 @@ files:
33
33
  - lib/locales/id.yml
34
34
  - lib/locales/it.yml
35
35
  - lib/locales/ja.yml
36
+ - lib/locales/km.yml
36
37
  - lib/locales/ko.yml
37
38
  - lib/locales/nb.yml
38
39
  - lib/locales/nl.yml