summaryrefslogtreecommitdiffstats
path: root/cmd
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 /cmd
parent9a56571373eb5a9ea9261afb39bebaf7ddeb700f (diff)
More strings moved to translations
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotop/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/gotop/main.go b/cmd/gotop/main.go
index 2d718bd..1f9f0a5 100644
--- a/cmd/gotop/main.go
+++ b/cmd/gotop/main.go
@@ -368,7 +368,9 @@ func run() int {
lang = strings.Replace(lang, "-", "_", -1)
// Get the locale from the os
tr = ling.TranslationsForLocale(lang)
+ colorschemes.SetTr(tr)
conf = gotop.NewConfig()
+ conf.Tr = tr
// Find the config file; look in (1) local, (2) user, (3) global
// Check the last argument first
fs := flag.NewFlagSet("config", flag.ContinueOnError)
@@ -483,7 +485,7 @@ func getLayout(conf gotop.Config) (io.Reader, error) {
for _, d := range conf.ConfigDir.QueryFolders(configdir.Existing) {
paths = append(paths, d.Path)
}
- return nil, fmt.Errorf("unable find layout file %s in %s", conf.Layout, strings.Join(paths, ", "))
+ return nil, fmt.Errorf(tr.Value("error.findlayout", conf.Layout, strings.Join(paths, ", ")))
}
lo, err := folder.ReadFile(conf.Layout)
if err != nil {