Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change updates JapaneseUtil to be a set of utility functions. It is split into two different files: one which uses wanakana and one which does not. This is to help avoid the need to import it in situations where it is not needed.
There is currently only one place where it is conditionally imported, which is in ext/js/display/query-parser.js. The only use it has is to convert readings into romaji, which should be a fairly rare use case. This is made conditional to help keep the load times fast(er?) on the popup by not loading wanakana unless it's needed.
This change also fixes a very minor issue where romaji readings wouldn't work on the query parser in the regular popup.