Sha256: 773b1530dfc2f2a17d320b96d01656589c1a47b607a20ce9fd7b8d571488206a

Contents?: true

Size: 366 Bytes

Versions: 6

Compression:

Stored size: 366 Bytes

Contents

# See the Pagy documentation: https://ddnexus.github.io/pagy/extras/i18n
# frozen_string_literal: true

class Pagy
  # Use ::I18n gem
  module I18nExtra
    def pagy_t(key, **opts)
      ::I18n.t(key, **opts)
    end
  end
  Frontend.prepend I18nExtra

  # Add the pagy locales to the I18n.load_path
  ::I18n.load_path += Dir[Pagy.root.join('locales', '*.yml')]
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pagy-5.1.3 lib/pagy/extras/i18n.rb
pagy-5.1.2 lib/pagy/extras/i18n.rb
pagy-5.1.1 lib/pagy/extras/i18n.rb
pagy-5.1.0 lib/pagy/extras/i18n.rb
pagy-5.0.1 lib/pagy/extras/i18n.rb
pagy-5.0.0 lib/pagy/extras/i18n.rb