]> Sergey Matveev's repositories - sgblog.git/blobdiff - cmd/sgblog/http-entry.tmpl
Templates translation
[sgblog.git] / cmd / sgblog / http-entry.tmpl
index 55cfd9f1cef48845b9ff771764a2822ea60c202a..240617a97a6246e01cb568f8ad4398461bd8bfd2 100644 (file)
@@ -1,4 +1,4 @@
-{{$Cfg := .Cfg}}<!DOCTYPE html>
+<!DOCTYPE html>
 <html>
 <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@@ -7,42 +7,42 @@
        {{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="Comments feed" href="{{.AtomCommentsURL}}" type="application/atom+xml">
-       {{if .Parent}}<link rel="prev" href="{{.Cfg.URLPrefix}}/{{.Parent}}" title="prev">{{end}}
+       <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 "Comments feed"}}" href="{{.AtomCommentsURL}}" type="application/atom+xml">
+       {{if .Parent}}<link rel="prev" href="{{.Cfg.URLPrefix}}/{{.Parent}}" title="{{$.T.Get "prev"}}">{{end}}
 </head>
 <body>
-{{with .Cfg.AboutURL}}[<a href="{{.}}">about</a>]{{end}}
+{{with .Cfg.AboutURL}}[<a href="{{.}}">{{$.T.Get "about"}}</a>]{{end}}
 [<a href="{{.Cfg.URLPrefix}}/">index</a>]
-{{if .Parent}}[<a href="{{.Cfg.URLPrefix}}/{{.Parent}}">prev</a>]{{end}}
-[<tt><a title="When">{{.When}}</a></tt>]
-[<tt><a title="What">{{.Commit.Hash.String}}</a></tt>]
+{{if .Parent}}[<a href="{{.Cfg.URLPrefix}}/{{.Parent}}">{{$.T.Get "prev"}}</a>]{{end}}
+[<tt><a title="{{$.T.Get "When"}}">{{.When}}</a></tt>]
+[<tt><a title="{{$.T.Get "What"}}">{{.Commit.Hash.String}}</a></tt>]
 
 {{if .Topics}}
 <hr/>
-Topics: {{range .Topics}}[<tt><a href="{{$Cfg.URLPrefix}}/?topic={{.}}">{{.}}</a></tt>]{{end}}
+{{$.T.Get "Topics"}}: {{range .Topics}}[<tt><a href="{{$.Cfg.URLPrefix}}/?topic={{.}}">{{.}}</a></tt>]{{end}}
 {{end}}
 
 <hr/>
 <h2>{{.Title}}</h2>
 <pre>
-{{range .Lines}}{{. | lineURLize $Cfg.URLPrefix}}
+{{range .Lines}}{{. | lineURLize $.Cfg.URLPrefix}}
 {{end}}</pre>
 <hr/>
 
-{{if .NoteLines}}Note:<pre>
-{{range .NoteLines}}{{. | lineURLize $Cfg.URLPrefix}}
+{{if .NoteLines}}{{$.T.Get "Note"}}:<pre>
+{{range .NoteLines}}{{. | lineURLize $.Cfg.URLPrefix}}
 {{end}}</pre>
 <hr/>{{end}}
 
-{{if .Cfg.CommentsEmail}}[<a href="mailto:{{.Cfg.CommentsEmail}}?subject={{.TitleEscaped}}">leave comment</a>]{{end}}
+{{if .Cfg.CommentsEmail}}[<a href="mailto:{{.Cfg.CommentsEmail}}?subject={{.TitleEscaped}}">{{$.T.Get "leave a comment"}}</a>]{{end}}
 
 <dl>{{range $idx, $comment := .Comments}}
-<dt><a name="comment{{$idx}}"><a href="#comment{{$idx}}">comment {{$idx}}</a>:</dt>
+<dt><a name="comment{{$idx}}"><a href="#comment{{$idx}}">{{$.T.Get "comment"}} {{$idx}}</a>:</dt>
 <dd><pre>
 {{range $comment.HeaderLines}}{{.}}
-{{end}}{{range $comment.BodyLines}}{{. | lineURLize $Cfg.URLPrefix}}
+{{end}}{{range $comment.BodyLines}}{{. | lineURLize $.Cfg.URLPrefix}}
 {{end}}</pre></dd>
 {{end}}</dl>