Open jamesmaa opened 1 month ago
I would like to be assigned this.
i don't think anyone's working on this but anyone who wants to can check in here as well
Been having trouble trying to locate the logic that will update the sentence that is a header on the search page. I think I am on the right path with something like this.
async setText(text) {
if (this._useInternalParser === false && this._useMecabParser === false) {
return;
} // all the code from here on can be skipped if no need to parse
this._text = text;
this._setPreview(text);
/** @type {?import('core').TokenObject} */
const token = {};
this._setTextToken = token;
this._parseResults = await this._api.parseText(text, this._getOptionsContext(), this._scanLength, this._useInternalParser, this._useMecabParser);
if (this._setTextToken !== token) { return; }
this._refreshSelectedParser();
this._renderParserSelect();
this._renderParseResult();
}
I think you're in the right file! Feel free to add console.log
statements or console.trace
statements or try to walk through this with a debugger to see how it all works. Some documentation on using the debugger https://developer.chrome.com/docs/devtools/javascript#code-stepping
Currently yomitan doesn't show the sentence if the parser is turned off
outcome:
We should still show the original sentence even if we turn off the sentence parser. This lets users select words within a sentence even if i sentence remains unparsed
related: #1369