mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-12 20:25:00 +00:00
c092fc9fd6
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> |
||
---|---|---|
.. | ||
activity | ||
akkoma | ||
collections | ||
config | ||
conversation | ||
docs | ||
ecto_type/activity_pub/object_validators | ||
emails | ||
emoji | ||
http | ||
instances | ||
integration | ||
mfa | ||
migration_helper | ||
object | ||
password | ||
repo/migrations | ||
search | ||
translators | ||
upload | ||
uploaders | ||
user | ||
web | ||
workers | ||
activity_test.exs | ||
announcement_read_relationship_test.exs | ||
announcement_test.exs | ||
application_requirements_test.exs | ||
bookmark_test.exs | ||
captcha_test.exs | ||
config_db_test.exs | ||
config_test.exs | ||
conversation_test.exs | ||
emoji_test.exs | ||
filter_test.exs | ||
following_relationship_test.exs | ||
formatter_test.exs | ||
frontend_test.exs | ||
hashtag_test.exs | ||
healthcheck_test.exs | ||
html_test.exs | ||
http_test.exs | ||
instances_test.exs | ||
job_queue_monitor_test.exs | ||
keys_test.exs | ||
list_test.exs | ||
marker_test.exs | ||
mfa_test.exs | ||
moderation_log_test.exs | ||
notification_test.exs | ||
object_test.exs | ||
otp_version_test.exs | ||
pagination_test.exs | ||
registration_test.exs | ||
repo_test.exs | ||
report_note_test.exs | ||
reverse_proxy_test.exs | ||
runtime_test.exs | ||
safe_jsonb_set_test.exs | ||
scheduled_activity_test.exs | ||
signature_test.exs | ||
stats_test.exs | ||
upload_test.exs | ||
user_invite_token_test.exs | ||
user_relationship_test.exs | ||
user_search_test.exs | ||
user_test.exs | ||
utils_test.exs | ||
xml_builder_test.exs |