ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.81k stars 2.25k forks source link

Ruby not working in this corePLUS deck #1415

Closed hssm closed 9 years ago

hssm commented 9 years ago

Originally reported on Google Code with ID 512

What steps will reproduce the problem?
1. opening corePLUS deck - smaller test version attached
2. looking at a card with furigana  example sentence

What is the expected output? furigana above kanji
What do you see instead?
 システムの 構成[こうせい]を 変[か]えてみました。

What version of AnkiDroid are you using? On what version of Android?
beta 6  android 2.2  

Please provide any additional information below.
Ruby/furigana support is working perfectly for me with several decks - but not with
the shared corePLUS.  Works OK on the desktop version.
There was bold formatting in the sentence furigana field but I removed it  - problem
persists.

Reported by rachelsjpo0o on 2011-03-08 02:56:27


hssm commented 9 years ago
Here is an example answer found in this deck:

<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans
Serif">
<p><span style="font-family:Arial">get off, land<br />to alight (e.g. from bus)/to
get off/to descend (e.g. a mountain) (v1)<br /><br />おりる 降りる intransitive <br />降りる
[おりる] (v1) to alight (e.g. from bus); to get off; to descend (e.g. a mountain)<br />降ろす
[おろす] (v5s) to take down; to launch; to drop; to lower; to let (a person) off; to unload;
to discharge <br />次の駅で</span><span style="font-family:Arial;font-weight:600">降ります</span><span
style="font-family:Arial">。<br />I get off at the next station.<br />次[つぎ]の 駅[えき]で降[お]ります。[sound:2b2c4a0e94e1d4b3bdabc54a1e29aa2e.mp3]<br
/><br /><br />次の 【つぎの】 (n,adj-no) (1) next; following; subsequent; (2) stage; station;
(P); EP <br />駅 【えき】 (n) station; (P); EP <br />Possible inflected verb or adjective:
(polite, non-past)<br />降る 【ふる】 (v5r,vi) to precipitate; to fall (e.g. rain); (P);
EP<br />下りる [おりる] (v1) to alight (e.g. from bus)/to get off/to descend (e.g. a mountain)
(P)<br />降りる [おりる] (v1) to alight (e.g. from bus)/to get off/to descend (e.g. a mountain)
(P)<br /><br /></span><a href="http://tangorin.com/examples/降りる"><span style="font-family:Arial;text-decoration:underline">Example
sentences</span></a><span style="font-family:Arial"> ... </span><a href="http://tangorin.com/examples/おりる"><span
style="font-family:Arial;text-decoration:underline">kanasentences</span></a><span style="font-family:Arial"><br
/><br />Tags: CORE Core2000 JLPT5 K2001 Marked VerbPairs genki06 homophone iatij06
</span></p>
</body></html>

Reported by nicolas.raoul on 2011-03-08 03:20:24

hssm commented 9 years ago
Maybe the problem is that we don't convert if there is a space between the kanji and
the ruby, like in "降ろす [おろす]".

Reported by nicolas.raoul on 2011-03-08 03:22:42

hssm commented 9 years ago
I tried removing the spaces, but it didn't seem to help. I have previously
noticed, on the desktop version, that if the spaces aren't there, the
furigana can get a little (or a lot) out of synch.

Reported by rachelsjpo0o on 2011-03-08 03:48:08

hssm commented 9 years ago
When I first put this deck together - pre Anki 1.2 - I had installed a plug-in called
xxfurigana, which was supposed to help get the furigana to display in any field (the
latest version of it is still in shared plug-ins).  It involved having tags like <f!on>
and <f!off> or similar in the card template, I think there was a space in there somewhere.
Those tags controlled when they plug-in was active. These are no longer in the template
and I am not using the plug-in any more,  but they were (I think) removed after anki
upgraded the deck on the desktop. I hope this is not relevant and you have a simple
solution.
Thanks, rachels

Reported by rachelsjpo0o on 2011-03-08 04:57:10

hssm commented 9 years ago
Rachels, it seems that the ruby in TESTCP.anki is not working with Anki Desktop either,
see attached screenshot.

So I would say it is a deck problem.

Reported by nicolas.raoul on 2011-03-10 06:09:18


hssm commented 9 years ago
I felt a bit foolish when I read your post, but I opened the deck on the desktop and
it seemed OK on my computer. I have attached a screen-shot.
Windows XP Anki 1.26
I have re-attached the test deck, to make sure we are looking at exactly the same thing

Reported by rachelsjpo0o on 2011-03-10 07:35:26


hssm commented 9 years ago
I retried with the deck you just attached, and get the same result as in my last screenshot
(=no ruby transformation).
That's amazing. I am using Anki 1.2.6, and you?

Damien, should we transform "降ろす [おろす]" to ruby, despite the space character before
the bracket?

Reported by nicolas.raoul on 2011-03-10 07:43:44

hssm commented 9 years ago
Ah, sorry Rachels, you are using 1.2.6 too, I guess?
I am on Ubuntu 2010.10 but that shouldn't make a big difference.

Reported by nicolas.raoul on 2011-03-10 07:45:07

hssm commented 9 years ago
On the desktop, I get the same result as you if I don't have the 'Japanese support'
plug-in active. That is to be expected, isn't it?

Reported by rachelsjpo0o on 2011-03-10 08:38:23

hssm commented 9 years ago
Strange thing is that I also have Japanese support enabled :-/

Reported by nicolas.raoul on 2011-03-10 08:47:28


hssm commented 9 years ago
Just a small point, but  I misread your comments earlier about the spaces. I assumed
you were meaning the spaces before new kanji words, which I was aware of and feel it
is useful to keep. I wasn't aware that there were spaces between the kanji and the
brackets. I didn't write the sentences (adapted from the original core decks), and
didn't intentionally add any spaces. I could remove any that were there if needed.

Reported by rachelsjpo0o on 2011-03-10 09:56:10

hssm commented 9 years ago
Could you try and remove them for a single card, just to see if that solves the problem?

The real question is if whether we are expected to apply Ruby even when a space is
present between the kanji and the bracket. Right now we don't do it, but if Damien
says we should, then we will do it.

Reported by nicolas.raoul on 2011-03-10 10:00:29

hssm commented 9 years ago
I looked at the roughly 3000 card version of the deck that I am using on the desktop,
and the are no spaces between the kanji word and the bracket in the sfurigana field.
On the android  I had removed all spaces  from that field in the test deck, but it
didn't help.

Reported by rachelsjpo0o on 2011-03-10 10:33:12

hssm commented 9 years ago
The bits that you were looking at with space between the kanji and the ruby were probably
from other fields - just definitions copied from the dictionary and not meant to be
converted. A version with no spaces in the furiganaS field is attached here.
Goodnight all.

Reported by rachelsjpo0o on 2011-03-10 10:56:31


hssm commented 9 years ago
Email by Damien:

That's not the format Anki expects the furigana in, so there's no need
to support it. Spaces separate word boundaries for Anki, so trying to
support spaces like that could be confusing.

Reported by nicolas.raoul on 2011-03-10 12:10:29

hssm commented 9 years ago
Here is a version of the deck that displays properly with recent beta versions (see
comments in issue 5420, except for the ruby problem.

Reported by rachelsjpo0o@yahoo.com.au on 2011-04-09 02:51:08

hssm commented 9 years ago

Reported by rachelsjpo0o@yahoo.com.au on 2011-04-14 03:30:41


hssm commented 9 years ago
The problem reported in issue 542 seems to have reappeared for me.
I have been using the coreplus deck OK and decided to export a few cards from it to
demonstrate the problem I am having with issue 440. I found that the sub-deck wouldn't
show any question or answer even though the full parent deck did.
I tried again today and everything seemed OK (the deck was exported from the desktop
direct to the phone via USB, checked, copied to the desktop and uploaded) = vh.anki
above. The vh.anki on my phone displays, the vh.anki I re-downloaded from here doesn't.
I am hopelessly confused. If anyone has time and and can figure out what (I have done
? ) to cause this, I would be very interested.
nb. If vh.anki would display it would show that only the second line of the 'verb pairs'
field displays in night mode.
I can't find any troublesome carriage returns. A non-displaying deck I check yesterday
displayed in beta 2.

Reported by rachelsjpo0o on 2011-04-14 04:02:36

hssm commented 9 years ago
Ruby (as noted in the first post) is not working for this deck in beta 13. It seems
to be displaying properly in beta 15. I still have some exported sub-decks that unfortunately
will not display at all - comment 18 above.

Reported by rachelsjpo0o on 2011-04-22 00:49:43

hssm commented 9 years ago
I went straight from beta 13 (ruby working) to 0.7alpha2 and found that in the latest
alpha, the ruby, again does not display properly for this deck. 

Reported by rachelsjpo0o on 2011-04-22 21:31:35

hssm commented 9 years ago
On the other hand, the custom fonts is working! Fantastic! Thanks.

Reported by rachelsjpo0o on 2011-04-22 21:41:28

hssm commented 9 years ago
I can't test this probelm at the moment because the deck is still not displaying, but
I hope to be able to soon.  I was wondering though - Is it still the case that the
furigana in this deck doesn't display properly on some Linus desktop versions of Anki?
If so, perhaps I should enquire at the Anki help forum and see if anyone can figure
out why?  Thanks..

Reported by rachelsjpo0o on 2011-10-18 23:23:00

hssm commented 9 years ago
Please ignore the last comment. I tried editing the deck with the database editor as
instructed (542), and now I have a working version of the deck. The furigana seems
to display well in this deck in beta 1.0 beta 13 of Anki. :)

Reported by rachelsjpo0o on 2011-10-20 07:20:46

hssm commented 9 years ago

Reported by NorbertNagold on 2011-10-24 16:38:09

hssm commented 9 years ago

Reported by inigo.aldana on 2012-07-05 10:17:41

hssm commented 9 years ago

Reported by inigo.aldana on 2013-01-07 19:01:19