Support Mastodon-compatible translations API #1024
No reviewers
Labels
No labels
approved, awaiting change
broken setup
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma!1024
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "mkljczk/akkoma:akkoma-mastoapi-translations"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Signed-off-by: nicole mikołajczyk git@mkljczk.pl
@ -1,6 +1,8 @@defmodule Pleroma.Akkoma.Translators.LibreTranslate do@behaviour Pleroma.Akkoma.Translator@name LibreTranslateMissing quotes to make this a string.
But why use constants here anyway if its only purpose is to be returned from one, single getter function?
@ -500,0 +504,4 @@%Activity{} = activity <- Activity.get_by_id_with_object(id),{:visible, true} <- {:visible, Visibility.visible_for_user?(activity, user)},translation_module <- Config.get([:translator, :module]),{:ok, detected, translation} <-90% of the code here is just duplicated. The only difference is the way initial parameters are acquired and the slightly different output on success. I think this should be deduplicated with a private function
ebfb00f5c224ab1d6545564f979b94tof2e571173bf2e571173btob147d2b19dThanks, seems good to me now and passes CI!