MCPcopy
hub / github.com/git-lfs/git-lfs / InitializeLocale

Function InitializeLocale

tr/tr.go:40–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38}
39
40func 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}

Callers 1

RunFunction · 0.92

Calls 2

findLocaleFunction · 0.85
processLocaleFunction · 0.85

Tested by

no test coverage detected