mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
Fully translated pkg/gui/commit_message_panel.go
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
|||||||
func (gui *Gui) handleCommitConfirm(g *gocui.Gui, v *gocui.View) error {
|
func (gui *Gui) handleCommitConfirm(g *gocui.Gui, v *gocui.View) error {
|
||||||
message := gui.trimmedContent(v)
|
message := gui.trimmedContent(v)
|
||||||
if message == "" {
|
if message == "" {
|
||||||
return gui.createErrorPanel(g, "You cannot commit without a commit message")
|
return gui.createErrorPanel(g, gui.Tr.SLocalize("CommitWithoutMessageErr", "You cannot commit without a commit message"))
|
||||||
}
|
}
|
||||||
sub, err := gui.GitCommand.Commit(g, message)
|
sub, err := gui.GitCommand.Commit(g, message)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -48,5 +48,13 @@ func (gui *Gui) handleNewlineCommitMessage(g *gocui.Gui, v *gocui.View) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (gui *Gui) handleCommitFocused(g *gocui.Gui, v *gocui.View) error {
|
func (gui *Gui) handleCommitFocused(g *gocui.Gui, v *gocui.View) error {
|
||||||
return gui.renderString(g, "options", "esc: close, enter: confirm")
|
message := gui.Tr.TemplateLocalize(
|
||||||
|
"CloseConfirm",
|
||||||
|
"{{.keyBindClose}}: close, {{.keyBindConfirm}}: confirm",
|
||||||
|
map[string]interface{}{
|
||||||
|
"keyBindClose": "esc",
|
||||||
|
"keyBindConfirm": "enter",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
return gui.renderString(g, "options", message)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,6 +160,12 @@ func addDutch(i18nObject *i18n.Bundle) {
|
|||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
ID: "NoTrackingThisRepo",
|
ID: "NoTrackingThisRepo",
|
||||||
Other: "deze branch wordt niet gevolgd",
|
Other: "deze branch wordt niet gevolgd",
|
||||||
|
}, &i18n.Message{
|
||||||
|
ID: "CommitWithoutMessageErr",
|
||||||
|
Other: "Je kan geen commit maken zonder commit bericht",
|
||||||
|
}, &i18n.Message{
|
||||||
|
ID: "CloseConfirm",
|
||||||
|
Other: "{{.keyBindClose}}: Sluiten, {{.keyBindConfirm}}: Bevestigen",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user