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