1
0
Fork 0
forked from mirrors/akkoma
akkoma/lib/pleroma
ilja c092fc9fd6 Add translation module for Argos Translate (#351)
Argos Translate is a Python module for translation and can be used as a command line tool.

This is also the engine for LibreTranslate, for which we already have a module.
Here we can use the engine directly from our server without doing requests to a third party or having to install our own LibreTranslate webservice (obviously you do have to install Argos Translate).

One thing that's currently still missing from Argos Translate is auto-detection of languages (see <https://github.com/argosopentech/argos-translate/issues/9>). For now, when no source language is provided, we just return the text unchanged, supposedly translated from the target language. That way you get a near immediate response in pleroma-fe when clicking Translate, after which you can select the source language from a dropdown.

Argos Translate also doesn't seem to handle html very well. Therefore we give admins the option to strip the html before translating. I made this an option because I'm unsure if/how this will change in the future.

Co-authored-by: ilja <git@ilja.space>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/351
Co-authored-by: ilja <akkoma.dev@ilja.space>
Co-committed-by: ilja <akkoma.dev@ilja.space>
2022-12-19 13:06:39 +00:00
..
activity giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
akkoma Add translation module for Argos Translate (#351) 2022-12-19 13:06:39 +00:00
captcha
collections Add URL and code to :not_found errors 2022-12-09 20:13:31 +00:00
config Add option to modify HTTP pool size 2022-12-16 18:33:00 +00:00
conversation Add API endpoint to remove a conversation 2021-02-15 21:48:13 +04:00
docs backend-i18n (#121) 2022-07-27 21:56:59 +00:00
ecto_type recipients fixes/hardening for CreateGenericValidator 2021-04-05 19:19:11 +02:00
emails Remove hackney/gun in favour of finch 2022-12-11 19:19:31 +00:00
emoji giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
helpers giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
http Add option to modify HTTP pool size 2022-12-16 18:33:00 +00:00
instances Add Signed Fetch Statistics (#312) 2022-11-26 19:22:56 +00:00
mfa
migration_helper purge chat and shout endpoints 2022-07-21 11:29:28 +01:00
migrators giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
object allow http AS profile in ld+json header 2022-12-12 19:06:04 +00:00
password
reverse_proxy giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
search giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
tests Fix compile cycle in Pleroma.Tests.AuthTestController 2021-06-09 13:30:19 -05:00
upload giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
uploaders Use finch everywhere (#33) 2022-07-04 16:30:38 +00:00
user giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
web revert 28ab09d377 2022-12-19 02:34:46 +00:00
workers Purge Rejected Follow requests in daily task (#334) 2022-12-03 23:17:43 +00:00
activity.ex Resolve follow activity from accept/reject without ID (#328) 2022-12-02 11:12:37 +00:00
announcement.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
announcement_read_relationship.ex Merge branch 'from/upstream-develop/tusooa/server-announcements' into 'develop' (#85) 2022-07-18 13:08:36 +00:00
application.ex Add option to modify HTTP pool size 2022-12-16 18:33:00 +00:00
application_requirements.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
bookmark.ex
caching.ex
captcha.ex
clippy.ex
config.ex Merge remote-tracking branch 'remotes/origin/develop' into feature/object-hashtags-rework 2021-02-23 13:58:35 +03:00
config_db.ex Remove quack, ensure adapter is finch 2022-12-11 23:22:35 +00:00
constants.ex Post editing (#202) 2022-09-06 19:24:02 +00:00
conversation.ex Add API endpoint to remove a conversation 2021-02-15 21:48:13 +04:00
counter_cache.ex
data_migration.ex [#3213] HashtagsTableMigrator state management refactoring & improvements (proper stats serialization etc.). 2021-02-16 23:14:15 +03:00
delivery.ex
ecto_enums.ex v2 Suggestions: dismiss a suggestion 2021-11-26 20:19:29 -06:00
emoji-test.txt emoji-test: update to latest 15.0 draft 2022-09-11 19:55:45 +01:00
emoji.ex add extra tests for builder 2022-09-05 01:24:40 +01:00
filter.ex
following_relationship.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
formatter.ex allow small/center tags in misskeymarkdown (#132) 2022-08-01 12:46:52 +00:00
frontend.ex Ensure Gun is Gone 2022-12-11 19:26:21 +00:00
hashtag.ex Remerge of hashtag following (#341) 2022-12-05 12:58:48 +00:00
healthcheck.ex
html.ex Break out activity-specific HTML functions into Pleroma.Activity.HTML 2021-05-29 12:29:11 -05:00
http.ex Take tesla telemetry 2022-12-15 01:04:56 +00:00
instances.ex Add Signed Fetch Statistics (#312) 2022-11-26 19:22:56 +00:00
job_queue_monitor.ex
jwt.ex
keys.ex
list.ex
logging.ex
maintenance.ex Fix typo 2021-10-06 10:49:25 -05:00
maps.ex utils: Fix maybe_splice_recipient when "object" isn’t a map 2021-04-05 19:19:12 +02:00
marker.ex
mfa.ex
moderation_log.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
notification.ex optimise notifications query 2022-10-11 11:40:43 +01:00
object.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
object_tombstone.ex
otp_version.ex
pagination.ex [#3213] Performance optimization of filtering by hashtags ("any" condition). 2021-03-07 11:33:21 +03:00
password_reset_token.ex
registration.ex
release_tasks.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
repo.ex Remove instrumentors (#98) 2022-07-21 11:32:17 +00:00
report_note.ex
reverse_proxy.ex Fix emoji qualification (#124) 2022-07-28 12:02:36 +00:00
scheduled_activity.ex
search.ex Don't try removing deleted users and such from index as posts 2022-06-29 20:49:45 +01:00
signature.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
stats.ex update stats every 5 minutes 2022-12-16 17:22:56 +00:00
thread_mute.ex
upload.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
user.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
user_invite_token.ex
user_note.ex MastoAPI: Add user notes on accounts 2021-11-21 16:56:26 +01:00
user_relationship.ex fix flaky test_user_relationship_test.exs:81 2022-10-23 13:31:01 +02:00
utils.ex extend custom runtime system (#108) 2022-07-24 16:42:43 +00:00
web.ex giant massive dep upgrade and dialyxir-found error emporium (#371) 2022-12-14 12:38:48 +00:00
xml_builder.ex