Browse Source

add lang

pull/253/head
Rasmus Lindroth 3 years ago
parent
commit
db7201f3ad
  1. 1
      config/toot.tmpl
  2. 7
      ui/item_status.go

1
config/toot.tmpl

@ -71,3 +71,4 @@
{{- Color .Style.TextSpecial1 }} {{ .Toot.Boosts }}
{{- Color .Style.Subtle }} Favorites
{{- Color .Style.TextSpecial1 }} {{ .Toot.Favorites }}
{{- Color .Style.TextSpecial2 }} {{ .Toot.Lang }}

7
ui/item_status.go

@ -36,6 +36,7 @@ type Toot struct {
Boosts int
Favorites int
Edited bool
Lang string
Controls string
}
@ -120,6 +121,12 @@ func drawStatus(tv *TutView, item api.Item, status *mastodon.Status, main *tview
ShowSpoiler: showSensitive,
CWlabel: cwToggle.Label,
}
for _, lang := range util.Languages {
if status.Language == lang.Code {
toot.Lang = lang.English
break
}
}
toot.AccountDisplayName = tview.Escape(status.Account.DisplayName)
toot.Account = tview.Escape(status.Account.Acct)

Loading…
Cancel
Save