Skip to content

Commit

Permalink
Fix compilation error caused by use Gettext deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
dgigafox authored and cpjolicoeur committed Oct 25, 2024
1 parent e2bf0be commit b086ff1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/gettext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ defmodule Torch.Gettext do
dgettext("errors", "Here is the error message to translate")
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
"""
use Gettext, otp_app: :torch
use Gettext.Backend, otp_app: :torch
end
2 changes: 1 addition & 1 deletion lib/torch/i18n/backend.ex
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Torch.I18n.Backend do
also be overridden to include custom translations.
"""

import Torch.Gettext, only: [dgettext: 2]
use Gettext, backend: Torch.Gettext

def message("Contains"), do: dgettext("default", "Contains")
def message("Equals"), do: dgettext("default", "Equals")
Expand Down

0 comments on commit b086ff1

Please sign in to comment.