diff --git a/lib/transover_core.js b/lib/transover_core.js index b76f3b1..89e7b21 100644 --- a/lib/transover_core.js +++ b/lib/transover_core.js @@ -83,7 +83,7 @@ Core.parseAPIResponse = (data, word, sendResponse) => { definition_list.push(definition.text + '; ' + definition.source_ids.join(' ')) } ) - output.push({pos: result.lemma_wordform.text + result.lemma_wordform.analysis, meanings: definition_list}) + output.push({lemma: result.lemma_wordform.text, meanings: definition_list}) }) } diff --git a/lib/transover_utils.js b/lib/transover_utils.js index 90c4091..0386184 100644 --- a/lib/transover_utils.js +++ b/lib/transover_utils.js @@ -33,8 +33,10 @@ TransOver.formatTranslation = function(translation) { if (translation instanceof Array) { // translation was successful + + // todo: why's the argument called pos_block? translation.forEach(function(pos_block) { - const formatted_pos = pos_block.pos ? ''+pos_block.pos+': ' : '' + const formatted_pos = pos_block.lemma ? ''+pos_block.lemma+': ' : '' const formatted_meanings = pos_block.meanings.slice(0,5).join(', ') + ( pos_block.meanings.length > 5 ? '...' : '' ) formatted_translation = formatted_translation + '