summaryrefslogtreecommitdiff
path: root/ext/bg/js/search-query-parser-generator.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-04-12 03:53:24 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-13 14:53:24 +0300
commitc613321a735dbf333491ab199b808f30852a8daa (patch)
treefbd72a4330fb5e49736f01a1e09579efdc3bf596 /ext/bg/js/search-query-parser-generator.js
parent7f3e272839a6a94142f0f53ce1e29854b224ff0a (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.js11
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);
}