Commit graph

109 commits

Author SHA1 Message Date
Piero Toffanin
2b0074b94f Only show target languages, check swap, bump version 2022-12-10 00:21:38 -05:00
Piero Toffanin
0875fdc433 Server-side check for target lang 2022-12-10 00:03:21 -05:00
Piero Toffanin
6621c51b52 Fix array 2022-12-09 16:38:58 -05:00
Piero Toffanin
e79089b5c1 Extend /languages to include targets 2022-12-09 16:36:12 -05:00
Piero Toffanin
0478d4ee2c Handle empty translation 2022-12-09 14:35:39 -05:00
Piero Toffanin
b87b210bfc Fix indent 2022-12-09 14:29:44 -05:00
P.J. Finlay
ee638b407d Remove Polyglot transliteration library
The model server for the Polyglot transliteration library is currently
down and the project looks unmaintained; this currently is breaking
LibreTranslate installs. This commit removes Polyglot for
transliteration but keeps using Polyglot for language detection.

- https://github.com/LibreTranslate/LibreTranslate/issues/344
- https://community.libretranslate.com/t/improving-transliteration-in-libretranslate/400
2022-11-16 08:59:11 -06:00
Piero Toffanin
6cf1a931fa Fix swagger schema id for translate_file 2022-10-18 11:41:36 -04:00
Piero Toffanin
70c4571067 Add --req-limit-storage redis support 2022-10-14 13:27:34 -04:00
Piero Toffanin
bc8b331fe9 Do not decrease flood violations 2022-10-14 12:49:28 -04:00
dingedi
077d6e9efa
move and improve_translation in language.py, use it for transliteration 2022-09-23 13:59:13 +02:00
Minosity-VR
752d2aae2c
Add api keys db path as env var (#1)
* Add API Keys DB path to command & env vars

* Create API Keys DB directory if not exists before sqlite connection & Add docker-compose example
2022-07-15 13:22:04 +02:00
Piero Toffanin
78d2bc7be4 Better error message when API key link is available 2022-06-21 16:39:08 -04:00
Piero Toffanin
ed68f1bcf9 Add --get-api-key-link 2022-06-21 15:17:42 -04:00
Piero Toffanin
8f8087f8ae Add --api-keys-remote 2022-06-21 14:57:32 -04:00
dingedi
9831ba88a6
improve translation of punctuation 2022-05-30 09:14:45 +02:00
dingedi
3873d51c3c
improve translation formating 2022-05-03 16:48:06 +02:00
Dingedi
5773adaabd
Revert "improve translation formating" 2022-05-03 16:43:05 +02:00
dingedi
a91303d27e
improve translation formating 2022-05-03 16:30:20 +02:00
Sébastien Thuret
51768e2d82
update deprecated parameter name 2022-04-07 15:56:57 +02:00
Sébastien Thuret
d7377d174b
/languages should be only available for GET 2022-04-03 13:17:13 +02:00
Sébastien Thuret
a88841c174
upgrade-to-flask2 2022-03-26 09:02:54 +01:00
Kyle Harrity
2499c6c379 include language detected, confidence for /translate calls with auto detect 2022-03-25 02:19:56 -04:00
Ali Sherief
e23b96f1da Fix language detection error
The root cause was load_installed_languages() of argostranslate
being called at the top of the file instead of inside a function,
this caused the list of installed languages to incorrectly be
returned as an empty list.
2022-03-04 08:23:11 +00:00
Mufeed Ali
9edcbe8bea
suggestions: Abort when missing parameters 2022-02-20 22:52:12 +05:30
Mufeed Ali
2ddb415bba
cleanup: Whitespaces and imports
- Remove unnecessary import
- Reorder imports
- Fix whitespace issues
2022-02-20 13:39:02 +05:30
Mufeed Ali
933c96914b
app: Fail when giving invalid API keys
When an API key is passed, fail in the case of an invalid API key even
if an API key is not required. This allows the user to know that the API
key is invalid. Otherwise, they work under the assumption that the API
key is correct, even though it is not.
2022-02-20 13:36:29 +05:30
Piero Toffanin
61a148d692
Use len 2022-02-07 11:22:08 -05:00
Piero Toffanin
0d122c5d53
Merge pull request #206 from dingedi/feature/set-default-language
set default language instead of raise error
2022-02-07 11:21:20 -05:00
Sébastien Thuret
6b18b23b46
Add --disable-web-ui 2022-02-07 11:02:32 +01:00
Sébastien Thuret
b8df98fdce
set default language instead of raise error 2022-02-07 10:45:31 +01:00
Dingedi
79e5b0fb50
unescape html entity codes (ex: &apos) 2022-02-06 14:54:52 +01:00
Piero Toffanin
ffc0c1dcda
Merge pull request #165 from fushinari/key-support-frontend
Expose api_keys in frontend settings
2021-11-07 15:09:47 -05:00
Sébastien Thuret
adfdc8c9e5
decrease counter if the user wait after the slowdown notice 2021-11-05 14:56:04 +01:00
Mufeed Ali
2375cea3ca
Expose api_keys in frontend settings
This is useful for applications that want to know beforehand if usage of
an API key is supported.
2021-11-03 20:26:04 +05:30
Mufeed Ali
3af4ce16e1
Require API key for submitting suggestions
Also removes limiter exemption
2021-10-31 11:23:25 +05:30
Mufeed Ali
915b912c29
Expose require_api_key_origin in frontend settings
This is useful for applications that want to know beforehand if an API
key is necessary before accessing the running instance.
2021-10-30 21:01:50 +05:30
Piero Toffanin
f3029d65d5 Remove api_key param from download url 2021-10-26 17:28:59 -04:00
Piero Toffanin
c778aa9960 Remove access check for download endpoint 2021-10-26 17:27:33 -04:00
Piero Toffanin
a82b851a3d Fix API key logic, add some error handling 2021-10-26 17:13:51 -04:00
Piero Toffanin
93b711aa74 Update spec version 2021-10-26 16:06:12 -04:00
Piero Toffanin
9d95e07d82 Style fix 2021-10-26 16:04:50 -04:00
Piero Toffanin
a1244b9e3e Path traversal check 2021-10-26 15:41:14 -04:00
Piero Toffanin
d12c81b773 Add VERSION 2021-10-26 15:32:06 -04:00
Sébastien Thuret
aac45a60ab
remove scheduler if files translation is disabled 2021-10-25 17:12:09 +02:00
Sébastien Thuret
909deccd3f
disable routes 2021-10-25 17:09:23 +02:00
Sébastien Thuret
9e272cb80c
remove uuid and fix downloaded filename 2021-10-25 12:05:39 +02:00
Sébastien Thuret
c5f47f0917
add scheduler to remove files after 30 minutes instead of after download 2021-10-25 11:46:49 +02:00
Sébastien Thuret
5f2d0435f2
change tmp dir 2021-10-25 11:06:39 +02:00
Sébastien Thuret
8d5a418bee
format 2021-10-25 10:56:17 +02:00