From f934cc4d68d363319b03b7c3806e53bc5afb5817 Mon Sep 17 00:00:00 2001 From: Stanislav Nikitin Date: Thu, 9 Feb 2017 03:01:32 +0500 Subject: [PATCH] One more Windows Translator fix. --- translator/translator.go | 1 + translator/translator_windows.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/translator/translator.go b/translator/translator.go index ec08831..36c279d 100644 --- a/translator/translator.go +++ b/translator/translator.go @@ -90,6 +90,7 @@ func (t *Translator) Initialize() { // Load translations into memory. func (t *Translator) loadTranslations() { fmt.Println("Loading translations for language " + t.Language) + fmt.Println("Translations directory: " + t.translationsPath) t.translations[t.Language] = make(map[string]string) diff --git a/translator/translator_windows.go b/translator/translator_windows.go index cae6d5a..e678cec 100644 --- a/translator/translator_windows.go +++ b/translator/translator_windows.go @@ -37,7 +37,7 @@ func (t *Translator) detectLanguage() { func (t *Translator) detectTranslationsDirectory() error { // Translations MUST reside in directory neear binary! // ToDo: more checks. - t.translationsPath, _ = filepath.Abs(filepath.Dir(os.Args[0])) + t.translationsPath, _ = filepath.join(filepath.Abs(filepath.Dir(os.Args[0])), "translations") return nil }