aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/captcha/kocaptcha.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/captcha/kocaptcha.ex')
-rw-r--r--lib/pleroma/captcha/kocaptcha.ex5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pleroma/captcha/kocaptcha.ex b/lib/pleroma/captcha/kocaptcha.ex
index 06ceb20b6..6bc2fa158 100644
--- a/lib/pleroma/captcha/kocaptcha.ex
+++ b/lib/pleroma/captcha/kocaptcha.ex
@@ -3,7 +3,6 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Captcha.Kocaptcha do
- import Pleroma.Web.Gettext
alias Pleroma.Captcha.Service
@behaviour Service
@@ -13,7 +12,7 @@ defmodule Pleroma.Captcha.Kocaptcha do
case Tesla.get(endpoint <> "/new") do
{:error, _} ->
- %{error: dgettext("errors", "Kocaptcha service unavailable")}
+ %{error: :kocaptcha_service_unavailable}
{:ok, res} ->
json_resp = Jason.decode!(res.body)
@@ -33,6 +32,6 @@ defmodule Pleroma.Captcha.Kocaptcha do
if not is_nil(captcha) and
:crypto.hash(:md5, captcha) |> Base.encode16() == String.upcase(answer_data),
do: :ok,
- else: {:error, dgettext("errors", "Invalid CAPTCHA")}
+ else: {:error, :invalid}
end
end