1

Fixing fact adding

This commit is contained in:
Alex Yatskov 2016-05-18 10:00:14 -07:00
parent 6a4b3898bb
commit a4d1c43a4a

View File

@ -108,7 +108,7 @@ def markupVocabExp(definition):
return { return {
'expression': definition['expression'], 'expression': definition['expression'],
'reading': definition['reading'] or u'', 'reading': definition['reading'] or u'',
'glossary': definition['glossary'], 'glossary': '; '.join(definition['glossary']),
'sentence': definition.get('sentence'), 'sentence': definition.get('sentence'),
'summary': summary 'summary': summary
} }
@ -119,7 +119,7 @@ def markupVocabReading(definition):
return { return {
'expression': definition['reading'], 'expression': definition['reading'],
'reading': u'', 'reading': u'',
'glossary': definition['glossary'], 'glossary': '; '.join(definition['glossary']),
'sentence': definition.get('sentence'), 'sentence': definition.get('sentence'),
'summary': definition['reading'] 'summary': definition['reading']
} }
@ -138,9 +138,9 @@ def copyVocabDef(definition):
def markupKanji(definition): def markupKanji(definition):
return { return {
'character': definition['character'], 'character': definition['character'],
'onyomi': definition['onyomi'], 'onyomi': ', '.join(definition['onyomi']),
'kunyomi': definition['kunyomi'], 'kunyomi': ', '.join(definition['kunyomi']),
'glossary': definition['glossary'], 'glossary': ', '.join(definition['glossary']),
'summary': definition['character'] 'summary': definition['character']
} }