Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next: 3.0 #78

Open
17 of 27 tasks
Animenosekai opened this issue Feb 23, 2023 · 24 comments · May be fixed by #92
Open
17 of 27 tasks

Next: 3.0 #78

Animenosekai opened this issue Feb 23, 2023 · 24 comments · May be fixed by #92
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@Animenosekai
Copy link
Owner

Animenosekai commented Feb 23, 2023


version: 3.0
status: ALPHA

Next

Provides informations about the next coming version

Design Banner

This version provides general improvements over the whole project, bringing exciting new features.

New

Fixes

Updates

Everything is detailed in the README.md file

A comparison from the previous release can be found here v2.3...v3.0

A comparison from the current branch can be found here v3.0...main

Note
Ideas with a 🧃 mark in front still need some consideration and might not be in the final product.

🍡 Animenosekai

Footnotes

  1. For single word translations ?

  2. Following Got another translator for you. #28

  3. Following https://github.com/Animenosekai/translate/issues/78#issuecomment-1443529618

  4. Following a suggest #54

  5. An actual public website was planned but due to the end of Heroku's free service and a lack of resource for now, we are going to stick with the local website (I think?). However the idea is not abandonned and a way of ranking the different translators based on real results is expected in the future.

  6. The branch needs to be changed to fit the main branch (local website) and to have a CLI access

  7. Following Bulk Translation support? #66

  8. Following Consider adding the formality and glossary feature to DeepL #65

  9. Following https://github.com/Animenosekai/translate/issues/28#issuecomment-918746811

  10. Refer to https://github.com/Animenosekai/translate/discussions/62 2

  11. Following [New] Size limited LRU cache #58

  12. We might use Textual for an interactive TUI. We should also default to the interactive TUI when running translatepy without any action specified.

  13. This provides a way of choosing the translators to use from the CLI (Defining which translator to use from the CLI #53)
    But this also allows choosing the translator from the web server and thus the website.

  14. https://www.deepl.com/en/blog/deepl-welcomes-turkish-and-indonesian

@Animenosekai Animenosekai pinned this issue Feb 23, 2023
@Animenosekai Animenosekai self-assigned this Feb 23, 2023
@Animenosekai Animenosekai added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 23, 2023
@ZhymabekRoman
Copy link
Contributor

Wow, judging by the list, there's a lot of work to be done 😃

@ZhymabekRoman
Copy link
Contributor

ZhymabekRoman commented Feb 24, 2023

New Translate Services:

  • ABBYY Lingvo

New languages:

Other changes:

  • Mypy static type hint support

@Animenosekai
Copy link
Owner Author

New Translate Services:

  • ABBYY Lingvo

New languages:

Other changes:

  • Mypy static type hint support

Added to the list !

@Animenosekai
Copy link
Owner Author

Animenosekai commented Mar 2, 2023

@ZhymabekRoman

Here is what is currently happening on the new-models branch !

Brand new models have been implemented !

They now all include the raw attribute (which is optional)

Screenshot 0005-03-02 at 18 32 07

Screenshot 0005-03-02 at 18 30 47

Most of them support rich string representation, which can be generated through the __pretty__ method on the Result model :

Screenshot 0005-03-02 at 18 33 35

By passing in the cli=True parameter, you can even get colors !

Screenshot 0005-03-02 at 18 33 52

The brand new BaseTranslator

New dictionary, example methods and alternative methods have been added !

It natively handles bulk translations, transliterations, ... on everything ! Through the use of typing.overload, the type checkers automatically know if the return value should be an iterable (if a bulk action) or if it should be a normal result model.

Moreover, the Result model actually implements __iter__ to avoid mistakes when looping over Translator.translate() even if a single translation is done.

The iterable returned by bulk actions is a custom LazyIterable which actually loads things if needed and stores them.

TRANSLATEPY_SCREEN_REC.mp4

My bad the method is not transliteration but transliterate... (maybe could alias it ?)

Now I need to modify the actual translators implementations and re-implement Translate (aggregate translators) using BaseTranslator

@Animenosekai
Copy link
Owner Author

Updated all of the translators 🍡

Screenshot 0005-03-03 at 00 24 47

@Animenosekai
Copy link
Owner Author

And the Translate class is working !

Now, it inherits from BaseTranslator and its code is much simpler 🧃

Screenshot 0005-03-03 at 01 11 48

@ZhymabekRoman
Copy link
Contributor

Wow! @Animenosekai, Great job ✨

@ZhymabekRoman
Copy link
Contributor

TODO: add logger (like loguru)

@ZhymabekRoman
Copy link
Contributor

TODO: Integrate fake-useragent

@ZhymabekRoman
Copy link
Contributor

ZhymabekRoman commented Jul 22, 2023

TODO: avoid def __init__(self, request: Request = Request()):. See more: https://youtu.be/Cj6O9FUjiAA

Flask warning:

[flake8] [W] Do not perform function calls in argument defaults. The call is performed only once at function definition time. All calls to your function will reuse the result of that definition-ti
me function call. If this is intended, assign the function call to a module-level variable and use that variable as a default value.

@Animenosekai
Copy link
Owner Author

TODO: avoid def __init__(self, request: Request = Request()):. See more: https://youtu.be/Cj6O9FUjiAA

Flask warning:

[flake8] [W] Do not perform function calls in argument defaults. The call is performed only once at function definition time. All calls to your function will reuse the result of that definition-ti
me function call. If this is intended, assign the function call to a module-level variable and use that variable as a default value.

This is fixed in the new-models branch

def __init__(self, session: typing.Optional[request.Session] = None, services_list: typing.Optional[typing.List[BaseTranslator]] = None, fast: bool = False):

@Animenosekai
Copy link
Owner Author

TODO: add logger (like loguru)

The server is going to use nasse, which already has a custom logger which we could use.

See also: Nasse — Logging

@ZhymabekRoman
Copy link
Contributor

TODO: add logger (like loguru)

The server is going to use nasse, which already has a custom logger which we could use.

See also: Nasse — Logging

Great job! 🚀

@Animenosekai Animenosekai linked a pull request Aug 13, 2023 that will close this issue
@ZhymabekRoman
Copy link
Contributor

TODO: Telegram bot 😀

@Animenosekai
Copy link
Owner Author

TODO: Telegram bot 😀

Hmmmm I'm not sure if this should be done by this repo or in another repo

@Animenosekai
Copy link
Owner Author

Btw @ZhymabekRoman if you look at 5817dd6 I reorganized the CLI a bit (needs a bit more work) and I created a TUI using Textual

Screenshot 0005-08-23 at 02 21 16 Screenshot 0005-08-23 at 02 21 34 Screenshot 0005-08-23 at 02 21 50 Screenshot 0005-08-23 at 02 22 11 Screenshot 0005-08-23 at 02 23 07

@ZhymabekRoman
Copy link
Contributor

TODO: Telegram bot 😀

Hmmmm I'm not sure if this should be done by this repo or in another repo

Yeah, maybe in separated repo

@ZhymabekRoman
Copy link
Contributor

Btw @ZhymabekRoman if you look at 5817dd6 I reorganized the CLI a bit (needs a bit more work) and I created a TUI using Textual

Wow! 😯 Great job @Animenosekai ! I like this!

@Animenosekai
Copy link
Owner Author

Reimplemented HTML translation

@Animenosekai
Copy link
Owner Author

The website works again!

Screenshot 0005-08-26 at 19 45 05

@Animenosekai Animenosekai linked a pull request Aug 27, 2023 that will close this issue
@Animenosekai
Copy link
Owner Author

Added the Papago translator from Naver

Screenshot 0005-08-28 at 20 06 23

@ZhymabekRoman
Copy link
Contributor

  • TODO: new service - quillbot (I have tried to implement this. However, we may need to bypass Cloudflare security first)

@ZhymabekRoman
Copy link
Contributor

  • TODO: Introduce custom Request class with undetected-chromedriver backend to bypass bot detection algorithms with original Chrome fingerprints

@ZhymabekRoman
Copy link
Contributor

  • TODO: add Arabic to DeepL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants