Commit e1e658e7feb1d4f342d042de4015115aa41c3c89

Authored by Marko Tikvić
Exists in master

merge fix

... ... @@ -3,7 +3,6 @@ package webutility
3 3 import (
4 4 "encoding/json"
5 5 "errors"
6   - "fmt"
7 6 "io/ioutil"
8 7 "path"
9 8 "strings"
... ... @@ -39,10 +38,6 @@ func (d *Dictionary) AddTranslations(directory string) error {
39 38  
40 39 loc := stripFileExtension(fName)
41 40  
42   - fmt.Println(fName, path, loc)
43   -
44   - break
45   -
46 41 var data interface{}
47 42 err = json.Unmarshal(file, &data)
48 43 if err != nil {
... ... @@ -60,6 +55,10 @@ func (d *Dictionary) AddTranslations(directory string) error {
60 55 d.supported = append(d.supported, loc)
61 56 }
62 57  
  58 + if len(d.supported) > 0 {
  59 + d.setDefaultLocale(d.supported[0])
  60 + }
  61 +
63 62 return nil
64 63 }
65 64  
... ...