1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00
This commit is contained in:
Jesse Duffield
2018-08-14 23:48:18 +10:00
5 changed files with 9 additions and 5 deletions

View File

@@ -1 +1 @@
v0.1.58 v0.1.59

View File

@@ -9,7 +9,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/config" "github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/gui" "github.com/jesseduffield/lazygit/pkg/gui"
"github.com/mjarkk/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/i18n"
) )
// App struct // App struct

View File

@@ -13,6 +13,7 @@ import (
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/jesseduffield/lazygit/pkg/i18n"
) )
func (gui *Gui) stagedFiles() []commands.File { func (gui *Gui) stagedFiles() []commands.File {

View File

@@ -19,7 +19,7 @@ import (
"github.com/golang-collections/collections/stack" "github.com/golang-collections/collections/stack"
"github.com/jesseduffield/gocui" "github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/commands" "github.com/jesseduffield/lazygit/pkg/commands"
"github.com/mjarkk/lazygit/pkg/i18n" "github.com/jesseduffield/lazygit/pkg/i18n"
) )
// OverlappingEdges determines if panel edges overlap // OverlappingEdges determines if panel edges overlap
@@ -78,7 +78,7 @@ type guiState struct {
} }
// NewGui builds a new gui handler // NewGui builds a new gui handler
func NewGui(log *logrus.Logger, gitCommand *commands.GitCommand, oSCommand *commands.OSCommand, tr *lang.Localizer, version string) (*Gui, error) { func NewGui(log *logrus.Logger, gitCommand *commands.GitCommand, oSCommand *commands.OSCommand, tr *i18n.Localizer, version string) (*Gui, error) {
initialState := guiState{ initialState := guiState{
Files: make([]commands.File, 0), Files: make([]commands.File, 0),
PreviousView: "files", PreviousView: "files",

View File

@@ -18,7 +18,10 @@ type Localizer struct {
func NewLocalizer(log *logrus.Logger) (*Localizer, error) { func NewLocalizer(log *logrus.Logger) (*Localizer, error) {
// detect the user's language // detect the user's language
userLang, _ := jibber_jabber.DetectLanguage() userLang, err := jibber_jabber.DetectLanguage()
if err != nil {
return nil, err
}
log.Info("language: " + userLang) log.Info("language: " + userLang)
// create a i18n bundle that can be used to add translations and other things // create a i18n bundle that can be used to add translations and other things