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,16 +96,22 @@ 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):
|
||||
if definition['reading']:
|
||||
return {
|
||||
'expression': definition['reading'],
|
||||
'reading': unicode(),
|
||||
@ -119,7 +125,7 @@ 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