Skip to content

Commit

Permalink
added better I18n comments in initializer_example.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jul 4, 2018
1 parent 1f3087b commit cdab354
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions lib/pagy/extras/initializer_example.rb
Expand Up @@ -17,10 +17,6 @@
# See https://ddnexus.github.io/pagy/extras/compact
# require 'pagy/extras/compact'

# I18n: Use the `I18n` gem instead of the pagy implementation
# See https://ddnexus.github.io/pagy/extras/i18n
# require 'pagy/extras/i18n'

# Items: Handle the page :items passed with the params
# See https://ddnexus.github.io/pagy/extras/items
# require 'pagy/extras/items'
Expand Down Expand Up @@ -53,12 +49,19 @@
# Pagy::VARS[:item_path] = 'activerecord.models.product' # example


# Pagy::Frontend::I18N Constant
# Rails: extras assets path required by compact, items and responsive extras
# See https://ddnexus.github.io/pagy/extras
# Rails.application.config.assets.paths << Pagy.root.join('pagy', 'extras', 'javascripts')


# I18n: faster internal pagy implementation (does not use the I18n gem)
# Use only for single language apps that don't need dynamic translation between multiple languages
# See https://ddnexus.github.io/pagy/api/frontend#i18n
# Notice: Do not use the following 2 lines if you use the i18n extra below
# Pagy::Frontend::I18N.load(file:'path/to/dictionary.yml', language:'en') # load a custom file
# Pagy::Frontend::I18N[:plural] = -> (count) {(['zero', 'one'][count] || 'other') # default


# Rails: extras assets path required by compact, items and responsive extras
# See https://ddnexus.github.io/pagy/extras
# Rails.application.config.assets.paths << Pagy.root.join('pagy', 'extras', 'javascripts')
# I18n: Use the `I18n` gem instead of the pagy implementation
# (slower but allows dynamic translation between multiple languages)
# See https://ddnexus.github.io/pagy/extras/i18n
# require 'pagy/extras/i18n'

0 comments on commit cdab354

Please sign in to comment.