Skip to content

Commit 997828f

Browse files
committed
Fix Gettext issue
1 parent 01cf1c3 commit 997828f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/jsonrpc2_plug/validator/dataset.ex

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ defmodule JSONRPC2Plug.Validator.Dataset do
4646
error_messages(errors, [{key, key_messages} | messages])
4747
end
4848

49-
defp gettext(msg, opts),
50-
do: Gettext.dgettext(JSONRPC2Plug.Gettext, "errors", msg, opts)
49+
defp gettext(msg, opts) do
50+
backend = Application.get_env(
51+
:jsonrpc2_plug, JSONRPC2Plug.Gettext.Backend, JSONRPC2Plug.Gettext
52+
)
53+
54+
Gettext.dgettext(backend, "errors", msg, opts)
55+
end
5156
end

0 commit comments

Comments
 (0)