mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-06-09 08:49:32 +00:00
2b739faa7e
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
21 lines
640 B
Elixir
21 lines
640 B
Elixir
# Pleroma: A lightweight social networking server
|
|
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
defmodule Pleroma.Language.Translation.Provider do
|
|
@callback configured?() :: boolean()
|
|
|
|
@callback translate(
|
|
content :: String.t(),
|
|
source_language :: String.t(),
|
|
target_language :: String.t()
|
|
) ::
|
|
{:ok,
|
|
%{
|
|
content: String.t(),
|
|
detected_source_language: String.t(),
|
|
provider: String.t()
|
|
}}
|
|
| {:error, atom()}
|
|
end
|