FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.07k stars 229 forks source link

February 2021 Release #1472

Closed toasted-nutbread closed 3 years ago

toasted-nutbread commented 3 years ago

https://github.com/FooSoft/yomichan/releases/tag/21.2.28.1

@FooSoft

General

Testing

Stable

Issues to address before stable

Thermospore commented 3 years ago

Nice! Tempted to switch over to the testing release. Is there a recommended procedure for this?

toasted-nutbread commented 3 years ago

Just install it the same as the normal release, then install dictionaries and copy over settings (works best in that order). Then you can just disable or uninstall the stable version so there aren't two active versions.

FooSoft commented 3 years ago

Testing release updated!

Thermospore commented 3 years ago

What are enableWanakana and selectedParser? image image

Just installed testing release and hand copied the settings (bit paranoid I guess haha). Looking at the diff of the settings export

Thermospore commented 3 years ago

Not new, but is there a purpose to selecting a freq dict as a secondary search dict? image

Thermospore commented 3 years ago

I like the new color of that name classification tag image image

very nice to be able to set freq dict priority!

interesting, I'm guessing the old tag text spacing was set with only lowercase latin characters in mind. the new style looks nice image image

The tags are a bit taller now though, I preferred the previous height

Thermospore commented 3 years ago

Uh oh here is a significant issue, things are missing from the search :( Maybe related to enableWanakana and selectedParser? image

something weird going on, there is text missing from the sentence display thing too image

image image

files:

old version settings.zip (21.1.31.1) new version settings.zip (21.2.28.0)

toasted-nutbread commented 3 years ago

Just installed testing release and hand copied the settings (bit paranoid I guess haha). Looking at the diff of the settings export

enableWanakana corresponds to the Automatic kana conversion toggle on the search page. selectedParser corresponds to the different parsing algorithms for parsing the block of text below the search box. "scan" and null should effectively be the same, but I should probably unify that at some point. A different parser can be used if MeCab is installed.

toasted-nutbread commented 3 years ago

Not new, but is there a purpose to selecting a freq dict as a secondary search dict?

No, it's only used to find additional definitions in merged mode, although the benefit of having this as a separate option is debatable.

toasted-nutbread commented 3 years ago

something weird going on, there is text missing from the sentence display thing too

Fixed in #1483.

toasted-nutbread commented 3 years ago

The tags are a bit taller now though, I preferred the previous height

It's a difference of 1.5 pixels (18.5px => 20px), which makes the split tags able to hold content with a standard line height (20px).

toasted-nutbread commented 3 years ago

Uh oh here is a significant issue, things are missing from the search

The dictionary priorities would seem to be the issue here. The results are still there, just lower.

Thermospore commented 3 years ago

Thanks, I appreciate the responses :v:

The dictionary priorities would seem to be the issue here. The results are still there, just lower.

Oh hey, they are. My dictionary priorities are in the same order, so I'm guessing the sort algo was changed?

The new way is kind of a game breaker, it was easiest to show in a video (sorry if I'm jumping the gun here) https://youtu.be/pU7CaU-yvjE

Could that sort algo be reverted? or add an option to use the old one?

Thermospore commented 3 years ago

The reading-conscious freq dictionaries actually are missing sometimes, as far as I can tell image image

toasted-nutbread commented 3 years ago

Could that sort algo be reverted? or add an option to use the old one?

The sorting algorithm actually wasn't changed, it was just enabled for situations where it previously wasn't. The issue is likely that the dictionary priority is used before all other sorting conditions, which make some shorter words appear before longer words.

https://github.com/FooSoft/yomichan/blob/ca4d5a2ac19d1e97025b579157568fb1e9fa0701/ext/js/language/translator.js#L1297-L1326

So the comparison of dictionaryOrder should probably come after the source.length and reasons.length comparisons.

The behaviour you mention is also the same as the behaviour in 21.1.31.1 and earlier when the Result grouping mode is No grouping.

toasted-nutbread commented 3 years ago

1486 fixes the tag issues.

Unrelated, but #1488 is a layout bug with the new frequency tag inline-list style on Firefox. Fixed with #1489.

Thermospore commented 3 years ago

The sorting algorithm actually wasn't changed, [etc]

Ahh interesting. Thanks for the explanation

1486 fixes the tag issues.

Nice. Yea I notice there tends to be inconsistency with how dictionaries store kana only words, which leads to problems. eg the grouping breaking

click to expand; somewhat nsfw (this screenshot is from 21.1.31.1) ![image](https://user-images.githubusercontent.com/35350819/110196306-1ef61980-7df0-11eb-82c6-25f0d88999b4.png)
Thermospore commented 3 years ago

Noticed a new bug: when you copy paste out of yomichan into anki, the newlines are missing now. They are still there when you paste into the github comment box though

image anki html:

21.1.31.1<br>しん えん [0]【深▼淵】<br>①深いふち。<br>②奥深さや限界が底知れないことのたとえ。「欲望の━」「悲しみの━」<br><br>21.2.28.0<br>しん えん [0]【深▼淵】 ①深いふち。 ②奥深さや限界が底知れないことのたとえ。「欲望の━」「悲しみの━」<br>
toasted-nutbread commented 3 years ago

Nice. Yea I notice there tends to be inconsistency with how dictionaries store kana only words, which leads to problems. eg the grouping breaking

This is an issue that's on the radar, but it will take a bit of work to address all the places in the code that this edge case is handled.

Noticed a new bug: when you copy paste out of yomichan into anki, the newlines are missing now. They are still there when you paste into the github comment box though

This is probably because I removed <br> elements in favor of CSS white-space:pre-line;, but looks like I'll have to revert that.

Thermospore commented 3 years ago

Would #1497 cause any issues for entries with a blank reading but kanji in the expression? For example, this copy of 大辞林 leaves the reading field blank for ことわざ image

toasted-nutbread commented 3 years ago

It shouldn't; the handling of empty readings is treated as a special case in several locations throughout the code, and it just assigns reading = expression. The change just makes it so that this assignment occurs only once instead of several times at different locations.

toasted-nutbread commented 3 years ago

@FooSoft I've made a new release which addresses the changes listed in the opening post. I've also updated the OP to point to the new version, so the checkboxes are unticked (since only the testing release was made).

https://github.com/FooSoft/yomichan/releases/tag/21.2.28.1

This one should probably be safe enough to put to stable, but you can do a testing release for a few more days if you (or anyone else) likes.

Also, big thanks to @Thermospore for testing and pointing out some of these issues.

Thermospore commented 3 years ago

np, thanks for putting up with me 🙂

FooSoft commented 3 years ago

Released to both testing and stable 🎉

Thermospore commented 3 years ago

Think I found some bugs with the frequency display formatting and the entry sorting: https://youtu.be/DsYlLvgeVoc

settings file: yomichan-settings-2021-03-10-06-51-58.zip

Extension version: Yomichan (development build) 21.2.28.1
Platform: Windows
Browser: Chrome
Language: ja
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36
AnkiConnect version: Unknown (Anki not running or connected)
Installed dictionaries: JMdict, 新明解国語辞典 第五版, 大辞林3, Weblio 古語辞典, KANJIDIC (English), JMnedict, B短, B長, IC, AJ, W, 明鏡国語辞典, 故事ことわざの辞典, RikaiCake [lower], 実用日本語表現辞典, 漢字源, RikaiCake [upper]
toasted-nutbread commented 3 years ago

The tag issue is due to a fixed height for tags, which should have been a minimum. As a temporary workaround, use this CSS:

.tag {
    height: auto;
    min-height: var(--tag-height);
}

The dictionary order is due to another issue with exact kana/term matches. This is partially stemming from the confusing data types used to represent a dictionary entry, which I am working on resolving, but I'll try to get a temporary fix for the issue in a patch.

toasted-nutbread commented 3 years ago

Patch release 21.2.28.2

@FooSoft

General

Testing

Stable

FooSoft commented 3 years ago

Shipped!

toasted-nutbread commented 3 years ago

Thanks as always

Thermospore commented 3 years ago

Everything working great for me so far. Here is one more bug I noticed with the query parser tho: 無題 スクリーンショット 2021-03-11 175818 スクリーンショット 2021-03-11 180025 スクリーンショット 2021-03-11 180040 I'm not sure if it's kana specific or if it could happen with other translations

doesn't happen when Convert hiragana to katakana and Convert katakana to hiragana are disabled