Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Mar 31, 2020
2 parents d3dd869 + 2d648f6 commit a3a8fc3
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 9 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,20 @@
# CHANGELOG

## Version 3.7.5

### Changes

- Danish translation
- Re-enabled legacy jruby travis config
- Added ruby 2.7 travis testing and rubocop config

### Commits

- [721d01f](http://github.com/ddnexus/pagy/commit/721d01f): more documentation fixes and improvements
- [246fca7](http://github.com/ddnexus/pagy/commit/246fca7): Danish translation for Pagy (#232)
- [e57215f](http://github.com/ddnexus/pagy/commit/e57215f): added ruby 2.7 travis testing and rubocop target version
- [280164a](http://github.com/ddnexus/pagy/commit/280164a): re-enabled travis testing for old jruby (travis fixed the jruby images issue)

## Version 3.7.4

### Changes
Expand Down
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Expand Up @@ -96,6 +96,7 @@ <h1 id="site-title">{{ site.title | default: site.github.repository_name }}
<div id="toc">
<a href="{{ site.baseurl }}/index"><p {% if page.title == 'Basic Concepts' %}id="active"{% endif %} >Basic Concepts</p></a>
<a href="{{ site.baseurl }}/how-to"><p {% if page.title == 'How To' %}id="active"{% endif %} >How To</p></a>
<a href="{{ site.baseurl }}/migration-guide"><p {% if page.title == 'Migration Guide' %}id="active"{% endif %} >Migrate WillPaginate/Kaminari</p></a>
<a href="{{ site.baseurl }}/api"><p {% if page.title == 'API' %}id="active"{% endif %} >API</p></a>
<a href="{{ site.baseurl }}/api/pagy"><p class="indent1" {% if page.title == 'Pagy' %}id="active"{% endif %} >Pagy</p></a>
<a href="{{ site.baseurl }}/api/backend"><p class="indent1" {% if page.title == 'Pagy::Backend' %}id="active"{% endif %} >Pagy::Backend</p></a>
Expand All @@ -122,7 +123,6 @@ <h1 id="site-title">{{ site.title | default: site.github.repository_name }}
<a href="{{ site.baseurl }}/extras/support"><p class="indent1" {% if page.title == 'Support' %}id="active"{% endif %} >Support</p></a>
<a href="{{ site.baseurl }}/extras/trim"><p class="indent1" {% if page.title == 'Trim' %}id="active"{% endif %} >Trim</p></a>
<a href="{{ site.baseurl }}/extras/uikit"><p class="indent1" {% if page.title == 'UIkit' %}id="active"{% endif %} >UIkit</p></a>
<a href="{{ site.baseurl }}/migration-guide"><p {% if page.title == 'Migration Guide' %}id="active"{% endif %} >Migrate WillPaginate/Kaminari</p></a>
</div>

<a id="gitter" href="https://gitter.im/ruby-pagy/Lobby" rel="nofollow" target="_blank"><p>&#10145; Chat Support on Gitter &#10145;</p></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/frontend.md
Expand Up @@ -170,7 +170,7 @@ The pagy internal i18n is implemented around the `Pagy::I18n` constant. You may

#### Pagy::I18n.load configuration

By default pagy will render its output using the built-in `en` locale. If your app uses only `en` and you are fine with the built-in strings, you are done without configuring anything at all.
By default pagy will render its output using the built-in `en` locale. If your app uses only `en` and you are fine with the built-in strings, you are done without configuring anything at all and you can just skip this whole section.

If you need to load different built-in locales, and/or custom dictionary files or even non built-in languages and pluralizations, you can do it all by passing a few arguments to the `Pagy::I18n.load` method.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/javascript.md
Expand Up @@ -217,7 +217,7 @@ The following `pagy*_combo_nav_js` offer an alternative pagination UI that combi
- `pagy_materialize_combo_nav_js`
- `pagy_semantic_combo_nav_js`

They are the fastest and lighter `nav` on modern environments, recommended when you care about efficiency and server load _(see [Maximizing Performance](../how-to.md#maximizing-performance))_.
They are the fastest and lightest `nav` on modern environments, recommended when you care about efficiency and server load _(see [Maximizing Performance](../how-to.md#maximizing-performance))_.

Here is a screenshot (from the `bootstrap` extra):

Expand Down
2 changes: 1 addition & 1 deletion docs/api/pagy.md
Expand Up @@ -147,7 +147,7 @@ Which means:

- there is always a `page` #`1` in the pagination, even if it's empty
- `pages` and `last` are always at least both `1`
- the `series` array contains always at least the page #`1`, which for a single page is also the current page, thus a string. With `size: []` series returns `[]`
- the `series` array contains always at least the page #`1`, which for a single page is also the current page, thus a string. With `size: []` the `series` method returns `[]`
- `from` and `to` of an empty page are both `0`
- `prev` and `next` of a single page (not necessary an empty one) are both `nil` (i.e. there is no other page)

Expand Down
4 changes: 2 additions & 2 deletions docs/how-to.md
Expand Up @@ -136,7 +136,7 @@ Pagy can also work in any other scenario assuming that:

You can control the items per page with the `items` variable. (Default `20`)

You can set its default in the `pagy.rb` initializer _(see [Configuration](#global-configuration)_. For example:
You can set its default in the `pagy.rb` initializer _(see [Configuration](#global-configuration))_. For example:

```ruby
Pagy::VARS[:items] = 25
Expand Down Expand Up @@ -432,7 +432,7 @@ By default Pagy generates all the page links including the `page` param. If you

The `pagy_nav*` helpers are optimized for speed, and they are really fast. On the other hand editing a template might be easier when you have to customize the rendering, however every template system adds some inevitable overhead and it will be about 30-70% slower than using the related helper. That will still be dozens of times faster than the other gems, but... you should choose wisely.

Pagy provides the replacement templates for the `pagy_nav`, `pagy_bootstrap_nav`, `pagy_bulma_nav` and the `pagy_foundation_nav` helpers (available with the relative extras) in 3 flavors: `erb`, `haml` and `slim`.
Pagy provides the replacement templates for the `pagy_nav`, `pagy_bootstrap_nav`, `pagy_bulma_nav`, `pagy_foundation_nav`, and the `pagy_uikit_nav` helpers (available with the relative extras) in 3 flavors: `erb`, `haml` and `slim`.

They produce exactly the same output of the helpers, but since they are slower, using them wouldn't make any sense unless you need to change something. In that case customize a copy in your app, then use it as any other template: just remember to pass the `:pagy` local set to the `@pagy` object. Here are the links to the sources to copy:

Expand Down
2 changes: 1 addition & 1 deletion lib/config/pagy.rb
@@ -1,7 +1,7 @@
# encoding: utf-8
# frozen_string_literal: true

# Pagy initializer file (3.7.4)
# Pagy initializer file (3.7.5)
# Customize only what you really need and notice that Pagy works also without any of the following lines.
# Should you just cherry pick part of this file, please maintain the require-order of the extras

Expand Down
2 changes: 1 addition & 1 deletion lib/javascripts/pagy.js
Expand Up @@ -2,7 +2,7 @@

function Pagy(){}

Pagy.version = '3.7.4';
Pagy.version = '3.7.5';

Pagy.init = function(arg){
var target = arg instanceof Event || arg === undefined ? document : arg,
Expand Down
22 changes: 22 additions & 0 deletions lib/locales/da.yml
@@ -0,0 +1,22 @@
# :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/locales/utils/p11n.rb)

da:
pagy:

item_name:
one: "resultat"
other: "resultater"

nav:
prev: "&lsaquo;&nbsp;Forrige"
next: "Næste&nbsp;&rsaquo;"
gap: "&hellip;"

info:
no_items: "Ingen %{item_name} fundet"
single_page: "Viser <b>%{count}</b> %{item_name}"
multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> til <b>%{count}</b> totalt"

combo_nav_js: "Side %{page_input} of %{pages}"

items_selector_js: "Antal %{items_input} %{item_name} per side"
2 changes: 1 addition & 1 deletion lib/pagy.rb
Expand Up @@ -4,7 +4,7 @@

require 'pathname'

class Pagy ; VERSION = '3.7.4'
class Pagy ; VERSION = '3.7.5'

# Root pathname to get the path of Pagy files like templates or dictionaries
def self.root; @root ||= Pathname.new(__FILE__).dirname.freeze end
Expand Down

0 comments on commit a3a8fc3

Please sign in to comment.