X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fcaptcha%2Fkocaptcha.ex;h=06ceb20b6f49237f3a706a838b7744751db1162a;hb=a17bfb5fababbe25fa2abcfccd013c9f3edc2ef7;hp=18931d5a07b19193822c8a941259564397e0aecf;hpb=e82e73478e577782407bc8452d17925675d99d10;p=akkoma
diff --git a/lib/pleroma/captcha/kocaptcha.ex b/lib/pleroma/captcha/kocaptcha.ex
index 18931d5a0..06ceb20b6 100644
--- a/lib/pleroma/captcha/kocaptcha.ex
+++ b/lib/pleroma/captcha/kocaptcha.ex
@@ -1,8 +1,9 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Captcha.Kocaptcha do
+ import Pleroma.Web.Gettext
alias Pleroma.Captcha.Service
@behaviour Service
@@ -12,7 +13,7 @@ defmodule Pleroma.Captcha.Kocaptcha do
case Tesla.get(endpoint <> "/new") do
{:error, _} ->
- %{error: "Kocaptcha service unavailable"}
+ %{error: dgettext("errors", "Kocaptcha service unavailable")}
{:ok, res} ->
json_resp = Jason.decode!(res.body)
@@ -32,6 +33,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, "Invalid CAPTCHA"}
+ else: {:error, dgettext("errors", "Invalid CAPTCHA")}
end
end