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

Several proposals for improvement #36

Closed
minshifu opened this issue Aug 7, 2021 · 12 comments
Closed

Several proposals for improvement #36

minshifu opened this issue Aug 7, 2021 · 12 comments
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@minshifu
Copy link

minshifu commented Aug 7, 2021

Thank you for creating this promising addon. I'd like to offer several proposals to improve on it.

  1. Currently it often fails to automatically translate some webpages. For example, on the following pages(even if "Always translate this language" is ticked):

(1) nasional.tempo.co/read/1491253/pasien-sembuh-covid-19-hari-ini-39-726-orang/full&view=ok
(2) jdih.tabanankab.go.id/berita/159/rapat-koordinasi-satpol-pp-disperindag-dan-dinas-lingkungan-hidup

图片

  1. Pls allow translation of webpages of any original language into English.This function is important and indispensible, because in many cases webpages are in mixed languages.

    In many cases the original language of a webpage is not detected or wrongly detected. For example, the original language of the following webpage is detected as English by your addon and can not be translated, but actually it also contains many Indonesian words.

https://www.linkedin.com/search/results/people/?keywords=menteri%20pendidikan&origin=CLUSTER_EXPANSION&sid=6ld

图片

When I use Chrome browser(with in-built Google Translate function), the original language of the above webpage is not detected because it is in mixed languages. However,the webpage can be translated into English with the Context Menu button as shown by the picture below.

图片

(1) The original language of that linkedin page is not detected by Google Translate, because it contains both English and many Indonesian words. So it just shows "Detected Language" instead of any specific language.

图片
图片

(2) But I need to translate the Indonesian words on that page and I can achieve that by using the Context Menu button as shown by the picture below.

图片

  1. Original Text on mouseover. This funciton is also indispensible as shown by the picure below.

Could you pls consider these proposals? Thank you and best regards!

图片

@vitonsky
Copy link
Collaborator

vitonsky commented Aug 7, 2021

Thank you for your reports and suggestions, i consider it and will fix in near time.

Do you have some assumptions about cause of first problem with auto detect? I already fixed a similar problem, and the reason was that lang attrubute set too late. I added one more chech after awaiting load page to fix it.

Popup with original text already in plans, but at this time i not have idea about grouping text for show result. For example i over my mouse on paragrapth from text on your screen, whats text this popup should show?
Text of all childs? Then what if user hover on body element? It will show text of all page in popup?

@vitonsky
Copy link
Collaborator

vitonsky commented Aug 7, 2021

I will work on it in near time

  • Fix auto detect langs
  • Allow translate page with same language direction

@vitonsky vitonsky added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Aug 7, 2021
@vitonsky
Copy link
Collaborator

vitonsky commented Aug 7, 2021

Done. Check version 2.1.3

You can get it from releases page or wait few minutes for update from mozilla addons.

Test it and write your feedback about fixes.

Popup with original text will implement later, but in near future

@minshifu
Copy link
Author

minshifu commented Aug 7, 2021

Thank you for your reports and suggestions, i consider it and will fix in near time.

Do you have some assumptions about cause of first problem with auto detect? I already fixed a similar problem, and the reason was that lang attrubute set too late. I added one more chech after awaiting load page to fix it.

Popup with original text already in plans, but at this time i not have idea about grouping text for show result. For example i over my mouse on paragrapth from text on your screen, whats text this popup should show?
Text of all childs? Then what if user hover on body element? It will show text of all page in popup?

Thank you for your kind feedback.

  1. As for your first question, sorry I am a layman when it comes to coding and programming. So I cannot offer any help with this.

  2. I think original text shoud be shown paragraph by paragraph. Actually the following screenshot is from another translation addon S3.Translator. Its Original Text Popup function is very good. When that addon is used, original text will be shown paragraph by paragraph or even sentence by sentence as shown by the picture below. The shortcomings of that addon are that it fails to automatically translate many webpages and the offical Google Translate webpage often pops out. Perhaps you could refer to that addon for the Original Text Popup function.
    Best regards!

图片

@minshifu
Copy link
Author

minshifu commented Aug 7, 2021

Done. Check version 2.1.3

You can get it from releases page or wait few minutes for update from mozilla addons.

Test it and write your feedback about fixes.

Popup with original text will implement later, but in near future

So far the Auto Detection and Translation funcion works well. But the Same Language Translation function does not work.
Although the blue button can be clicked now, the Indonesian words on the linkedin page fails to be translated into English.
Thank you and Best regards!

https://www.linkedin.com/search/results/people/?keywords=menteri%20pendidikan&origin=CLUSTER_EXPANSION&sid=6ld

图片

@vitonsky
Copy link
Collaborator

vitonsky commented Aug 7, 2021

Try use "auto detect" in languages list. Is it work for your case?

@minshifu
Copy link
Author

minshifu commented Aug 7, 2021

Try use "auto detect" in languages list. Is it work for your case?

Hi, so far the Auto Detection function works well. But the Same Language Translation function does not work on the following page.

https://www.linkedin.com/search/results/people/?keywords=menteri%20pendidikan&origin=CLUSTER_EXPANSION&sid=6ld

@vitonsky
Copy link
Collaborator

vitonsky commented Aug 7, 2021

Translate behavior depends on translation service modules. One module can translate mixed languages, when other can't.

We should not change this behavior to avoid convoluted logic. Site define page language as "english", then we should suggest english even it it not that actually.

We could add option which will detect cases when language set by page is different from actual text on the page and in this case set default language as "undetected" and suggest auto detection if translator support this feature and language which page set otherwise.

What you think about it? This option is would satisfy you?

@minshifu
Copy link
Author

minshifu commented Aug 7, 2021

Translate behavior depends on translation service modules. One module can translate mixed languages, when other can't.

We should not change this behavior to avoid convoluted logic. Site define page language as "english", then we should suggest english even it it not that actually.

We could add option which will detect cases when language set by page is different from actual text on the page and in this case set default language as "undetected" and suggest auto detection if translator support this feature and language which page set otherwise.

What you think about it? This option is would satisfy you?

I tried the "Auto Detect" just now. So far it works great. But could you enable the addon to remember the choice? After reloading, the choice will revert to English each time. Thus one has to repeat opening the menu and choosing "Auto Detect" for each page or after reloading. Or chould the function of Chrome browser translation be emulated? That is, no matter what the original language is or whether they are mixed languages or not, the webpage can always be translated into English by just clicking the Context Menu button as shown by the picture below. Thank you!
图片

@vitonsky
Copy link
Collaborator

vitonsky commented Aug 7, 2021

I don't sure that you really want enable option for remember language.

Pages usually have dynamic content and you will have to change language even more often. Even if direction remember functional will bind to domain

But i make issue for feature which can be useful for you: #37

What you think? Is it can satisfy you?

@minshifu
Copy link
Author

minshifu commented Aug 8, 2021

I don't sure that you really want enable option for remember language.

Pages usually have dynamic content and you will have to change language even more often. Even if direction remember functional will bind to domain

But i make issue for feature which can be useful for you: #37

What you think? Is it can satisfy you?

Thank you so much. What I mean is enabling the addon to remember the choice of "Auto Detect" not a certain language. So far the addon works great. I will continue to try it and offer my thoughts here. Hope the future Original Text Popup function will be similar to that of addon S3.Translator. Best regards!

@vitonsky
Copy link
Collaborator

vitonsky commented Aug 8, 2021

You know, maybe the remember "auto detect" it is not bad function. I will think about it.

Thank for your contribution. In future if you want report or suggest something more, create new issue to maintain cleanliness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants