mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
52f12422b0
commit
8a4b868099
@ -193,7 +193,7 @@ class AnkiWindow(QWidget):
|
|||||||
example = self.example.toPlainText()
|
example = self.example.toPlainText()
|
||||||
ruby = self.ruby
|
ruby = self.ruby
|
||||||
fields = {
|
fields = {
|
||||||
"word": word,
|
"word": json.dumps(word),
|
||||||
"rubytext": ruby,
|
"rubytext": ruby,
|
||||||
"explain": explain,
|
"explain": explain,
|
||||||
"example_sentence": example,
|
"example_sentence": example,
|
||||||
|
@ -8,11 +8,19 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
ruby = {{ rubytext }}
|
ruby = {{ rubytext }}
|
||||||
|
word = {{ word }}
|
||||||
html = ''
|
html = ''
|
||||||
|
if (ruby.length) {
|
||||||
for (i = 0; i < ruby.length; i++) {
|
for (i = 0; i < ruby.length; i++) {
|
||||||
html += ruby[i]['orig'] + '<rt>' + ruby[i]['hira'] + '</rt>';
|
html += ruby[i]['orig'] + '<rt>' + ruby[i]['hira'] + '</rt>';
|
||||||
}
|
}
|
||||||
document.getElementById('rubyword').innerHTML = '<ruby>' + html + '</ruby>'
|
html = '<ruby>' + html + '</ruby>'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
html = word
|
||||||
|
}
|
||||||
|
document.getElementById('rubyword').innerHTML = html
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -8,11 +8,19 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
ruby = {{ rubytext }}
|
ruby = {{ rubytext }}
|
||||||
|
word = {{ word }}
|
||||||
html = ''
|
html = ''
|
||||||
|
if (ruby.length) {
|
||||||
for (i = 0; i < ruby.length; i++) {
|
for (i = 0; i < ruby.length; i++) {
|
||||||
html += ruby[i]['orig'] + '<rt>' + ruby[i]['hira'] + '</rt>';
|
html += ruby[i]['orig'] + '<rt>' + ruby[i]['hira'] + '</rt>';
|
||||||
}
|
}
|
||||||
document.getElementById('rubyword').innerHTML = '<ruby>' + html + '</ruby>'
|
html = '<ruby>' + html + '</ruby>'
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
html = word
|
||||||
|
}
|
||||||
|
document.getElementById('rubyword').innerHTML = html
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user