Open kanjieater opened 3 years ago
Hi! Nice work on the add-on. Noticed a couple of issues while during set-up though.
anki-img.png
and copy-img.png
do not load properly when viewing an article. Inspecting shows the filepath as file:///C:/Users/MyUser/AppData/Roaming/Anki2/**MyUser**/addons21/247820692/assets/images/_anki-img.png
which is incorrect since Anki doesn't store extensions per profile. Manually deleting **MyUser**
from the filepath during inspection will cause the images to load properly.Also, just as a tip, you can place qt-style.css
alongside article-style.css
in a theme folder and use different qt-styles per theme, although the application still needs to be reloaded for this to take effect.
Hi! Nice work on the add-on. Noticed a couple of issues while during set-up though.
- Anki currently uses double quotes for searches, and will automatically add them when searching in the browser. If a search is done with single quotes, double quotes will be placed around them. This means that the [single quotes inside double quotes]-syntax currently used for the search parameter will not work if a deck name contains whitespace. Using double quotes inside of single quotes would probably solve this.
anki-img.png
andcopy-img.png
do not load properly when viewing an article. Inspecting shows the filepath asfile:///C:/Users/MyUser/AppData/Roaming/Anki2/**MyUser**/addons21/247820692/assets/images/_anki-img.png
which is incorrect since Anki doesn't store extensions per profile. Manually deleting**MyUser**
from the filepath during inspection will cause the images to load properly.Also, just as a tip, you can place
qt-style.css
alongsidearticle-style.css
in a theme folder and use different qt-styles per theme, although the application still needs to be reloaded for this to take effect.
The reason for this is that command line parameters in windows didn't work as double quotes, and within the last year Anki made that update to only accept double quotes in search. It's a little hacky, but it does work for me and I have spaces in my deck names.
You're right. I have a junction to the addons in my user profile for some reason, so I wasn't seeing that. Temporarily you could place the file where the program is expecting it to get it working. Or like I have, just junction addons from their location to your profile folder until I fix it. Here's a free post & guide for setting up junctions easily: https://www.patreon.com/posts/syncing-anki-add-30894998
I didn't know that! Thanks for the tip.
I've fixed a few of the issues and the update is uploading to ankiweb now! The update that fixes the pathing issue you mentioned & combines the css files into a single folder (you could set up a junction here to the actual goldenDict styles folder to have it automatically kept up to date.
This is a major update and expects a newer version of GoldenDict to be installed. Make sure to install the latest Goldendict QT 5 windows beta from: https://sourceforge.net/projects/goldendict/files/early%20access%20builds/Qt5-based/64bit/GoldenDict-1.5.0-RC2-372-gc3ff15f_%28QT_5123%29%2864bit%29.7z/download By doing this we can now support webp images as well (yay!).
Make sure to copy over the updated CSS. This also expects yugothic.ttf (from addons21\247820692\assets\fonts) to be installed.
I've got everything working now, thanks!
I also thought of a couple other things that could be worth sharing:
qt-style.css
for the dark mode to fix things like the "History" and "Found in Dictionaries" labels not being visible. I've attached that file so feel free to use it if you like it. The only thing missing from what I can tell is a white version of the "Add to Favorites"-button, but I don't know if there's any way to fix that. File: qt-style.zip
This repository contains Hunspell morphology dictionaries for Japanese that enable native deinflection in GoldenDict.
Did you see my last reply in #1334? In short, I think you can get the Hiragino font working by leaving out W2
from the name.
I noticed a couple of small things in article-style.css
. There are a couple of typos (font-stye
=> font-style
, vertical-alignment
=> vertical-align
). You could also list preferred fonts like below instead of overriding the font-family
property multiple times.
body, h3, h2, pre {
font-family : 'Yu Gothic', 'MS UI Gothic', 'MS Gothic';
}
There are a couple things I'm having trouble with though.
I added the snippet below to article-style.css
on my machine in order to keep the text from being right at the edge of the window and to line it up better with the rest of the dictionary entries. It works for word definitions but I don't know how to style the welcome page.
.sdct_m {
margin-left: 10px;
margin-right: 10px;
}
Also, most fonts in GoldenDict end up looking very jagged for me. Yu Mincho is one of the few exceptions. Have you noticed this, and if so, do you know of a way to fix it?
I've got everything working now, thanks!
I also thought of a couple other things that could be worth sharing:
- I found this blog post about styling GoldenDict. It's in Chinese, but I ran it through DeepL and it covers a lot of useful properties. With it, I was able to update the
qt-style.css
for the dark mode to fix things like the "History" and "Found in Dictionaries" labels not being visible. I've attached that file so feel free to use it if you like it. The only thing missing from what I can tell is a white version of the "Add to Favorites"-button, but I don't know if there's any way to fix that.File: qt-style.zip
- This repository contains Hunspell morphology dictionaries for Japanese that enable native deinflection in GoldenDict.
- Did you see my last reply in #1334? In short, I think you can get the Hiragino font working by leaving out
W2
from the name.- I noticed a couple of small things in
article-style.css
. There are a couple of typos (font-stye
=>font-style
,vertical-alignment
=>vertical-align
). You could also list preferred fonts like below instead of overriding thefont-family
property multiple times.body, h3, h2, pre { font-family : 'Yu Gothic', 'MS UI Gothic', 'MS Gothic'; }
There are a couple things I'm having trouble with though.
I added the snippet below to
article-style.css
on my machine in order to keep the text from being right at the edge of the window and to line it up better with the rest of the dictionary entries. It works for word definitions but I don't know how to style the welcome page..sdct_m { margin-left: 10px; margin-right: 10px; }
Also, most fonts in GoldenDict end up looking very jagged for me. Yu Mincho is one of the few exceptions. Have you noticed this, and if so, do you know of a way to fix it?
Anyways, good find with all of this. I really appreciate it. I might clean up the styles and add a better dark theme in the future, but it's not really too high of a priority. Feel free to PR anything you'd like to share though or keep posting here 👍.
And in some cases just wrong: It corrected 鵜呑み (which is correct & has results) to 鵜吞み. 呑!=吞, and is wrong.
吞 is the actual correct form of 呑, it's just that most people use the former. Similarly, 噓 is the correct form of 嘘. From the 大漢和辞典:
I believe this falls into the "technically correct but obsolete" category.
Honestly I don't even think I'd consider that to be technically correct considering you can't find something like 鵜吞み in use with any modern dictionary
It's actually exclusively used in quite a few more recent dictionaries. I believe the reason that older dictionaries use 呑 instead is due to older Japanese encoding standards not supporting the right forms (namely JIS X 0208). Perhaps the dictionaries you are citing are converted from epwing (the vast majority of yomichan dicts are) which is a very old format that doesn't support unicode.
This is actually more common than you'd think. Famous examples that are present within the 常用漢字表 are:
Clicking on links like weblio's 吞 it shows the relevant version: https://www.weblio.jp/content/%E9%B5%9C%E5%90%9E%E3%81%BF
Still, this is interesting so thanks for sharing. Maybe I need some upgraded epwings. Though I'd still just prefer to use modern & relevant kanji whenever possible and know when a cleverly disguised obsolete kanji has sneaked in. Per your example, looking into some of your examples certainly some of these kanji are more common than others - and maybe obsolete or wrong isn't fair..
In case anyone else runs into issues running this, I had an issue recently where the QT5 64bit version linked above stopped working out of nowhere. The QT4 version still worked of the same rev. I got it working again by running it in Compatibility mode with Windows 7. I'm still on windows 10 64bit, fyi.
Update: Scratch that, I'm on windows 11 now, and it doesn't need compatibility mode but it does need to be run as admin. Not sure why...
As there's no longer a forum and GitHub Discussions aren't enabled, I was hoping we could still talk about new features in GoldenDict & add-ons here.
I've recently made a suite of programs and installation video here: https://www.youtube.com/playlist?list=PLV9y64Yrq5i-1ztReLQQ2oyg43uoeyri-
You can see the source here: https://github.com/kanjieater/GoldenDict-Toolbelt
You could use the Google Images, Anki part, and other program separately if you wanted
These tools can do things like:
Enjoy!