Commit graph

1960 commits

Author SHA1 Message Date
Alex Gleason
a7bca0bdff
Remove DittoWallet module 2024-10-11 18:06:17 -05:00
Alex Gleason
7dff4e88d4 Merge branch 'captcha-n' into 'main'
Switch captcha_solved from a label event to an n-tag on a user event

See merge request soapbox-pub/ditto!547
2024-10-11 22:43:39 +00:00
Alex Gleason
d4f3c673a2
deno lint 2024-10-11 17:35:45 -05:00
Alex Gleason
81a15ac82d Merge branch 'improve-lande-use' into 'main'
Improve setLanguage() function for better language detection

See merge request soapbox-pub/ditto!543
2024-10-11 21:52:11 +00:00
Alex Gleason
a484634d36
Switch captcha_solved from a label event to an n-tag on a user event 2024-10-11 16:50:52 -05:00
P. Reis
9c7e35a6b4 refactor: code preferences, formatting 2024-10-11 18:47:38 -03:00
Alex Gleason
c5ddd2ebb7
Make verify_credentials and update_credentials return a consistent CredentialAccount object 2024-10-11 16:25:29 -05:00
P. Reis
36d09af467 feat: make lande great again
create detectLanguage() function that removes emojis, links and other weird invisible characters
2024-10-11 14:28:01 -03:00
Alex Gleason
6fb3bfafc0
Mark registrations enabled in v2 instance 2024-10-11 02:52:41 -05:00
P. Reis
1cb13b141a feat: improve setLanguage() function, remove links and emojis from event.content before using lande 2024-10-10 22:46:37 -03:00
Alex Gleason
df3b8863df
LibreTranslateTranslator: move headers to plain object, add url variable 2024-10-10 14:16:29 -05:00
Alex Gleason
655e94ef91
DittoTranslator: move provider to top of interface 2024-10-10 14:14:29 -05:00
Alex Gleason
12d643e150
Add translation cache metrics, let the cache be configurable 2024-10-10 14:12:20 -05:00
Alex Gleason
d639d9a14d
Reorganize translation interfaces/files 2024-10-10 14:06:04 -05:00
Alex Gleason
874da1baad
Delete unused cacheMiddleware and ExpiringCache module 2024-10-10 14:01:18 -05:00
Alex Gleason
9469fff6ac
Rename translation variables from _ENDPOINT to _BASE_URL 2024-10-10 13:48:50 -05:00
Alex Gleason
6107ce88e2
metrics: ditto_db_query_duration_ms -> ditto_db_query_duration_seconds 2024-10-10 13:20:48 -05:00
Alex Gleason
81c28825a8
Record HTTP response time metrics 2024-10-10 13:20:03 -05:00
Alex Gleason
df8004e261
Decrease rate limit of translations 2024-10-09 21:04:05 -05:00
Alex Gleason
33d2eb6ca3
Remove Provider type (it's just a string) 2024-10-09 21:02:55 -05:00
Alex Gleason
c048cda2e5
Upgrade @gleasonator/policy in deno.lock, increase policy db timeout
Fixes https://gitlab.com/soapbox-pub/ditto/-/issues/244
2024-10-09 20:22:12 -05:00
Alex Gleason
d4767f56c6
Enable translations dynamically depending on whether a TRANSLATION_PROVIDER is set 2024-10-09 20:17:04 -05:00
Alex Gleason
4d146dcc98
Add names to web workers 2024-10-09 17:58:11 -05:00
P. Reis
b86bd81ed2 refactor: cast correct error type 2024-10-09 19:19:54 -03:00
P. Reis
87e0f594df refactor: throw new Error to have benefit of stack trace 2024-10-09 19:17:03 -03:00
P. Reis
54fa38795a feat: return translation not supported error to the frontend 2024-10-09 18:52:23 -03:00
P. Reis
cad0da2732 feat: rateLimit translate endpoint 2024-10-09 15:24:01 -03:00
P. Reis
57bbbb289b fix: types must have the type prefix
apparently happens in Deno 2.0?
2024-10-09 15:22:09 -03:00
P. Reis
728d7b33fb Merge branch 'main' into translate-status
Conflicts:
	deno.lock
        I have let the changes of main to prevail, I will update nostrify:db manually
2024-10-09 15:14:22 -03:00
P. Reis
4f8c8fd1de refactor: simply DittoTranslator interface and classes that implement it 2024-10-09 15:03:11 -03:00
P. Reis
c1c25d7c08 feat: create localeSchema 2024-10-09 14:57:28 -03:00
Alex Gleason
bf2e20f2ce
Upgrade to Deno v2.0 2024-10-09 04:17:55 -05:00
P. Reis
49d815826c refactor(languageSchema): enforce return type 2024-10-08 17:07:05 -03:00
P. Reis
fc5e9b2990 Revert "refactor: move getConfigs() function and frontendConfig logic to 'src/utils/frontendConfig.ts'"
This reverts commit ab85360d2f.

The discussion started publicly in Gitlab: https://gitlab.com/soapbox-pub/ditto/-/merge_requests/537#note_2148430111
Then it kept going in Element, basically the purpose of the commit is
correct, but the way Patrick did it is not good.
2024-10-08 16:58:42 -03:00
P. Reis
20caaa9ebd refactor: LibreTranslate and DeepL with separate environment variables for their configuration 2024-10-08 16:53:30 -03:00
Alex Gleason
8abac7ffa7
InstanceV2: remove supported_mime_types property 2024-10-08 12:52:14 -05:00
P. Reis
dbd590228d fix: typo 2024-10-08 14:39:59 -03:00
P. Reis
f76ee000b0 refactor: use 'lang' instead of 'target_language' 2024-10-08 14:35:51 -03:00
Alex Gleason
e6495c3687
Also add nostr to InstanceV2 2024-10-08 12:35:03 -05:00
Alex Gleason
248324f642
Add pleroma to InstanceV2 2024-10-08 12:32:00 -05:00
P. Reis
a3bc5ec5c3 refactor: remove translation enabled in instanceV1Controller 2024-10-08 14:27:00 -03:00
P. Reis
ba23931727 refactor: remove unused imports 2024-10-08 14:25:25 -03:00
P. Reis
d4a8ec21fe fix: add 'pure' option in EventsDB
if pure is true, EventsDB will return a Nostr event, otherwise it will return a Ditto event
2024-10-08 14:17:27 -03:00
P. Reis
df27959d35 fix(relay.ts): purify event 2024-10-08 14:15:48 -03:00
P. Reis
17be4ab48f fix(instanceV1Controller): add translation field 2024-10-08 11:11:29 -03:00
P. Reis
3f00f255a5 fix: type assertions in EventsDB 2024-10-08 11:01:34 -03:00
P. Reis
6c93153117 refactor: get language from event itself 2024-10-07 17:55:50 -03:00
P. Reis
acbdae29ae fix(EventsDB): type is correct, ignore type complaint 2024-10-07 17:54:41 -03:00
P. Reis
bfab84d937 refactor: make provider lowercase because supporting case insensitive is allegedly protocol bloat 2024-10-07 17:54:03 -03:00
P. Reis
4712cb1d80 fix: fix language property in the Mastodon API 2024-10-07 16:08:23 -03:00