Merge branch 'fork' into backend-new
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
commit
84541a1a0a
2 changed files with 2 additions and 2 deletions
|
@ -448,7 +448,7 @@ def translate_operation do
|
||||||
%Schema{
|
%Schema{
|
||||||
type: :object,
|
type: :object,
|
||||||
properties: %{
|
properties: %{
|
||||||
target_language: %Schema{
|
lang: %Schema{
|
||||||
type: :string,
|
type: :string,
|
||||||
nullable: true,
|
nullable: true,
|
||||||
description: "Translation target language."
|
description: "Translation target language."
|
||||||
|
|
|
@ -611,7 +611,7 @@ def translate(
|
||||||
Object.local?(object) ||
|
Object.local?(object) ||
|
||||||
Pleroma.Config.get([Pleroma.Language.Translation, :allow_remote])},
|
Pleroma.Config.get([Pleroma.Language.Translation, :allow_remote])},
|
||||||
{:language, language} when is_binary(language) <-
|
{:language, language} when is_binary(language) <-
|
||||||
{:language, Map.get(params, :target_language) || user.language},
|
{:language, Map.get(params, :lang) || user.language},
|
||||||
%StatusTranslation{} = result <- translate_one(status_id, language, user) do
|
%StatusTranslation{} = result <- translate_one(status_id, language, user) do
|
||||||
render(conn, "translation.json", result: result)
|
render(conn, "translation.json", result: result)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue