Translation: Rename target language param
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
b07fd324fb
commit
b430093cab
2 changed files with 2 additions and 2 deletions
|
|
@ -435,7 +435,7 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation 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."
|
||||||
|
|
|
||||||
|
|
@ -563,7 +563,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
|
||||||
{:visibility, visibility} when visibility in ["public", "unlisted"] <-
|
{:visibility, visibility} when visibility in ["public", "unlisted"] <-
|
||||||
{:visibility, Visibility.get_visibility(object)},
|
{:visibility, Visibility.get_visibility(object)},
|
||||||
{: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},
|
||||||
{:ok, result} <-
|
{:ok, result} <-
|
||||||
Translation.translate(
|
Translation.translate(
|
||||||
object.data["content"],
|
object.data["content"],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue