ig3 / zhongwen

A fork of the "Zhongwen" extension modified to support content in iframes.
https://chrome.google.com/webstore/detail/zhongwen-chinese-english/kkmlkkjojmombglmlpbpapmhcaljjkde
GNU General Public License v2.0
0 stars 0 forks source link

Some cc-cedict entries are not matched #7

Closed ig3 closed 1 year ago

ig3 commented 1 year ago

There are cc-cedict entries that are not matched.

For example: C盤 C盘 [C pan2] /C drive or default startup drive (computing)/

The reason this is never matched is that the add-on checks that the character the cursor is on is a Chinese character and doesn't do the lookup if it is not.

This can be fixed by always doing the lookup. This must create more work when moving the cursor over non-Chinese texts, though performance seems not too bad in testing. Some non-Chinese text is matched, including several uppercase Latin letters and a few words or acronyms, including 'OK', 'OS', 'word', 'Tony', 'USB', 'cos', and a few others.

A compromise might be to lookup regardless of first character if a Chinese character has been seen recently but not otherwise.

ig3 commented 1 year ago

Fixed: selections not beginning with a Chinese character are now looked up as long as at least one Chinese character has been seen on the page.