()
| 38 | } |
| 39 | |
| 40 | func InitializeLocale() { |
| 41 | locale := findLocale() |
| 42 | if len(locale) == 0 { |
| 43 | return |
| 44 | } |
| 45 | Tr = gotext.NewLocale("/usr/share/locale", locale) |
| 46 | Tr.AddDomain("git-lfs") |
| 47 | for _, loc := range processLocale(locale) { |
| 48 | if moData, ok := locales[loc]; ok { |
| 49 | mo := gotext.NewMo() |
| 50 | decodedData, err := base64.StdEncoding.DecodeString(moData) |
| 51 | if err != nil { |
| 52 | continue |
| 53 | } |
| 54 | mo.Parse(decodedData) |
| 55 | Tr.AddTranslator("git-lfs", mo) |
| 56 | return |
| 57 | } |
| 58 | } |
| 59 | } |
no test coverage detected