mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add lang attribute to root HTML tag
Allow hyphens css property to work correctly and improve screen readers.
This commit is contained in:
parent
20cd023c07
commit
1fd4c4ef13
4 changed files with 8 additions and 4 deletions
|
@ -98,13 +98,13 @@ func (e *Engine) ParseTemplates() error {
|
|||
}
|
||||
|
||||
// Render process a template.
|
||||
func (e *Engine) Render(name, language string, data interface{}) []byte {
|
||||
func (e *Engine) Render(name string, data map[string]interface{}) []byte {
|
||||
tpl, ok := e.templates[name]
|
||||
if !ok {
|
||||
logger.Fatal("[Template] The template %s does not exists", name)
|
||||
}
|
||||
|
||||
printer := locale.NewPrinter(language)
|
||||
printer := locale.NewPrinter(data["language"].(string))
|
||||
|
||||
// Functions that need to be declared at runtime.
|
||||
tpl.Funcs(template.FuncMap{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue