summaryrefslogtreecommitdiffstats
path: root/pkg/app
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2018-08-14 22:12:07 +1000
committerJesse Duffield <jessedduffield@gmail.com>2018-08-14 22:12:07 +1000
commit5cbacb0c67a10f08d38634cface70f35ca0e45e4 (patch)
treeebd2c0bb9363ced2fcddf87306e3042fd2e8d429 /pkg/app
parent6e518142b48f70fc63b0c72d00754733accd23f2 (diff)
make local i18n package confirm to project structure
Diffstat (limited to 'pkg/app')
-rw-r--r--pkg/app/app.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkg/app/app.go b/pkg/app/app.go
index d558ed250..f07757f98 100644
--- a/pkg/app/app.go
+++ b/pkg/app/app.go
@@ -9,6 +9,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/gui"
+ "github.com/mjarkk/lazygit/pkg/i18n"
)
// App struct
@@ -20,6 +21,7 @@ type App struct {
OSCommand *commands.OSCommand
GitCommand *commands.GitCommand
Gui *gui.Gui
+ Tr *i18n.Localizer
}
func newLogger(config config.AppConfigurer) *logrus.Logger {
@@ -48,11 +50,17 @@ func NewApp(config config.AppConfigurer) (*App, error) {
if err != nil {
return nil, err
}
+
+ app.Tr, err = i18n.NewLocalizer()
+ if err != nil {
+ return nil, err
+ }
+
app.GitCommand, err = commands.NewGitCommand(app.Log, app.OSCommand)
if err != nil {
return nil, err
}
- app.Gui, err = gui.NewGui(app.Log, app.GitCommand, app.OSCommand, config.GetVersion())
+ app.Gui, err = gui.NewGui(app.Log, app.GitCommand, app.OSCommand, app.Tr, config.GetVersion())
if err != nil {
return nil, err
}