From d9959eb998007fac65b76b61796214dc08903cba Mon Sep 17 00:00:00 2001 From: Mark Kopenga Date: Mon, 13 Aug 2018 20:46:53 +0200 Subject: [PATCH] fixed @jesseduffield comment #137 --- i18n.go | 27 +++++++++++++++++++++++++-- i18n/nl.toml | 19 ------------------- 2 files changed, 25 insertions(+), 21 deletions(-) delete mode 100644 i18n/nl.toml diff --git a/i18n.go b/i18n.go index a82c29255..04f6c3e35 100644 --- a/i18n.go +++ b/i18n.go @@ -11,9 +11,32 @@ func getlocalizer() *i18n.Localizer { // TODO: currently the system language issn't detected // I'm not sure how to detect it - var i18nObject = &i18n.Bundle{DefaultLanguage: language.English} + var i18nObject = &i18n.Bundle{DefaultLanguage: language.Dutch} i18nObject.RegisterUnmarshalFunc("toml", toml.Unmarshal) - i18nObject.MustLoadMessageFile("i18n/nl.toml") + + // Dutch translation for some words + i18nObject.AddMessages(language.Dutch, + &i18n.Message{ + ID: "FilesTitle", + Other: "Bestanden", + }, &i18n.Message{ + ID: "BranchesTitle", + Other: "Branches", + }, &i18n.Message{ + ID: "CommitsTitle", + Other: "Commits", + }, &i18n.Message{ + ID: "StashTitle", + Other: "Stash", + }, &i18n.Message{ + ID: "CommitMessage", + Other: "Commit Bericht", + }, &i18n.Message{ + ID: "StatusTitle", + Other: "Status", + }, + ) + return i18n.NewLocalizer(i18nObject) } diff --git a/i18n/nl.toml b/i18n/nl.toml deleted file mode 100644 index 7d2d3a9a1..000000000 --- a/i18n/nl.toml +++ /dev/null @@ -1,19 +0,0 @@ -# The dutch translation for this program - -[FilesTitle] -other = "Bestanden" - -[BranchesTitle] -other = "Branches" - -[CommitsTitle] -other = "Commits" - -[StashTitle] -other = "Stash" - -[CommitMessage] -other = "Commit Bericht" - -[StatusTitle] -other = "Status" \ No newline at end of file