summaryrefslogtreecommitdiffstats
path: root/termui
diff options
context:
space:
mode:
authorSean E. Russell <ser@ser1.net>2020-06-20 16:47:48 -0500
committerSean E. Russell <ser@ser1.net>2020-06-20 16:47:48 -0500
commit23364aa754c836b8a5fbc69adbdbd49abd183a57 (patch)
tree51f9137e2bd2090ffdd938fd7c1a7b4b71c56402 /termui
parent9a56571373eb5a9ea9261afb39bebaf7ddeb700f (diff)
More strings moved to translations
Diffstat (limited to 'termui')
-rw-r--r--termui/table.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/termui/table.go b/termui/table.go
index e587839..a879489 100644
--- a/termui/table.go
+++ b/termui/table.go
@@ -5,8 +5,10 @@ import (
"image"
"log"
"strings"
+ "strconv"
. "github.com/gizak/termui/v3"
+ "github.com/jdkeke142/lingo-toml"
)
type Table struct {
@@ -30,6 +32,8 @@ type Table struct {
TopRow int // used to indicate where in the table we are scrolled at
ColResizer func()
+
+ Tr lingo.Translations
}
// NewTable returns a new Table instance
@@ -79,7 +83,8 @@ func (self *Table) Draw(buf *Buffer) {
}
if self.TopRow < 0 {
- log.Printf("table widget TopRow value less than 0. TopRow: %v", self.TopRow)
+ r := strconv.Itoa(self.TopRow)
+ log.Printf(self.Tr.Value("error.table", r))
return
}