diff options
Diffstat (limited to 'internal/web/templates/dashboard/section_form.html')
| -rw-r--r-- | internal/web/templates/dashboard/section_form.html | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/internal/web/templates/dashboard/section_form.html b/internal/web/templates/dashboard/section_form.html index 7eeaf7c..bc3ba34 100644 --- a/internal/web/templates/dashboard/section_form.html +++ b/internal/web/templates/dashboard/section_form.html @@ -1,35 +1,35 @@ -{{define "title"}}{{if .Data.section.ID}}Edit announcement{{else}}New announcement{{end}} · {{.Blog.Title}}{{end}} +{{define "title"}}{{if .Data.section.ID}}{{t "Edit announcement"}}{{else}}{{t "New announcement"}}{{end}} · {{.Blog.Title}}{{end}} {{define "content"}} {{$s := .Data.section}} <div class="card"> - <h1>{{if $s.ID}}Edit announcement{{else}}New announcement{{end}}</h1> + <h1>{{if $s.ID}}{{t "Edit announcement"}}{{else}}{{t "New announcement"}}{{end}}</h1> <form method="post" enctype="multipart/form-data"> <input type="hidden" name="_csrf" value="{{.CSRF}}"> - <label>Title <span class="muted">(optional)</span><br><input name="title" value="{{$s.Title}}" maxlength="120" autofocus placeholder="Next meeting"></label> + <label>{{t "Title"}} <span class="muted">({{t "optional"}})</span><br><input name="title" value="{{$s.Title}}" maxlength="120" autofocus placeholder="{{t "Next meeting"}}"></label> <div class="row"> - <label>Where<br><select name="column"> - <option value="main"{{if eq $s.Column "main"}} selected{{end}}>Main content (with the posts)</option> - <option value="left"{{if eq $s.Column "left"}} selected{{end}}>Left column</option> - <option value="right"{{if eq $s.Column "right"}} selected{{end}}>Right column</option> + <label>{{t "Where"}}<br><select name="column"> + <option value="main"{{if eq $s.Column "main"}} selected{{end}}>{{t "Main content (with the posts)"}}</option> + <option value="left"{{if eq $s.Column "left"}} selected{{end}}>{{t "Left column"}}</option> + <option value="right"{{if eq $s.Column "right"}} selected{{end}}>{{t "Right column"}}</option> </select></label> - <label>Position<br><select name="position"> - <option value="top"{{if eq $s.Position "top"}} selected{{end}}>At the top</option> - <option value="bottom"{{if eq $s.Position "bottom"}} selected{{end}}>At the bottom</option> + <label>{{t "Position"}}<br><select name="position"> + <option value="top"{{if eq $s.Position "top"}} selected{{end}}>{{t "At the top"}}</option> + <option value="bottom"{{if eq $s.Position "bottom"}} selected{{end}}>{{t "At the bottom"}}</option> </select></label> - <label>Look<br><select name="style"> - <option value="note"{{if eq $s.Style "note"}} selected{{end}}>Highlighted</option> - <option value="warning"{{if eq $s.Style "warning"}} selected{{end}}>Warning</option> - <option value="plain"{{if eq $s.Style "plain"}} selected{{end}}>Plain</option> + <label>{{t "Look"}}<br><select name="style"> + <option value="note"{{if eq $s.Style "note"}} selected{{end}}>{{t "Highlighted"}}</option> + <option value="warning"{{if eq $s.Style "warning"}} selected{{end}}>{{t "Warning"}}</option> + <option value="plain"{{if eq $s.Style "plain"}} selected{{end}}>{{t "Plain"}}</option> </select></label> </div> - <p class="muted small">"Top" of a side column means above its modules, "bottom" below them. If that column is not shown on your blog (see <a href="/b/{{.Blog.Subdomain}}/layout">Layout</a>) the announcement moves to the main content instead.</p> - <label for="ed-body">Text <span class="muted">(Markdown)</span></label> + <p class="muted small">{{t "“Top” of a side column means above its modules, “bottom” below them. If that column is not shown on your blog (see"}} <a href="/b/{{.Blog.Subdomain}}/layout">{{t "Layout"}}</a>) {{t "the announcement moves to the main content instead."}}</p> + <label for="ed-body">{{t "Text"}} <span class="muted">(Markdown)</span></label> {{template "editor" (dict "name" "body" "value" $s.BodyMD "rows" 10 "tall" false "upload" (print "/b/" .Blog.Subdomain "/images/upload") "csrf" .CSRF)}} - <label class="check"><input type="checkbox" name="enabled"{{if $s.Enabled}} checked{{end}}> Shown on the blog</label> + <label class="check"><input type="checkbox" name="enabled"{{if $s.Enabled}} checked{{end}}> {{t "Shown on the blog"}}</label> <p class="actionrow"> - <button type="submit">Save</button> - <a class="btn secondary" href="{{.BlogURL}}" target="_blank">View blog ↗</a> - <a href="/b/{{.Blog.Subdomain}}/announcements">Back to announcements</a> + <button type="submit">{{t "Save"}}</button> + <a class="btn secondary" href="{{.BlogURL}}" target="_blank">{{t "View blog"}} ↗</a> + <a href="/b/{{.Blog.Subdomain}}/announcements">{{t "Back to announcements"}}</a> </p> </form> </div> |
