forked from FooSoft/yomichan
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add recommended dictionaries to welcome page (#991)
* Add dictionary import to welcome page * Initial prototype of recommended dict importing * Disable button immediately * Add queue to allow clicking multiple import buttons at once * Dynamic assignment of recommended dictionaries * Add to json.json * Change kanjidic to grab latest release * Make linter happy * Add json schema * Add explicit types to dict array properties * Fix schema $id * Change types file to dts and add labeled test type * Use static jitendex url * Fix url path * Remove BCCWJ-LUW version from name * Only render recommended dictionaries on button click * Clean up dictionary rendering * Hide dictionaries when going from a language supporting recommended dictionaries to one that doesnt * Update welcome page dict modals * Fix spacing * Add back recommended dictionary modals * Fix dictionary importing * Remove unneeded progress selectors * Fix recommended dictionary modal rendering * Add pronunciation to recommended dictionary types * Fix KANJIDIC name * Fix hiding and unhiding of elements * Move language select above recommended dictionaries * Use BCCWJ combined instead of BCCWJ-LUW * show download progress --------- Signed-off-by: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Co-authored-by: Stefan Vukovic <stefanvukovic44@gmail.com>
- Loading branch information
1 parent
b602851
commit 7dbced4
Showing
8 changed files
with
508 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"ja": { | ||
"terms": [ | ||
{"name": "Jitendex", "url": "https://github.com/stephenmk/stephenmk.github.io/releases/latest/download/jitendex-yomitan.zip"} | ||
], | ||
"kanji": [ | ||
{"name": "KANJIDIC", "url": "https://github.com/themoeway/jmdict-yomitan/releases/latest/download/KANJIDIC_english.zip"} | ||
], | ||
"frequency": [ | ||
{"name": "BCCWJ", "url": "https://github.com/Kuuuube/yomitan-dictionaries/releases/download/yomitan-permalink/BCCWJ_SUW_LUW_combined.zip"} | ||
], | ||
"grammar": [], | ||
"pronunciation": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
{ | ||
"$id": "recommendedDictionaries", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"description": "Contains data for recommended dictionaries on welcome page.", | ||
"type": "object", | ||
"patternProperties": { | ||
"^.{2,}$": { | ||
"type": "object", | ||
"properties": { | ||
"terms": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"name", | ||
"url" | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"url": { | ||
"type": "string", | ||
"minLength": 2 | ||
} | ||
} | ||
} | ||
}, | ||
"kanji": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"name", | ||
"url" | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"url": { | ||
"type": "string", | ||
"minLength": 2 | ||
} | ||
} | ||
} | ||
}, | ||
"frequency": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"name", | ||
"url" | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"url": { | ||
"type": "string", | ||
"minLength": 2 | ||
} | ||
} | ||
} | ||
}, | ||
"grammar": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"name", | ||
"url" | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"url": { | ||
"type": "string", | ||
"minLength": 2 | ||
} | ||
} | ||
} | ||
}, | ||
"pronunciation": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"name", | ||
"url" | ||
], | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"minLength": 2 | ||
}, | ||
"url": { | ||
"type": "string", | ||
"minLength": 2 | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"terms", | ||
"kanji", | ||
"frequency", | ||
"grammar" | ||
], | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.