mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 00:24:13 +08:00
fix
This commit is contained in:
parent
7ad0956e6e
commit
8c62a3cb4b
@ -251,7 +251,12 @@ class AnkiWindow(QWidget):
|
||||
|
||||
def loadfileds(self):
|
||||
word = self.currentword
|
||||
explain = json.dumps(gobject.baseobject.searchwordW.generate_explains())
|
||||
explain = json.dumps(
|
||||
json.dumps(
|
||||
gobject.baseobject.searchwordW.generate_explains(), ensure_ascii=False
|
||||
),
|
||||
ensure_ascii=False,
|
||||
)
|
||||
remarks = self.remarks.toHtml()
|
||||
example = self.example.toPlainText()
|
||||
ruby = self.ruby
|
||||
@ -531,7 +536,13 @@ class AnkiWindow(QWidget):
|
||||
def reset(self, text):
|
||||
self.currentword = text
|
||||
if text and len(text):
|
||||
self.ruby = json.dumps(gobject.baseobject.translation_ui.parsehira(text))
|
||||
self.ruby = json.dumps(
|
||||
json.dumps(
|
||||
gobject.baseobject.translation_ui.parsehira(text),
|
||||
ensure_ascii=False,
|
||||
),
|
||||
ensure_ascii=False,
|
||||
)
|
||||
else:
|
||||
self.ruby = ""
|
||||
self.editpath.clear()
|
||||
|
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
ruby = {{ rubytext }}
|
||||
ruby = JSON.parse({{ rubytext }})
|
||||
html = ''
|
||||
if (ruby.length) {
|
||||
for (i = 0; i < ruby.length; i++) {
|
||||
@ -56,7 +56,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
explains = {{ explain }}
|
||||
explains = JSON.parse({{ explain }})
|
||||
|
||||
function safehtml(html) {
|
||||
var tempParent = document.createElement('div');
|
||||
|
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
ruby = {{ rubytext }}
|
||||
ruby = JSON.parse({{ rubytext }})
|
||||
html = ''
|
||||
if (ruby.length) {
|
||||
for (i = 0; i < ruby.length; i++) {
|
||||
|
@ -180,7 +180,7 @@
|
||||
"ankiconnect": {
|
||||
"port": 8765,
|
||||
"DeckName": "lunadeck",
|
||||
"ModelName2": "lunamodel2",
|
||||
"ModelName3": "lunamodel3",
|
||||
"allowDuplicate": true,
|
||||
"autoUpdateModel": true,
|
||||
"ocrcroped": false
|
||||
|
Loading…
x
Reference in New Issue
Block a user