Locale/localeapp

ruby 3.0 / rails 6.1 incompatibility issue

masterkain opened this issue · 3 comments

using a simple t('users.email.copy') in views results in:

wrong number of arguments (given 2, expected 1)
Trace of template inclusion: #<ActionView::Template app/views/users/show.html.slim locals=["user"]>

Application Trace | Framework Trace | Full Trace
actionview (6.1.3.1) lib/action_view/helpers/translation_helper.rb:70:in `translate'
localeapp (3.1.3) lib/localeapp/rails/force_exception_handler_in_translation_helper.rb:21:in `translate'
app/views/users/partials/_intro.html.slim:16
...

actually I just found out it has something to do with ruby 3.0, with ruby 2.7 the error does not happen

Thanks for reporting this issue @masterkain!
It's fixed by #286 and available in v3.2.0

❯ cat Gemfile.lock| grep locale
    localeapp (3.2.0)
  localeapp (~> 3.2)
bundle exec localeapp install --write-env-file <>
error: wrong number of arguments (given 2, expected 0..1)

Getting same error on 3.2.0