mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
only insert readings if field empty
This commit is contained in:
parent
e066ea3681
commit
9f3f16414b
2 changed files with 7 additions and 5 deletions
|
@ -64,7 +64,8 @@ class ChineseGenerator(Feature):
|
|||
return
|
||||
self.lazyInit()
|
||||
reading = self.unihan.reading(value)
|
||||
fact[dst.name] = reading
|
||||
if not fact[dst.name]:
|
||||
fact[dst.name] = reading
|
||||
|
||||
class CantoneseGenerator(ChineseGenerator):
|
||||
|
||||
|
|
|
@ -100,7 +100,8 @@ class FuriganaGenerator(Feature):
|
|||
dst = field
|
||||
break
|
||||
if dst:
|
||||
if self.kakasi.formatForKakasi(value) != reading:
|
||||
fact[dst.name] = reading
|
||||
else:
|
||||
fact[dst.name] = u""
|
||||
if not fact[dst.name]:
|
||||
if self.kakasi.formatForKakasi(value) != reading:
|
||||
fact[dst.name] = reading
|
||||
else:
|
||||
fact[dst.name] = u""
|
||||
|
|
Loading…
Reference in a new issue