We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa1aad9 commit ae3e4bcCopy full SHA for ae3e4bc
2 files changed
βlib/pagy/extras/i18n.rbβ
@@ -10,7 +10,7 @@ module Frontend
10
11
Pagy::I18n.clear.instance_eval { undef :load; undef :t } # unload the pagy default constant for efficiency
12
13
- # no :pagy_without_i18n alias with the i18n gem
+ alias :pagy_without_i18n :pagy_t
14
def pagy_t_with_i18n(*args) ::I18n.t(*args) end
15
alias :pagy_t :pagy_t_with_i18n
16
βlib/pagy/frontend.rbβ
@@ -67,7 +67,7 @@ def pagy_link_proc(pagy, link_extra='')
67
end
68
69
# Similar to I18n.t: just ~18x faster using ~10x less memory
70
- def pagy_t(path, vars={}) Pagy::I18n.t(@pagy_locale, path, vars) end
+ def pagy_t(path, vars={}) Pagy::I18n.t(@pagy_locale||=nil, path, vars) end
71
72
73
0 commit comments