-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Showing same example sentence over again #21
Comments
Which device are you using? Does it occur on both desktop and mobile? Randomization of the example sentences is a bit tricky, since front and back sides have to be synced, which is achieved with a neat little script called anki-persistence. To auto-play sentences, add this line at the end of the async function initAudioButtons(within = document) {
...
document.querySelector('.play-sentence').click();
} To disable spoilers, adjust the function refreshExampleSentences() {
...
sentencesInner.innerHTML = frenchFirst
? `<div class="fr">${fr}</div><span class="de">${de}</span>`
: `<div class="de">${de}</div><span class="fr">${fr}</span>`;
...
} |
Ah thanks so much! That fixed everything. I actually customised the Front card of the deck which is why I think it started messing up with regards to the randomisation. I've reverted it back and it's working perfectly. One tiny niggle is that the sentence plays immediately, i.e. not waiting for the audio of the word to finish. Is there an easy fix to that? Or even just a 3 second delay would work I think.
… Am 28.09.2024 um 15:20 schrieb Jacob Zhang ***@***.***>:
Which device are you using? Does it occur on both desktop and mobile? Randomization of the example sentences is a bit tricky, since front and back sides have to be synced, which is achieved with a neat little script called anki-persistence <https://github.com/SimonLammer/anki-persistence>.
To auto-play sentences, add this line at the end of the initAudioButtons function:
async function initAudioButtons(within = document) {
...
document.querySelector('.play-sentence').click();
}
To disable spoilers, adjust the refreshExampleSentences function, removing the spoiler class:
function refreshExampleSentences() {
...
sentencesInner.innerHTML = frenchFirst
? `<div class="fr">${fr}</div><span class="de">${de}</span>`
: `<div class="de">${de}</div><span class="fr">${fr}</span>`;
...
}
—
Reply to this email directly, view it on GitHub <#21 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUECJ3OAILKSBBLHUW5OG7DZY2GGDAVCNFSM6AAAAABO6QGCAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGYYDOMJSGY>.
You are receiving this because you authored the thread.
|
Sure, instead of setTimeout(() => {
document.querySelector('.play-sentence').click();
}, 3000); |
I've just released an update that adds easily accessible configuration options. Now you can simply set Let me know if you have more customization suggestions! |
Thanks, super cool!
I'm finding the German translations aren't very accurate, maybe you could use deepl for more accurate translations? I would do it myself but because all the french and german translations are all in one field I'm not really sure how to do it.
… Am 28.09.2024 um 16:15 schrieb Jacob Zhang ***@***.***>:
I've just released an update that adds easily accessible configuration options. Now you can simply set autoPlaySentence to true and hideSpoilers to false at the top.
Let me know if you have more customization suggestions!
—
Reply to this email directly, view it on GitHub <#21 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUECJ3PEDFTZD5GYYFPIM5DZY22YLAVCNFSM6AAAAABO6QGCAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQGY2TINRWGM>.
You are receiving this because you authored the thread.
|
Can you provide an example? |
« Tu ne m’as pas regardé quand je suis entré ! » s’est exclamé Jean.
« Tu t’es regardé dans le miroir avant de sortir ? », a demandé sa mère.
These two I saw today, and the German was quite off, quite a bit shortened I felt.
… Am 12.10.2024 um 17:18 schrieb Jacob Zhang ***@***.***>:
Can you provide an example?
—
Reply to this email directly, view it on GitHub <#21 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AUECJ3NILOMNHVONBN2UMH3Z3E4UVAVCNFSM6AAAAABO6QGCAKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGU4TQNRXG4>.
You are receiving this because you authored the thread.
|
Thanks for the report. I've been working to improve the sentence system. The new version, which may take some months to complete, will feature 100.000+ improved sentences. |
Hi, really loving your deck, thank you so much. One problem I've been having, and I don't think it's always been the case, but recently all the example sentences have been the same and not randomized. Do you know why this might be?
I was also wondering if there was a way to auto-play the sentences in French and unhide the translation of the example sentence. I tried looking at the code but I was pretty confused.
The text was updated successfully, but these errors were encountered: