Gettext changes - where to make updates in the app

Hola,

I’ve got a question regarding the new Gettext changes.
According to the docs -

I’m looking for where I need to make updates in the app.
For example, under lib/app_web.ex @html_helpers, the was the old import MyAppWeb.Gettext what else needs to change moving on to the new API?
Writing here after looking for info online.

Thanks.

So, from what I’ve seen so far, the changes should be in

  1. core_components
  2. app_web.ex in controller & html_helpers

replace the old with - use Gettext, backend: App.Gettext.

Those are all the places I’ve seen for the imports with a “stock” Phoenix app. Then for the actual Gettext module itself in lib/myapp_web/gettext.ex, just need to change to use Gettext.Backend, otp_app: :myapp

1 Like

Look into igniter it has a mix task do this automatically.

2 Likes