diff options
author | Mark Kopenga <mkopenga@gmail.com> | 2018-08-16 07:16:32 +0200 |
---|---|---|
committer | Mark Kopenga <mkopenga@gmail.com> | 2018-08-16 07:16:32 +0200 |
commit | 88e1a815fe5c4ddf21779ca4a93f029b7b9b9239 (patch) | |
tree | 1a03be425b0ac411f3d38cceb0ce5511af22b68b /pkg/i18n | |
parent | 9abbfe5a43ea7b2a9758f910dd51d41ae43cf45b (diff) |
Fixed comment on issue #137 from @jesseduffield
Diffstat (limited to 'pkg/i18n')
-rw-r--r-- | pkg/i18n/dutch.go | 9 | ||||
-rw-r--r-- | pkg/i18n/english.go | 11 | ||||
-rw-r--r-- | pkg/i18n/i18n.go | 11 |
3 files changed, 23 insertions, 8 deletions
diff --git a/pkg/i18n/dutch.go b/pkg/i18n/dutch.go index 9bf542fad..0ba562a22 100644 --- a/pkg/i18n/dutch.go +++ b/pkg/i18n/dutch.go @@ -277,6 +277,15 @@ func addDutch(i18nObject *i18n.Bundle) { }, &i18n.Message{ ID: "CantCloseConfirmationPrompt", Other: "Kon de bevestiging prompt niet sluiten: {{.error}}", + }, &i18n.Message{ + ID: "NoChangedFiles", + Other: "Geen veranderde files", + }, &i18n.Message{ + ID: "ClearFilePanel", + Other: "maak bestandsvenster leeg", + }, &i18n.Message{ + ID: "MergeAborted", + Other: "Merge afgebroken", }, ) } diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index d4c31ae53..6e2af8e22 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -1,7 +1,5 @@ /* -About: this pakcage contains just the contents to gets started with a new translations - Todo list when making a new translation - Copy this file and rename it to the language you want to translate to like someLanguage.go - Change the addEnglish() name to the language you want to translate to like addSomeLanguage() @@ -287,6 +285,15 @@ func addEnglish(i18nObject *i18n.Bundle) { }, &i18n.Message{ ID: "CantCloseConfirmationPrompt", Other: "Could not close confirmation prompt: {{.error}}", + }, &i18n.Message{ + ID: "NoChangedFiles", + Other: "No changed files", + }, &i18n.Message{ + ID: "ClearFilePanel", + Other: "Clear file panel", + }, &i18n.Message{ + ID: "MergeAborted", + Other: "Merge aborted", }, ) } diff --git a/pkg/i18n/i18n.go b/pkg/i18n/i18n.go index 5a09d6d66..2e445391d 100644 --- a/pkg/i18n/i18n.go +++ b/pkg/i18n/i18n.go @@ -51,21 +51,19 @@ func (l *Localizer) Localize(config *i18n.LocalizeConfig) string { // SLocalize (short localize) is for 1 line localizations // ID: The id that is used in the .toml translation files // Other: the default message it needs to return if there is no translation found or the system is english -func (l *Localizer) SLocalize(ID string, Other string) string { +func (l *Localizer) SLocalize(ID string) string { return l.Localize(&i18n.LocalizeConfig{ DefaultMessage: &i18n.Message{ - ID: ID, - Other: Other, + ID: ID, }, }) } // TemplateLocalize allows the Other input to be dynamic -func (l *Localizer) TemplateLocalize(ID string, Other string, TemplateData map[string]interface{}) string { +func (l *Localizer) TemplateLocalize(ID string, TemplateData map[string]interface{}) string { return l.Localize(&i18n.LocalizeConfig{ DefaultMessage: &i18n.Message{ - ID: ID, - Other: Other, + ID: ID, }, TemplateData: TemplateData, }) @@ -79,4 +77,5 @@ func (l *Localizer) GetLanguage() string { // add translation file(s) func addBundles(i18nBundle *i18n.Bundle) { addDutch(i18nBundle) + addEnglish(i18nBundle) } |