pagy 3.7.4 → 3.7.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e979c20b3707bfa08719b0fca92c4af61815ef525a9473e73ca2ae7e90fb1edf
4
- data.tar.gz: 70fbef96ca45c915f18f47a5e37ecd6c42c2721a808c07c6c7b4c295cc35e501
3
+ metadata.gz: f1294620f428cf3807db1ab558bebf4bc01cc43d1e5d1fce668eec802b8a3088
4
+ data.tar.gz: '094b895627f5bb472d952fbc8e078a23d9f830cc2f2b629945733853e83ef1ce'
5
5
  SHA512:
6
- metadata.gz: f46df19bef1296acd3288e2bcc73dcc6824866ea6abb2ccb31629a4e511baad027dfbba4433cb768291d0c6268221e4e2f3ae32012edb3c0f28c4cbd21798115
7
- data.tar.gz: f2b696abd64a438b605304c142c6dd37f2c2a8039cbb002d8959712784a6d072073165df64485250067f0a8b1b6df6ba1efccd3c02459e5e954b0902b9246cb1
6
+ metadata.gz: 1a041ca4fad15e46930d178ff9f86c20d66f60408d0ca270d127e615fca4ea29529a04e376905b45742405240b8d55438fbb4be4b60fe9c400171cce222eac64
7
+ data.tar.gz: bd9f46987b98a2d83e8a03f3e16cf9f02272cbb9177d74e7a2b3e6eca30dcc20b1ed901d5d59a240a521decb0b359c9d5f5be21e10dbf1e970e67e5fc0499e21
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
  # frozen_string_literal: true
3
3
 
4
- # Pagy initializer file (3.7.4)
4
+ # Pagy initializer file (3.7.5)
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.4';
5
+ Pagy.version = '3.7.5';
6
6
 
7
7
  Pagy.init = function(arg){
8
8
  var target = arg instanceof Event || arg === undefined ? document : arg,
@@ -11,13 +11,20 @@ You can create a Pull Request for your language, and get all the help you need t
11
11
  ### Check list for a new dictionary file:
12
12
 
13
13
  - [ ] Find the pluralization rule for your language
14
- - find the locale file you need in the [list of pluralizations](https://github.com/svenfuchs/rails-i18n/tree/master/rails/pluralization) and check the pluralization rule in it. For example for `en.rb` it is`::RailsI18n::Pluralization::OneOther.with_locale(:en)`. Note the rule part i.e. `OneOther`. In pagy that translates to the symbol `:one_other`.
14
+
15
+ - [ ] Find the locale file you need in the [list of pluralizations](https://github.com/svenfuchs/rails-i18n/tree/master/rails/pluralization) and check the pluralization rule in it. For example it is `::RailsI18n::Pluralization::OneOther.with_locale(:en)` for `en.rb`. Note the rule part i.e. `OneOther`. In pagy that translates to the symbol `:one_other`.
16
+
17
+ - [ ] If the pluralization rule of your language is not the `:one_other` default, confirm that the [p11n.rb](https://github.com/ddnexus/pagy/blob/master/lib/locales/utils/p11n.rb) file already defines the pluralization rule of your dictionary file:
18
+
19
+ - [ ] If the rule is not defined, you can either: a) Add the rule as a new rule/lambda entry in the `p11n` variable hash and relative tests or b) Just create an issue requesting the addition to the rule/lambda entry and tests.
20
+
21
+ - [ ] Add your language to the `plurals` hash in the file.
15
22
 
16
23
  - [ ] add/edit the first line comment in the language rule in your dictionary file (e.g. `# :one_other pluralization ...`
17
24
 
18
25
  - [ ] The mandatory pluralized entry in the dictionary file is the `item_name`. Please, provide all the plurals needed by your language. E.g. if your language uses the `:east_slavic` you should provide the plurals for `one`, `few`, `many` and `other`, if it uses `:one_other`, you should provide `one` and `other` plurals. If it uses `:other` you should only provide a single value. Look into other dictionary files to get some example. Ask if in doubt.
19
26
 
20
- - [ ] The other entries in the dictionary file don't need any plural variant in most languages since the pluralization of the `item_name` in the sentence is enough. However, in some language, the whole sentence needs to be written in a different way for different plurals. In that case you should add the different plurals for the sentence and they will get triggered by the `count`.
27
+ - [ ] The other entries in the dictionary file don't need any plural variant in most languages since the pluralization of the `item_name` in the sentence is enough. However, in some language, a whole sentence might need to be written in different ways for different counts. In that case you should add the different plurals for the sentence and the `count` will trigger the one that applies.
21
28
 
22
29
  Feel free to ask for help in your Pull Request.
23
30
 
@@ -0,0 +1,22 @@
1
+ # :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/locales/utils/p11n.rb)
2
+
3
+ da:
4
+ pagy:
5
+
6
+ item_name:
7
+ one: "resultat"
8
+ other: "resultater"
9
+
10
+ nav:
11
+ prev: "‹ Forrige"
12
+ next: "Næste ›"
13
+ gap: "…"
14
+
15
+ info:
16
+ no_items: "Ingen %{item_name} fundet"
17
+ single_page: "Viser <b>%{count}</b> %{item_name}"
18
+ multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> til <b>%{count}</b> totalt"
19
+
20
+ combo_nav_js: "Side %{page_input} of %{pages}"
21
+
22
+ items_selector_js: "Antal %{items_input} %{item_name} per side"
@@ -4,7 +4,7 @@
4
4
 
5
5
  require 'pathname'
6
6
 
7
- class Pagy ; VERSION = '3.7.4'
7
+ class Pagy ; VERSION = '3.7.5'
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.7.4
4
+ version: 3.7.5
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-23 00:00:00.000000000 Z
11
+ date: 2020-03-31 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/da.yml
28
29
  - lib/locales/de.yml
29
30
  - lib/locales/en.yml
30
31
  - lib/locales/es.yml