diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2020-04-12 03:53:24 +0300 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2020-04-13 14:53:24 +0300 |
commit | c613321a735dbf333491ab199b808f30852a8daa (patch) | |
tree | fbd72a4330fb5e49736f01a1e09579efdc3bf596 /ext/bg/js/search-query-parser-generator.js | |
parent | 7f3e272839a6a94142f0f53ce1e29854b224ff0a (diff) |
move QueryParser.parseText to Backend
Diffstat (limited to 'ext/bg/js/search-query-parser-generator.js')
-rw-r--r-- | ext/bg/js/search-query-parser-generator.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/bg/js/search-query-parser-generator.js b/ext/bg/js/search-query-parser-generator.js index 390841c1..d44829f7 100644 --- a/ext/bg/js/search-query-parser-generator.js +++ b/ext/bg/js/search-query-parser-generator.js @@ -71,7 +71,16 @@ class QueryParserGenerator { for (const parseResult of parseResults) { const optionContainer = this._templateHandler.instantiate('select-option'); optionContainer.value = parseResult.id; - optionContainer.textContent = parseResult.name; + switch (parseResult.source) { + case 'scanning-parser': + optionContainer.textContent = 'Scanning parser'; + break; + case 'mecab': + optionContainer.textContent = `MeCab: ${parseResult.dictionary}`; + break; + default: + optionContainer.textContent = 'Unrecognized dictionary'; + } optionContainer.defaultSelected = selectedParser === parseResult.id; selectContainer.appendChild(optionContainer); } |