mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
Templates: Remove lang and add translation parameter
Since the interface is not always in english, we mostly removed the lang attribute from all html tags. Since the error messages in error.ejs are not translated, but always in english, there the global lang="en" should be kept. Also in the slide and editor template the div, which contains the user generated text, has the attribute translate="no" now, to avoid unwanted translations. Since on the publish view (pretty.ejs) only the user generated content is shown, we set the lang to the language defined in yaml (or 'en') as a default, but that was also moved to the corresponding markdown div instead of html. Fixes #881 See also #437 Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
4c9fc63884
commit
8e6aab0145
5 changed files with 9 additions and 9 deletions
|
@ -1,11 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<%- include('hedgedoc/head') %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body translate="no">
|
||||
<%- include('hedgedoc/header') %>
|
||||
<%- include('hedgedoc/body') %>
|
||||
<%- include('hedgedoc/footer') %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -37,7 +37,7 @@
|
|||
<![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body translate="no">
|
||||
{{{html}}}
|
||||
<div class="ui-toc dropup unselectable hidden-print" style="display:none;">
|
||||
<div class="pull-right dropdown">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<%- include('index/head') %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="<%= lang || "en" %>">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
@ -60,7 +60,7 @@
|
|||
<% } %>
|
||||
</small>
|
||||
</div>
|
||||
<div id="doc" class="container markdown-body"><%= body %></div>
|
||||
<div id="doc" class="container markdown-body" <% if (lang) { %> lang="<%= lang %>"<% } %>><%= body %></div>
|
||||
<div class="ui-toc dropup unselectable hidden-print" style="display:none;">
|
||||
<div class="pull-right dropdown">
|
||||
<a id="tocLabel" class="ui-toc-label btn btn-default" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false" title="Table of content">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
@ -48,7 +48,7 @@
|
|||
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<body translate="no">
|
||||
<div class="container">
|
||||
<div class="reveal">
|
||||
<div class="slides"><%= body %></div>
|
||||
|
|
Loading…
Reference in a new issue