]> Sergey Matveev's repositories - sgblog.git/blobdiff - cmd/sgblog/http-entry.tmpl
Templates translation
[sgblog.git] / cmd / sgblog / http-entry.tmpl
index 3c7fc0a3442ff3a053e2f3e2125652b1065c71f3..240617a97a6246e01cb568f8ad4398461bd8bfd2 100644 (file)
@@ -1,48 +1,48 @@
-{{$Cfg := .Cfg}}<!DOCTYPE html>
+<!DOCTYPE html>
 <html>
 <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="generator" content="SGBlog {{.Version}}">
        <title>{{.Title}} ({{.When}})</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="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>