Robert Vitonsky
Robert Vitonsky
Use one library to validate all data instead of manual validation everywhere
Implement build target to get standalone files contains translators code. One file - one translator. Code must be readable. This is useful feature to embedding
Suggest pipeline steps - Pull request to branch `release/*` - Code analysis and merge branch `release/*` to `master` - Github action to publish new release
- https://github.com/LibreTranslate/LibreTranslate - https://github.com/thedaviddelta/lingva-translate
`src/util/Scheduler/SchedulerWithCache.ts` contains a really large regular expression https://github.com/translate-tools/core/blob/d8b6fbb156a8e03e0ee9d0be0a6e1879ceb1ad90/src/util/Scheduler/SchedulerWithCache.ts#L62 Let's replace it to a `/[^\p{L}]/gu` and cover by tests. Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Unicode_Property_Escapes > Unicode Property Escapes can be transpiled down to ES5...
This should work like that: ```ts const translator = new SomeTranslator(); const controller = new AbortController(); const { signal } = controller; translator.translate('hello world', 'en', 'de', { signal }).then(console.log).catch(console.warn); controller.abort();...
When translator is support short text for requests, we may got case when all attempts will exceed the limit and Scheduler will try to split text infinity times. So, we...
Add `Translator` implementations. You can see implementations in other projects, for example https://github.com/UlionTse/translators