diff --git a/config/toot.tmpl b/config/toot.tmpl index dacb537..a719d5b 100644 --- a/config/toot.tmpl +++ b/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 }} diff --git a/ui/item_status.go b/ui/item_status.go index 26f4730..3c93905 100644 --- a/ui/item_status.go +++ b/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)