mirror of https://github.com/jlelse/GoBlog
Don't translate translate button
This commit is contained in:
parent
f42b3256a4
commit
80fb177d40
9
ui.go
9
ui.go
|
@ -886,7 +886,14 @@ func (a *goBlog) renderPost(hb *htmlBuilder, rd *renderData) {
|
||||||
hb.writeEscaped(a.ts.GetTemplateStringVariant(rd.Blog.Lang, "share"))
|
hb.writeEscaped(a.ts.GetTemplateStringVariant(rd.Blog.Lang, "share"))
|
||||||
hb.writeElementClose("a")
|
hb.writeElementClose("a")
|
||||||
// Translate button
|
// 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.writeEscaped("A ⇄ 文")
|
||||||
hb.writeElementClose("a")
|
hb.writeElementClose("a")
|
||||||
hb.writeElementOpen("script", "defer", "", "src", a.assetFileName("js/translate.js"))
|
hb.writeElementOpen("script", "defer", "", "src", a.assetFileName("js/translate.js"))
|
||||||
|
|
Loading…
Reference in New Issue