mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
better help link for blank cards
This commit is contained in:
parent
c075191697
commit
4da89eb38e
1 changed files with 6 additions and 2 deletions
|
@ -34,13 +34,16 @@ from typing import Any, Dict, List, Optional, Tuple
|
|||
import anki
|
||||
from anki import hooks
|
||||
from anki.cards import Card
|
||||
from anki.consts import HELP_SITE
|
||||
from anki.lang import _
|
||||
from anki.models import NoteType
|
||||
from anki.notes import Note
|
||||
from anki.rsbackend import TemplateReplacementList
|
||||
from anki.sound import AVTag
|
||||
|
||||
CARD_BLANK_HELP = (
|
||||
"https://anki.tenderapp.com/kb/card-appearance/the-front-of-this-card-is-blank"
|
||||
)
|
||||
|
||||
|
||||
class TemplateRenderContext:
|
||||
"""Holds information for the duration of one card render.
|
||||
|
@ -129,7 +132,8 @@ def render_card(
|
|||
if not output.question_text.strip():
|
||||
msg = _("The front of this card is blank.")
|
||||
help = _("More info")
|
||||
msg += f"<a href='{HELP_SITE}'>{help}</a>"
|
||||
helplink = CARD_BLANK_HELP
|
||||
msg += f"<br><a href='{helplink}'>{help}</a>"
|
||||
output.question_text = msg
|
||||
|
||||
hooks.card_did_render(output, ctx)
|
||||
|
|
Loading…
Reference in a new issue