summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kopenga <mkopenga@gmail.com>2018-08-15 11:12:46 +0200
committerMark Kopenga <mkopenga@gmail.com>2018-08-15 11:12:46 +0200
commit295093a432f991869abc52bc7cb00addd0032bf1 (patch)
tree6c4d3d56e437ce740c8a37a54731667be9a3a77f
parent10c53162ca99250b25ec15dbfad66f425af35342 (diff)
Translated pkg/gui/stash_panel.go
-rw-r--r--pkg/gui/stash_panel.go27
-rw-r--r--pkg/i18n/dutch.go27
2 files changed, 45 insertions, 9 deletions
diff --git a/pkg/gui/stash_panel.go b/pkg/gui/stash_panel.go
index b4fb11902..96d7baba7 100644
--- a/pkg/gui/stash_panel.go
+++ b/pkg/gui/stash_panel.go
@@ -33,10 +33,10 @@ func (gui *Gui) getSelectedStashEntry(v *gocui.View) *commands.StashEntry {
func (gui *Gui) renderStashOptions(g *gocui.Gui) error {
return gui.renderOptionsMap(g, map[string]string{
- "space": "apply",
- "g": "pop",
- "d": "drop",
- "← → ↑ ↓": "navigate",
+ "space": gui.Tr.SLocalize("apply", "apply"),
+ "g": gui.Tr.SLocalize("pop", "pop"),
+ "d": gui.Tr.SLocalize("drop", "drop"),
+ "← → ↑ ↓": gui.Tr.SLocalize("navigate", "navigate"),
})
}
@@ -47,7 +47,7 @@ func (gui *Gui) handleStashEntrySelect(g *gocui.Gui, v *gocui.View) error {
go func() {
stashEntry := gui.getSelectedStashEntry(v)
if stashEntry == nil {
- gui.renderString(g, "main", "No stash entries")
+ gui.renderString(g, "main", gui.Tr.SLocalize("NoStashEntries", "No stash entries"))
return
}
diff, _ := gui.GitCommand.GetStashEntryDiff(stashEntry.Index)
@@ -65,7 +65,9 @@ func (gui *Gui) handleStashPop(g *gocui.Gui, v *gocui.View) error {
}
func (gui *Gui) handleStashDrop(g *gocui.Gui, v *gocui.View) error {
- return gui.createConfirmationPanel(g, v, "Stash drop", "Are you sure you want to drop this stash entry?", func(g *gocui.Gui, v *gocui.View) error {
+ title := gui.Tr.SLocalize("StashDrop", "Stash drop")
+ message := gui.Tr.SLocalize("SureDropStashEntry", "Are you sure you want to drop this stash entry?")
+ return gui.createConfirmationPanel(g, v, title, message, func(g *gocui.Gui, v *gocui.View) error {
return gui.stashDo(g, v, "drop")
}, nil)
}
@@ -73,7 +75,14 @@ func (gui *Gui) handleStashDrop(g *gocui.Gui, v *gocui.View) error {
func (gui *Gui) stashDo(g *gocui.Gui, v *gocui.View, method string) error {
stashEntry := gui.getSelectedStashEntry(v)
if stashEntry == nil {
- return gui.createErrorPanel(g, "No stash to "+method)
+ errorMessage := gui.Tr.TemplateLocalize(
+ "NoStashTo",
+ "No stash to {{.method}}",
+ map[string]interface{}{
+ "method": method,
+ },
+ )
+ return gui.createErrorPanel(g, errorMessage)
}
if err := gui.GitCommand.StashDo(stashEntry.Index, method); err != nil {
gui.createErrorPanel(g, err.Error())
@@ -84,9 +93,9 @@ func (gui *Gui) stashDo(g *gocui.Gui, v *gocui.View, method string) error {
func (gui *Gui) handleStashSave(g *gocui.Gui, filesView *gocui.View) error {
if len(gui.trackedFiles()) == 0 && len(gui.stagedFiles()) == 0 {
- return gui.createErrorPanel(g, "You have no tracked/staged files to stash")
+ return gui.createErrorPanel(g, gui.Tr.SLocalize("NoTrackedStagedFilesStash", "You have no tracked/staged files to stash"))
}
- gui.createPromptPanel(g, filesView, "Stash changes", func(g *gocui.Gui, v *gocui.View) error {
+ gui.createPromptPanel(g, filesView, gui.Tr.SLocalize("StashChanges", "Stash changes"), func(g *gocui.Gui, v *gocui.View) error {
if err := gui.GitCommand.StashSave(gui.trimmedContent(v)); err != nil {
gui.createErrorPanel(g, err.Error())
}
diff --git a/pkg/i18n/dutch.go b/pkg/i18n/dutch.go
index 1f59529b0..e970a0a2d 100644
--- a/pkg/i18n/dutch.go
+++ b/pkg/i18n/dutch.go
@@ -238,6 +238,33 @@ func addDutch(i18nObject *i18n.Bundle) {
}, &i18n.Message{
ID: "undo",
Other: "ongedaan maken",
+ }, &i18n.Message{
+ ID: "pop",
+ Other: "pop",
+ }, &i18n.Message{
+ ID: "drop",
+ Other: "drop",
+ }, &i18n.Message{
+ ID: "apply",
+ Other: "toepassen",
+ }, &i18n.Message{
+ ID: "NoStashEntries",
+ Other: "Geen stash items",
+ }, &i18n.Message{
+ ID: "StashDrop",
+ Other: "Stash drop",
+ }, &i18n.Message{
+ ID: "SureDropStashEntry",
+ Other: "Weet je het zeker dat je deze stash entry wil laten vallen?",
+ }, &i18n.Message{
+ ID: "NoStashTo",
+ Other: "Geen stash voor {{.method}}",
+ }, &i18n.Message{
+ ID: "NoTrackedStagedFilesStash",
+ Other: "Je hebt geen tracked/staged bestanden om te laten stashen",
+ }, &i18n.Message{
+ ID: "StashChanges",
+ Other: "Stash veranderingen",
},
)
}