Fixing bugs related to adding kana-only cards, bumping version
Former-commit-id: 298b5275a85d3f60b118846c6fc7b9885702c48a
This commit is contained in:
parent
72459ba337
commit
4194570cd4
@ -17,5 +17,5 @@
|
||||
|
||||
|
||||
c = {
|
||||
'appVersion': '0.11b',
|
||||
'appVersion': '0.12b',
|
||||
}
|
||||
|
@ -398,6 +398,9 @@ class MainWindowReader(QtGui.QMainWindow, gen.reader_ui.Ui_MainWindowReader):
|
||||
|
||||
|
||||
def ankiIsFactValid(self, profile, markup):
|
||||
if markup is None:
|
||||
return False
|
||||
|
||||
if self.anki is None:
|
||||
return False
|
||||
|
||||
|
@ -96,30 +96,36 @@ def splitTags(tags):
|
||||
|
||||
|
||||
def markupVocabExp(definition):
|
||||
if definition['reading']:
|
||||
summary = u'{expression} [{reading}]'.format(**definition)
|
||||
else:
|
||||
summary = u'{expression}'.format(**definition)
|
||||
|
||||
return {
|
||||
'expression': definition['expression'],
|
||||
'reading': definition['reading'],
|
||||
'reading': definition['reading'] or unicode(),
|
||||
'glossary': definition['glossary'],
|
||||
'sentence': definition.get('sentence'),
|
||||
'summary': u'{expression} [{reading}]'.format(**definition)
|
||||
'summary': summary
|
||||
}
|
||||
|
||||
|
||||
def markupVocabReading(definition):
|
||||
return {
|
||||
'expression': definition['reading'],
|
||||
'reading': unicode(),
|
||||
'glossary': definition['glossary'],
|
||||
'sentence': definition.get('sentence'),
|
||||
'summary': definition['reading']
|
||||
}
|
||||
if definition['reading']:
|
||||
return {
|
||||
'expression': definition['reading'],
|
||||
'reading': unicode(),
|
||||
'glossary': definition['glossary'],
|
||||
'sentence': definition.get('sentence'),
|
||||
'summary': definition['reading']
|
||||
}
|
||||
|
||||
|
||||
def copyVocabDef(definition):
|
||||
if definition['reading']:
|
||||
result = u'{expression}\t{reading}\t{glossary}\n'.format(**definition)
|
||||
else:
|
||||
result = u'{expression}\t{meanings}\n'.format(**definition)
|
||||
result = u'{expression}\t{glossary}\n'.format(**definition)
|
||||
|
||||
QtGui.QApplication.clipboard().setText(result)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user