1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-17 10:39:17 +00:00
akkoma/config
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
..
benchmark.exs Use finch everywhere (#33) 2022-07-04 16:30:38 +00:00
config.exs Add translation module for Argos Translate (#351) 2022-12-19 13:06:39 +00:00
custom_emoji.txt branch 2020-01-16 16:13:51 +00:00
description.exs Add translation module for Argos Translate (#351) 2022-12-19 13:06:39 +00:00
dev.exs use puts instead warn 2021-07-27 21:01:41 +00:00
docker.exs Docker builds (#231) 2022-10-16 19:25:54 +00:00
dokku.exs Switch from the deprecated "use Mix.config" to "import Config" 2021-05-20 14:02:58 -05:00
prod.exs Switch from the deprecated "use Mix.config" to "import Config" 2021-05-20 14:02:58 -05:00
test.exs Scrape instance nodeinfo (#251) 2022-11-06 22:49:39 +00:00