Don't translate translate button

This commit is contained in:
Jan-Lukas Else 2022-04-10 11:58:29 +02:00
parent f42b3256a4
commit 80fb177d40
1 changed files with 8 additions and 1 deletions

9
ui.go
View File

@ -886,7 +886,14 @@ func (a *goBlog) renderPost(hb *htmlBuilder, rd *renderData) {
hb.writeEscaped(a.ts.GetTemplateStringVariant(rd.Blog.Lang, "share"))
hb.writeElementClose("a")
// Translate button
hb.writeElementOpen("a", "id", "translateBtn", "class", "button", "href", fmt.Sprintf("https://translate.google.com/translate?u=%s", a.getFullAddress(p.Path)), "target", "_blank", "rel", "nofollow noopener noreferrer", "title", a.ts.GetTemplateStringVariant(rd.Blog.Lang, "translate"))
hb.writeElementOpen(
"a", "id", "translateBtn",
"class", "button",
"href", fmt.Sprintf("https://translate.google.com/translate?u=%s", a.getFullAddress(p.Path)),
"target", "_blank", "rel", "nofollow noopener noreferrer",
"title", a.ts.GetTemplateStringVariant(rd.Blog.Lang, "translate"),
"translate", "no",
)
hb.writeEscaped("A ⇄ 文")
hb.writeElementClose("a")
hb.writeElementOpen("script", "defer", "", "src", a.assetFileName("js/translate.js"))