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
|
return
|
||||||
self.lazyInit()
|
self.lazyInit()
|
||||||
reading = self.unihan.reading(value)
|
reading = self.unihan.reading(value)
|
||||||
fact[dst.name] = reading
|
if not fact[dst.name]:
|
||||||
|
fact[dst.name] = reading
|
||||||
|
|
||||||
class CantoneseGenerator(ChineseGenerator):
|
class CantoneseGenerator(ChineseGenerator):
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,8 @@ class FuriganaGenerator(Feature):
|
||||||
dst = field
|
dst = field
|
||||||
break
|
break
|
||||||
if dst:
|
if dst:
|
||||||
if self.kakasi.formatForKakasi(value) != reading:
|
if not fact[dst.name]:
|
||||||
fact[dst.name] = reading
|
if self.kakasi.formatForKakasi(value) != reading:
|
||||||
else:
|
fact[dst.name] = reading
|
||||||
fact[dst.name] = u""
|
else:
|
||||||
|
fact[dst.name] = u""
|
||||||
|
|
Loading…
Reference in a new issue