-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Translation suport; use tag content for fallback text (#7)
Instead of hardcoding strings that cannot be overridden by the user, we're using Markdown-It's environment object to support translation, either with a built-in very naive function, or with a user-provided function. The English messages can also be customized without touching the translation logic. The transparent content inside <video> and <audio> tags is not a standard accessibility feature like the ALT text; it is only shown when the browser cannot play this content at all. The standard recommendation is to use this text to offer a download link. See, e.g., the examples in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video This implementation does so, but it also adds the descriptive text (if any) for good measure. For backwards compatibility, we continue to store the descriptive text (or "Untitled ...") in parsed.title, and it can still be accessed inside the Handlebars template via {{title}}.
- Loading branch information
1 parent
6696c2c
commit f178acd
Showing
11 changed files
with
367 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.