The portal in English and Turkish: a catalogue per language, a switcher at the foot of every page, landing.language, Turkish numbers and dates
Every template and handler message in internal/web goes through a JSON
catalogue under internal/web/locales/<code>/, with English as the fallback.
The language is the person's choice (a cookie set by /_lang/{code}), else
Accept-Language, else landing.language. Tests refuse a key some language
lacks, a translation with other arguments than English, and template text
left in English.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
30f7f3474a
commit
11231d8c2b
113 files changed
+8091
-1981
No files matched your search
@@ -1,13 +1,13 @@
|
||||
{{define "node_logs"}}<!doctype html>
|
||||
<html lang="en"><head>
|
||||
<html lang="{{lang}}"><head>
|
||||
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
{{if .Follow}}<meta http-equiv="refresh" content="5">{{end}}
|
||||
<title>llmgw — {{.Node}} logs</title><link rel="stylesheet" href="{{stylesheet}}">
|
||||
<title>llmgw — {{t "logs.title" .Node}}</title><link rel="stylesheet" href="{{stylesheet}}">
|
||||
</head><body><div class="wrap">
|
||||
<header>
|
||||
<h1>{{.Node}}</h1>
|
||||
<p class="sub">{{if eq .Source "agent"}}the agent's log{{else}}output of engine <code>{{.Source}}</code>{{end}} · last {{.Count}} lines</p>
|
||||
{{if .OnAdminListener}}<nav><a href="{{.Back}}">cluster</a></nav>{{else}}{{template "nav" .Nav}}{{end}}
|
||||
<p class="sub">{{if eq .Source "agent"}}{{t "logs.agent"}}{{else}}{{th "logs.engine" .Source}}{{end}} · {{t "logs.last_lines" .Count}}</p>
|
||||
{{if .OnAdminListener}}<nav><a href="{{.Back}}">{{t "node.nav.cluster"}}</a></nav>{{else}}{{template "nav" .Nav}}{{end}}
|
||||
</header>
|
||||
|
||||
<p>
|
||||
@@ -15,17 +15,18 @@
|
||||
{{range .Sources}}<a href="{{$d.Base}}?source={{.}}&lines={{$d.Count}}{{if $d.Follow}}&follow=1{{end}}"{{if eq . $d.Source}} aria-current="page"><strong>{{.}}</strong>{{else}}>{{.}}{{end}}</a> {{end}}
|
||||
</p>
|
||||
<p class="note">
|
||||
{{range .Counts}}<a href="{{$d.Base}}?source={{$d.Source}}&lines={{.}}{{if $d.Follow}}&follow=1{{end}}">{{.}}</a> {{end}}lines ·
|
||||
{{if .Follow}}<a href="{{.Base}}?source={{.Source}}&lines={{.Count}}">stop following</a>{{else}}<a href="{{.Base}}?source={{.Source}}&lines={{.Count}}&follow=1">follow</a> (refresh every 5s){{end}}
|
||||
{{range .Counts}}<a href="{{$d.Base}}?source={{$d.Source}}&lines={{.}}{{if $d.Follow}}&follow=1{{end}}">{{.}}</a> {{end}}{{t "logs.lines"}} ·
|
||||
{{if .Follow}}<a href="{{.Base}}?source={{.Source}}&lines={{.Count}}">{{t "logs.stop"}}</a>{{else}}<a href="{{.Base}}?source={{.Source}}&lines={{.Count}}&follow=1">{{t "logs.follow"}}</a> {{t "logs.follow_every"}}{{end}}
|
||||
</p>
|
||||
|
||||
{{/* An error from the control plane or the node is shown as it came. */}}
|
||||
{{if .Error}}<p class="bad">{{.Error}}</p>{{end}}
|
||||
{{if .Lines}}<pre id="log">{{range .Lines}}{{.}}
|
||||
{{end}}</pre>
|
||||
{{/* Newest at the bottom, like a terminal, and scrolled there: the line
|
||||
worth reading is almost always the last one. */}}
|
||||
<script>window.scrollTo(0, document.body.scrollHeight);</script>
|
||||
{{else if not .Error}}<p class="empty">Nothing logged yet.</p>{{end}}
|
||||
{{else if not .Error}}<p class="empty">{{t "logs.empty"}}</p>{{end}}
|
||||
|
||||
<footer class="note">llmgw {{.Version}} · {{.Now}}</footer>
|
||||
<footer class="note">llmgw {{.Version}} · {{.Now}}{{template "langs"}}</footer>
|
||||
</div></body></html>{{end}}
|
||||
Reference in new issue
Block a user