Reserved key when using I18n-tasks add-missing

73 views Asked by At

I'm developing a ruby on rails app.

I've been using the i18n-tasks gem from the start.

My "i18n-tasks add-missing" command has never caused any problems, I haven't used it for 2-3 weeks, when I use it, now, I get the error message below. ...

I'm stuck, I can't resolve the situation.

 GESTION git:(AddKitchen) ✗ i18n-tasks add-missing
/home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n/backend/base.rb:65:in `translate': reserved key :default used in "Value. Interpolates: %{value}, %{human_key}, %{key}, %{default}, %{value_or_human_key}, %{value_or_default_or_human_key}" (I18n::ReservedInterpolationKey)
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:363:in `block in translate_key'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:362:in `catch'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:362:in `translate_key'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:222:in `translate'
from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/command/dsl.rb:46:in `block in t'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:188:in `try_call'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:155:in `block in optparse_args'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:155:in `map!'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:155:in `optparse_args'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:92:in `block (2 levels) in optparse_command!'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:91:in `each'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:91:in `block in optparse_command!'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/3.1.0/optparse.rb:1102:in `initialize'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:90:in `new'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:90:in `optparse_command!'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:80:in `optparse!'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:73:in `parse!'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:50:in `block in run'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-1.14.4/lib/i18n.rb:322:in `with_locale'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:49:in `run'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:18:in `block in start'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:211:in `auto_output_coloring'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:17:in `start'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/lib/i18n/tasks/cli.rb:11:in `start'
        from /home/quentin/.rbenv/versions/3.1.4/lib/ruby/gems/3.1.0/gems/i18n-tasks-1.0.13/bin/i18n-tasks:15:in `<top (required)>'
        from /home/quentin/.rbenv/versions/3.1.4/bin/i18n-tasks:25:in `load'
        from /home/quentin/.rbenv/versions/3.1.4/bin/i18n-tasks:25:in `<main>'

I do not understand what is happening. I tried deleting the content page by page to see if it was related to my code, but it must be the environment because it didn't solve anything.

The error talks about the use of a ":default" key, but when searching my app, I have no key either in the en.yml file or in the code (search done via the grep command - r)

I tried doing a bundle update, but that didn't solve anything either.

I tried to go back to my master which I haven't modified for a long time, where everything worked fine, but same error as on my branch...

0

There are 0 answers