mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 22:32:13 +02:00
Merge branch 'master' of https://github.com/mjarkk/lazygit
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user