diff options
author | Sean E. Russell <ser@ser1.net> | 2020-11-23 14:58:32 -0600 |
---|---|---|
committer | Sean E. Russell <ser@ser1.net> | 2020-11-23 14:58:32 -0600 |
commit | daf5916fde35c7ae2a69fc45a32f9c684d88fe2b (patch) | |
tree | 2090650c190b4a517d6d1f4da8fde1cb3b2c2563 /layout/parser.go | |
parent | 72cde0545887f98e58423c1495327276daa202b5 (diff) | |
parent | edf0c2a3a8edd43a685ef91c2e3f9f3ea7d5bc23 (diff) |
Resolves merge conflicts
Diffstat (limited to 'layout/parser.go')
-rw-r--r-- | layout/parser.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/layout/parser.go b/layout/parser.go index b747eae..b922067 100644 --- a/layout/parser.go +++ b/layout/parser.go @@ -83,7 +83,8 @@ func ParseLayout(i io.Reader) layout { if len(rs) > 1 { v, e := strconv.Atoi(rs[0]) if e != nil { - log.Printf("Layout error on line %d: format must be INT:STRING/INT. Error parsing %s as a int. Word was %s. Using a row height of 1.", lineNo, rs[0], w) + ln := strconv.Itoa(lineNo) + log.Printf(tr.Value("layout.error.format", "INT:STRING/INT", ln, rs[0], w)) v = 1 } if v < 1 { @@ -99,7 +100,8 @@ func ParseLayout(i io.Reader) layout { if len(ks) > 1 { weight, e := strconv.Atoi(ks[1]) if e != nil { - log.Printf("Layout error on line %d: format must be STRING/INT. Error parsing %s as a int. Word was %s. Using a weight of 1 for widget.", lineNo, ks[1], w) + ln := strconv.Itoa(lineNo) + log.Printf(tr.Value("layout.error.format", "STRING/INT", ln, ks[1], w)) weight = 1 } if weight < 1 { @@ -107,7 +109,8 @@ func ParseLayout(i io.Reader) layout { } wr.Weight = float64(weight) if len(ks) > 2 { - log.Printf("Layout warning on line %d: too many '/' in word %s; ignoring extra junk.", lineNo, w) + ln := strconv.Itoa(lineNo) + log.Printf(tr.Value("layout.error.slashes", ln, w)) } weightTotal += weight } else { |