Fix translation param
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
f6b3fb9753
commit
a742bd6c22
2 changed files with 2 additions and 2 deletions
|
@ -442,7 +442,7 @@ def translate_operation do
|
|||
%Schema{
|
||||
type: :object,
|
||||
properties: %{
|
||||
target_language: %Schema{
|
||||
lang: %Schema{
|
||||
type: :string,
|
||||
nullable: true,
|
||||
description: "Translation target language."
|
||||
|
|
|
@ -574,7 +574,7 @@ def translate(
|
|||
Object.local?(object) ||
|
||||
Pleroma.Config.get([Pleroma.Language.Translation, :allow_remote])},
|
||||
{:language, language} when is_binary(language) <-
|
||||
{:language, Map.get(params, :target_language) || user.language},
|
||||
{:language, Map.get(params, :lang) || user.language},
|
||||
{:ok, result} <-
|
||||
Translation.translate(
|
||||
object.data["content"],
|
||||
|
|
Loading…
Reference in a new issue