Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33103587
provider.ex
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
provider.ex
View Options
# 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
alias
Pleroma.Language.Translation.Provider
@callback
missing_dependencies
()
::
[
String
.
t
()]
@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
()}
@callback
supported_languages
(
type
::
:string
|
:target
)
::
{
:ok
,
[
String
.
t
()]}
|
{
:error
,
atom
()}
@callback
languages_matrix
()
::
{
:ok
,
map
()}
|
{
:error
,
atom
()}
@callback
name
()
::
String
.
t
()
defmacro
__using__
(
_opts
)
do
quote
do
@impl
Provider
def
missing_dependencies
,
do
:
[]
defoverridable
missing_dependencies
:
0
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-ruby
Expires
Tue, Jan 20, 1:59 PM (15 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
973807
Default Alt Text
provider.ex (1 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment