Support Mastodon-compatible translations API #1024

Merged
Oneric merged 4 commits from mkljczk/akkoma:akkoma-mastoapi-translations into develop 2026-01-04 16:11:28 +00:00
Contributor

Signed-off-by: nicole mikołajczyk git@mkljczk.pl

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
Support Mastodon-compatible translations API
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
ebfb00f5c2
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
@ -1,6 +1,8 @@
defmodule Pleroma.Akkoma.Translators.LibreTranslate do
@behaviour Pleroma.Akkoma.Translator
@name LibreTranslate
Owner

Missing 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?

Missing 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?
mkljczk marked this conversation as resolved
@ -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} <-
Owner

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

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
mkljczk marked this conversation as resolved
mkljczk force-pushed akkoma-mastoapi-translations from ebfb00f5c2
Some checks are pending
ci/woodpecker/pr/test/1 Pipeline is pending approval
ci/woodpecker/pr/test/2 Pipeline is pending approval
to 24ab1d6545 2025-12-15 22:33:58 +00:00
Compare
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
mkljczk force-pushed akkoma-mastoapi-translations from 564f979b94 to f2e571173b 2025-12-15 23:01:23 +00:00 Compare
Oneric force-pushed akkoma-mastoapi-translations from f2e571173b to b147d2b19d
All checks were successful
ci/woodpecker/pr/test/2 Pipeline was successful
ci/woodpecker/pr/test/1 Pipeline was successful
2026-01-04 15:49:06 +00:00
Compare
Owner

Thanks, seems good to me now and passes CI!

Thanks, seems good to me now and passes CI!
Oneric merged commit e941f8c7c1 into develop 2026-01-04 16:11:28 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AkkomaGang/akkoma!1024
No description provided.