themes: load client side translations
Extend the theme headers to include the translation string scripts, allowing client side code to translate strings without server side support. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
ab405edfb6
commit
21a151ac1a
@ -167,6 +167,7 @@
|
||||
<% if css then %>
|
||||
<style title="text/css"><%= css %></style>
|
||||
<% end -%>
|
||||
<script src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
|
||||
<script src="<%=resource%>/cbi.js"></script>
|
||||
<script src="<%=resource%>/xhr.js"></script>
|
||||
</head>
|
||||
|
||||
@ -81,6 +81,7 @@
|
||||
</style>
|
||||
<% end -%>
|
||||
<meta name="viewport" content="initial-scale=1.0" />
|
||||
<script type="text/javascript" src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
|
||||
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
|
||||
|
||||
|
||||
@ -207,6 +207,7 @@
|
||||
<% if css then %>
|
||||
<style title="text/css"><%= css %></style>
|
||||
<% end -%>
|
||||
<script src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
|
||||
<script src="<%=resource%>/cbi.js"></script>
|
||||
<script src="<%=resource%>/xhr.js"></script>
|
||||
</head>
|
||||
|
||||
@ -160,6 +160,7 @@
|
||||
<%= css %>
|
||||
</style>
|
||||
<% end -%>
|
||||
<script type="text/javascript" src="<%=url('admin/translations', luci.i18n.context.lang)%><%# ?v=PKG_VERSION %>"></script>
|
||||
<script type="text/javascript" src="<%=resource%>/cbi.js"></script>
|
||||
<script type="text/javascript" src="<%=resource%>/xhr.js"></script>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user