Translation: Rename target language param

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-08-02 09:41:48 +02:00
commit b430093cab
2 changed files with 2 additions and 2 deletions

View file

@ -435,7 +435,7 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do
%Schema{
type: :object,
properties: %{
target_language: %Schema{
lang: %Schema{
type: :string,
nullable: true,
description: "Translation target language."

View file

@ -563,7 +563,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
{:visibility, visibility} when visibility in ["public", "unlisted"] <-
{:visibility, Visibility.get_visibility(object)},
{: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"],