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 +4 -4
- data/lib/config/pagy.rb +1 -1
- data/lib/javascripts/pagy.js +1 -1
- data/lib/locales/README.md +9 -2
- data/lib/locales/da.yml +22 -0
- data/lib/pagy.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1294620f428cf3807db1ab558bebf4bc01cc43d1e5d1fce668eec802b8a3088
|
4
|
+
data.tar.gz: '094b895627f5bb472d952fbc8e078a23d9f830cc2f2b629945733853e83ef1ce'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a041ca4fad15e46930d178ff9f86c20d66f60408d0ca270d127e615fca4ea29529a04e376905b45742405240b8d55438fbb4be4b60fe9c400171cce222eac64
|
7
|
+
data.tar.gz: bd9f46987b98a2d83e8a03f3e16cf9f02272cbb9177d74e7a2b3e6eca30dcc20b1ed901d5d59a240a521decb0b359c9d5f5be21e10dbf1e970e67e5fc0499e21
|
data/lib/config/pagy.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
# Pagy initializer file (3.7.
|
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
|
|
data/lib/javascripts/pagy.js
CHANGED
data/lib/locales/README.md
CHANGED
@@ -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
|
-
|
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,
|
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
|
|
data/lib/locales/da.yml
ADDED
@@ -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"
|
data/lib/pagy.rb
CHANGED
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
|
+
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-
|
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
|