summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorMark Kopenga <mkopenga@gmail.com>2018-08-15 11:49:43 +0200
committerMark Kopenga <mkopenga@gmail.com>2018-08-15 11:49:43 +0200
commit50b41bfcccf1f56076da487cdbe7994decbb9e6b (patch)
treeabfe432434131f03374abbb0a1b5c3d3a94bb9ab /pkg
parent295093a432f991869abc52bc7cb00addd0032bf1 (diff)
Translated pkg/gui/view_helpers.go
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gui/view_helpers.go38
-rw-r--r--pkg/i18n/dutch.go12
2 files changed, 45 insertions, 5 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go
index 331e27975..48ad73962 100644
--- a/pkg/gui/view_helpers.go
+++ b/pkg/gui/view_helpers.go
@@ -29,7 +29,14 @@ func (gui *Gui) nextView(g *gocui.Gui, v *gocui.View) error {
break
}
if i == len(cyclableViews)-1 {
- gui.Log.Info(v.Name() + " is not in the list of views")
+ message := gui.Tr.TemplateLocalize(
+ "IssntListOfViews",
+ "{{.name}} is not in the list of views",
+ map[string]interface{}{
+ "name": v.Name(),
+ },
+ )
+ gui.Log.Info(message)
return nil
}
}
@@ -52,7 +59,14 @@ func (gui *Gui) previousView(g *gocui.Gui, v *gocui.View) error {
break
}
if i == len(cyclableViews)-1 {
- gui.Log.Info(v.Name() + " is not in the list of views")
+ message := gui.Tr.TemplateLocalize(
+ "IssntListOfViews",
+ "{{.name}} is not in the list of views",
+ map[string]interface{}{
+ "name": v.Name(),
+ },
+ )
+ gui.Log.Info(message)
return nil
}
}
@@ -87,7 +101,7 @@ func (gui *Gui) newLineFocused(g *gocui.Gui, v *gocui.View) error {
case "stash":
return gui.handleStashEntrySelect(g, v)
default:
- panic("No view matching newLineFocused switch statement")
+ panic(gui.Tr.SLocalize("NoViewMachingNewLineFocusedSwitchStatement", "No view matching newLineFocused switch statement"))
}
}
@@ -105,11 +119,25 @@ func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View) error {
// we should never stack confirmation panels
if oldView != nil && oldView.Name() != "confirmation" {
oldView.Highlight = false
- gui.Log.Info("setting previous view to:", oldView.Name())
+ message := gui.Tr.TemplateLocalize(
+ "settingPreviewsViewTo",
+ "setting previous view to: {{.oldViewName}}",
+ map[string]interface{}{
+ "oldViewName": oldView.Name(),
+ },
+ )
+ gui.Log.Info(message)
gui.State.PreviousView = oldView.Name()
}
newView.Highlight = true
- gui.Log.Info("new focused view is " + newView.Name())
+ message := gui.Tr.TemplateLocalize(
+ "newFocusedViewIs",
+ "new focused view is {{.newFocusedView}}",
+ map[string]interface{}{
+ "newFocusedView": newView.Name(),
+ },
+ )
+ gui.Log.Info(message)
if _, err := g.SetCurrentView(newView.Name()); err != nil {
return err
}
diff --git a/pkg/i18n/dutch.go b/pkg/i18n/dutch.go
index e970a0a2d..85a7a72d6 100644
--- a/pkg/i18n/dutch.go
+++ b/pkg/i18n/dutch.go
@@ -265,6 +265,18 @@ func addDutch(i18nObject *i18n.Bundle) {
}, &i18n.Message{
ID: "StashChanges",
Other: "Stash veranderingen",
+ }, &i18n.Message{
+ ID: "IssntListOfViews",
+ Other: "{{.name}} is niet in de lijst van weergaves",
+ }, &i18n.Message{
+ ID: "NoViewMachingNewLineFocusedSwitchStatement",
+ Other: "Er machen geen weergave met de newLineFocused switch declaratie",
+ }, &i18n.Message{
+ ID: "settingPreviewsViewTo",
+ Other: "vorige weergave instellen op: {{.oldViewName}}",
+ }, &i18n.Message{
+ ID: "newFocusedViewIs",
+ Other: "nieuw gefocussed weergave is {{.newFocusedView}}",
},
)
}