diff --git a/lib/pleroma/web/api_spec/operations/status_operation.ex b/lib/pleroma/web/api_spec/operations/status_operation.ex index fda77d8496..6593cc9aa1 100644 --- a/lib/pleroma/web/api_spec/operations/status_operation.ex +++ b/lib/pleroma/web/api_spec/operations/status_operation.ex @@ -448,7 +448,7 @@ def translate_operation do %Schema{ type: :object, properties: %{ - target_language: %Schema{ + lang: %Schema{ type: :string, nullable: true, description: "Translation target language." diff --git a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex index 95612c7556..54070eee93 100644 --- a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex @@ -611,7 +611,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}, %StatusTranslation{} = result <- translate_one(status_id, language, user) do render(conn, "translation.json", result: result) else