alpheios-project / webextension

Alpheios Browser Extensions
ISC License
6 stars 2 forks source link

lexical query produced no results from wordlist (latin vs greek) #334

Open monzug opened 2 years ago

monzug commented 2 years ago

tested in ff/mac in Alpheios Reading Tools 3.4.1 build incr-3.4.x.20211123265 Alpheios Components 3.3.3-incr-3.4.x.20211123114 build i333-options-reset.20211123556

related to issue #331

let's say that page language is Latin and text is in Greek. if I double click on few Greek words, the lexical query produced no results is generated. when I go to wordlist and I click on any of the greek words, saved in the Latin list (remember latin is the page language), I still get lexical query produced no results. see below

this is the pop-up from wordlist and from double-click Screen Shot 2021-11-23 at 2 47 41 PM

second scenario, page language is Greek and text is in Latin. if I double click on few Latin words, the lexical query produced no results is generated. when I go to wordlist and I click on any of the latin words, saved under the Greek list (Greek is the page language), I still get lexical query produced no results. see below

this is rom wordlist Screen Shot 2021-11-23 at 4 37 20 PM this is from double click Screen Shot 2021-11-23 at 2 46 41 PM

@irina060981 do you know why such a difference?

irina060981 commented 2 years ago

I noticed that difference before but never thought what is the reason. Will examine the code.

irina060981 commented 2 years ago

There are such comments in the code:

we offer change language here when the lookup was from the page because the language used for the lookup is deduced from the page and might be wrong

if we are coming from e.g. the lookup or the wordlist, offering change language here creates some confusion and the language was explicit upon lookup so it is not necessary

monzug commented 2 years ago

comments in the code are always good. I see the reason behind difference from wordlist from lookup, but how about Greek vs Latin?

irina060981 commented 2 years ago

comments in the code are always good. I see the reason behind difference from wordlist from lookup, but how about Greek vs Latin?

I didn't fully understand your question. An application doesn't check languages - only the source of lookup. If lookup is from double-click than application suggests language dropdown. Otherwise it considers that language was already chosen.

monzug commented 2 years ago

two different pop-ups are generating when error is for Latin and when error is for Greek page language. in the first scenario described above (page language is Latin and text is in Greek), I do not get any reference to the language in the query and it's consistent from wordlist and from double-click. in the second scenario described above (page language is Greek and text is in Latin), the error from wordlist is '... was not found in our Greek resources' and the error from double-click is '... was not found in our Greek resources. Wrong language? change to Greek'. I understand the difference from wordlist and from double click when page language is Greek and text is in Latin. I do not understand why the error in pop-up does not provide information on the page language when page language is Latin and text is in Greek, I only get this generic error message: Morphological data not found. Definition queries pending. I like better how it behaves when page language is Greek and text is in Latin.

irina060981 commented 2 years ago

Do you mean this message? image

Oh, this workflow was defined long time ago. this message and the second message are printed on different steps of LexicalQuery executing.

The first (Morphological data not found. Definition queries pending.) is printed while Lexical query is still executing. The second (was not found in our {languageName} resources) when LexicalQuery is finished.

So in the first case I believe may be something is still searching.

Anyway - it is an old workflow and we didn't do any changes to it in this year. Do we really need to invest time to change it?

monzug commented 2 years ago

absolutely not. I was just checking if you knew why such a difference in Greek vs Latin. that's ok. we can log this as something that we might want to improve at one point (?) in the future. Thanks

On Wed, Nov 24, 2021 at 11:05 AM Sklyarova Irina @.***> wrote:

Do you mean this message? [image: image] https://user-images.githubusercontent.com/12377640/143216536-b12ceace-f3d5-4d9c-bc1f-d9b82637fd9c.png

Oh, this workflow was defined long time ago. this message and the second message are printed on different steps of LexicalQuery executing.

The first (Morphological data not found. Definition queries pending.) is printed while Lexical query is still executing. The second (was not found in our {languageName} resources) when LexicalQuery is finished.

So in the first case I believe may be something is still searching.

Anyway - it is an old workflow and we didn't do any changes to it in this year. Do we really need to invest time to change it?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/alpheios-project/webextension/issues/334#issuecomment-977722816, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ32UOOTOGF2BJS5FQU7OWDUNS2GRANCNFSM5ITSJE4Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

irina060981 commented 2 years ago

absolutely not. I was just checking if you knew why such a difference in Greek vs Latin. that's ok. we can log this as something that we might want to improve at one point (?) in the future. Thanks

May be I know why do we have such difference between Latin and Greek

So may be that's why it has different steps in publishing messages

It would be good to check it once - because such inconsistece potentially is a source of strange errors in future. But I don't know when I will have time

monzug commented 2 years ago

we can put on the side for when u are done with web extension fixes. let's see.

monzug commented 2 years ago

also Arabic, Geez, Chinese display the same pop-up as for Greek language: '... was not found in our xxx resources. Wrong language? change to xxx'.