Debian Codegraph @

tr/tr.go

raw symbols SCIP
1 package trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/
2
3 import (
4 "encoding/base64scip-go gomod github.com/golang/go/src go1.25.0 `encoding/base64`/"
5 "osscip-go gomod github.com/golang/go/src go1.25.0 os/"
6 "stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/"
7
8 "github.com/leonelquinteros/gotextscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/"
9 )
10
11 //go:generate go run ../tr/trgen/trgen.go
12
13 var Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr. = gotextscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/.NewLocalescip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/NewLocale().("/usr/share/locale", "en")
14
15 var localesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/locales. = make(map[string]string)
16
17 func findLocalescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/findLocale().() string {
18 vars := []string{"LC_ALL", "LC_MESSAGES", "LANG"}
19 for _, varname := range vars {
20 if val, ok := osscip-go gomod github.com/golang/go/src go1.25.0 os/.LookupEnvscip-go gomod github.com/golang/go/src go1.25.0 os/LookupEnv().(varname); ok {
21 return val
22 }
23 }
24 return ""
25 }
26
27 func processLocalescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/processLocale().(locale string) []string {
28 options := make([]string, 0, 2)
29 // For example, split "en_DK.UTF-8" into "en_DK" and "UTF-8".
30 pieces := stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.Splitscip-go gomod github.com/golang/go/src go1.25.0 strings/Split().(locale, ".")
31 options = append(options, pieces[0])
32 // For example, split "en_DK" into "en" and "DK".
33 pieces = stringsscip-go gomod github.com/golang/go/src go1.25.0 strings/.Splitscip-go gomod github.com/golang/go/src go1.25.0 strings/Split().(pieces[0], "_")
34 if len(pieces) > 1 {
35 options = append(options, pieces[0])
36 }
37 return options
38 }
39
40 func InitializeLocalescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/InitializeLocale().() {
41 locale := findLocalescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/findLocale().()
42 if len(locale) == 0 {
43 return
44 }
45 Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr. = gotextscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/.NewLocalescip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/NewLocale().("/usr/share/locale", locale)
46 Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..AddDomainscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#AddDomain().("git-lfs")
47 for _, loc := range processLocalescip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/processLocale().(locale) {
48 if moData, ok := localesscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/locales.[loc]; ok {
49 mo := gotextscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/.NewMoscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/NewMo().()
50 decodedData, err := base64scip-go gomod github.com/golang/go/src go1.25.0 `encoding/base64`/.StdEncodingscip-go gomod github.com/golang/go/src go1.25.0 `encoding/base64`/StdEncoding..DecodeStringscip-go gomod github.com/golang/go/src go1.25.0 `encoding/base64`/Encoding#DecodeString().(moData)
51 if err != nil {
52 continue
53 }
54 mo.Parsescip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Mo#Parse().(decodedData)
55 Trscip-go gomod github.com/git-lfs/git-lfs/v3 . `github.com/git-lfs/git-lfs/v3/tr`/Tr..AddTranslatorscip-go gomod github.com/leonelquinteros/gotext v1.7.2 `github.com/leonelquinteros/gotext`/Locale#AddTranslator().("git-lfs", mo)
56 return
57 }
58 }
59 }