Skip to content

Commit

Permalink
Fix translation param
Browse files Browse the repository at this point in the history
Signed-off-by: marcin mikołajczak <[email protected]>
  • Loading branch information
mkljczk committed Aug 20, 2024
1 parent f6b3fb9 commit a742bd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pleroma/web/api_spec/operations/status_operation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ defmodule Pleroma.Web.ApiSpec.StatusOperation do
%Schema{
type: :object,
properties: %{
target_language: %Schema{
lang: %Schema{
type: :string,
nullable: true,
description: "Translation target language."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
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"],
Expand Down

0 comments on commit a742bd6

Please sign in to comment.