]> Sergey Matveev's repositories - sgblog.git/blobdiff - cmd/sgblog/http-index.tmpl
Templates translation
[sgblog.git] / cmd / sgblog / http-index.tmpl
index 523096d312a9f774bab16c167a7b0b5362d53c1a..6056fc7b7ae607f3c151d3da37cafdb289eb6063 100644 (file)
@@ -6,34 +6,33 @@
     <title>{{.Cfg.Title}} {{if .Topic}}(topic: {{.Topic}}) {{end}}({{.Offset}}-{{.OffsetNext}})</title>
     {{with .Cfg.CSS}}<link rel="stylesheet" type="text/css" href="{{.}}">{{end}}
     {{with .Cfg.Webmaster}}<link rev="made" href="mailto:{{.}}">{{end}}
-    {{range .Cfg.GitURLs}}<link rel="vcs-git" href="{{.}}" title="Git repository">{{end}}
-    <link rel="top" href="{{.Cfg.URLPrefix}}/" title="top">
-    <link rel="alternate" title="Posts feed" href="{{.Cfg.AtomBaseURL}}{{.Cfg.URLPrefix}}/{{.AtomPostsFeed}}{{if .Topic}}?topic={{.Topic}}{{end}}" type="application/atom+xml">
-    {{if .CommentsEnabled}}<link rel="alternate" title="Comments feed" href="{{.Cfg.AtomBaseURL}}{{.Cfg.URLPrefix}}/{{.AtomCommentsFeed}}" type="application/atom+xml">{{end}}
-    {{if .Offset}}<link rel="prev" href="{{.Cfg.URLPrefix}}/?offset={{.OffsetPrev}}{{if .Topic}}&topic={{.Topic}}{{end}}" title="prev">{{end}}
-    {{if not .LogEnded}}<link rel="next" href="{{.Cfg.URLPrefix}}/?offset={{.OffsetNext}}{{if .Topic}}&topic={{.Topic}}{{end}}" title="next">{{end}}
+    {{range .Cfg.GitURLs}}<link rel="vcs-git" href="{{.}}" title="{{$.T.Get "Git repository"}}">{{end}}
+    <link rel="top" href="{{.Cfg.URLPrefix}}/" title="{{$.T.Get "top"}}">
+    <link rel="alternate" title="{{$.T.Get "Posts feed"}}" href="{{.Cfg.AtomBaseURL}}{{.Cfg.URLPrefix}}/{{.AtomPostsFeed}}{{if .Topic}}?topic={{.Topic}}{{end}}" type="application/atom+xml">
+    {{if .CommentsEnabled}}<link rel="alternate" title="{{$.T.Get "Comments feed"}}" href="{{.Cfg.AtomBaseURL}}{{.Cfg.URLPrefix}}/{{.AtomCommentsFeed}}" type="application/atom+xml">{{end}}
+    {{if .Offset}}<link rel="prev" href="{{.Cfg.URLPrefix}}/?offset={{.OffsetPrev}}{{if .Topic}}&topic={{.Topic}}{{end}}" title="{{$.T.Get "prev"}}">{{end}}
+    {{if not .LogEnded}}<link rel="next" href="{{.Cfg.URLPrefix}}/?offset={{.OffsetNext}}{{if .Topic}}&topic={{.Topic}}{{end}}" title="{{$.T.Get "next"}}">{{end}}
 </head>
 <body>
-{{with .Cfg.AboutURL}}[<a href="{{.}}">about</a>]{{end}}
+{{with .Cfg.AboutURL}}[<a href="{{.}}">{{$.T.Get "about"}}</a>]{{end}}
 {{block "links" .}}
-{{if .Offset}}[<a href="{{.Cfg.URLPrefix}}/?offset={{.OffsetPrev}}{{if .Topic}}&topic={{.Topic}}{{end}}">prev</a>]{{end}}
-{{if not .LogEnded}}[<a href="{{.Cfg.URLPrefix}}/?offset={{.OffsetNext}}{{if .Topic}}&topic={{.Topic}}{{end}}">next</a>]{{end}}
+{{if .Offset}}[<a href="{{.Cfg.URLPrefix}}/?offset={{.OffsetPrev}}{{if .Topic}}&topic={{.Topic}}{{end}}">{{$.T.Get "prev"}}</a>]{{end}}
+{{if not .LogEnded}}[<a href="{{.Cfg.URLPrefix}}/?offset={{.OffsetNext}}{{if .Topic}}&topic={{.Topic}}{{end}}">{{$.T.Get "next"}}</a>]{{end}}
 {{end}}
-{{- $Cfg := .Cfg -}}
 {{if .Topics}}<hr/>
-Topics: [<tt><a href="{{$Cfg.URLPrefix}}/">ALL</a></tt>]
-{{range .Topics}}[<tt><a href="{{$Cfg.URLPrefix}}/?topic={{.}}">{{.}}</a></tt>]
+{{$.T.Get "Topics"}}: [<tt><a href="{{$.Cfg.URLPrefix}}/">{{$.T.Get "ALL"}}</a></tt>]
+{{range .Topics}}[<tt><a href="{{$.Cfg.URLPrefix}}/?topic={{.}}">{{.}}</a></tt>]
 {{end}}
 {{end}}
 {{- $TopicsEnabled := .TopicsEnabled -}}
 {{- $datePrev := "0001-01-01" -}}
 <table border=1>
 <tr>
-    <th>N</th><th>When</th><th>Title</th>
-    <th size="5%"><a title="Lines">L</a></th>
-    <th size="5%"><a title="Comments">C</a></th>
-    <th>Linked to</th>
-    {{if .TopicsEnabled}}<th>Topics</th>{{end}}
+    <th>N</th><th>{{$.T.Get "When"}}</th><th>{{$.T.Get "Title"}}</th>
+    <th size="5%"><a title="{{$.T.Get "Lines"}}">L</a></th>
+    <th size="5%"><a title="{{$.T.Get "Comments"}}">C</a></th>
+    <th>{{$.T.Get "Linked to"}}</th>
+    {{if .TopicsEnabled}}<th>{{$.T.Get "Topics"}}</th>{{end}}
 </tr>
 {{range .Entries -}}
 {{- $dateCur := .Commit.Author.When.Format "2006-01-02" -}}
@@ -44,11 +43,11 @@ Topics: [<tt><a href="{{$Cfg.URLPrefix}}/">ALL</a></tt>]
 <tr>
     <td>{{.Num}}</td>
     <td><tt>{{.Commit.Author.When.Format "15:04"}}</tt></td>
-    <td><a href="{{$Cfg.URLPrefix}}/{{.Commit.Hash.String}}">{{.Title}}</a></td>
+    <td><a href="{{$.Cfg.URLPrefix}}/{{.Commit.Hash.String}}">{{.Title}}</a></td>
     <td>{{.LinesNum}}</td>
     <td>{{if .CommentsNum}}{{.CommentsNum}}{{else}}&nbsp;{{end}}</td>
     <td>{{if .DomainURLs}}{{range .DomainURLs}} {{.}} {{end}}{{else}}&nbsp;{{end}}</td>
-    {{if $TopicsEnabled}}<td>{{if .Topics}}{{range .Topics}} <a href="{{$Cfg.URLPrefix}}/?topic={{.}}">{{.}}</a> {{end}}{{else}}&nbsp;{{end}}</td>{{end}}
+    {{if $TopicsEnabled}}<td>{{if .Topics}}{{range .Topics}} <a href="{{$.Cfg.URLPrefix}}/?topic={{.}}">{{.}}</a> {{end}}{{else}}&nbsp;{{end}}</td>{{end}}
 </tr>
 {{end}}</table>
 {{template "links" .}}