Skip to content
Snippets Groups Projects
Verified Commit 0710fe40 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: commit save point

parent bf13ccaa
No related branches found
No related tags found
No related merge requests found
......@@ -345,6 +345,19 @@ var l10nMap = []l10nKeyTranslation{
{"en", "Estimated"},
},
},
{
"unsuported type",
[]l10nLocaleTranslation{
{"de", "nicht unterstützter Typ %s"},
{"en", "unsuported type %s"},
},
}, {
"no value",
[]l10nLocaleTranslation{
{"de", "kein Wert"},
{"en", "no value"},
},
},
}
func initL10n() {
......
......@@ -72,9 +72,7 @@ func buildRequirements(config *Configuration, pageMap map[string]requirement) (e
buf := new(bytes.Buffer)
table := tablewriter.NewWriter(buf)
columns := []string{"Estimation", "TimeSpent", "Velocity"}
translateMetaColumns := translateHeaders(columns)
translateMetaColumns := translateHeaders(config.Requirement.Table.Columns)
table.SetHeader(translateMetaColumns)
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
......@@ -92,7 +90,7 @@ func buildRequirements(config *Configuration, pageMap map[string]requirement) (e
field := reflect.Indirect(r).FieldByName(name)
if field == (reflect.Value{}) {
row = append(row, "")
row = append(row, printer.Sprintf("no value"))
continue
}
......@@ -102,6 +100,10 @@ func buildRequirements(config *Configuration, pageMap map[string]requirement) (e
case "string":
found = true
row = append(row, field.String())
case "Duration":
found = true
t := field.Interface().(time.Duration)
row = append(row, t.String())
case "Time":
found = true
t := field.Interface().(time.Time)
......@@ -112,10 +114,10 @@ func buildRequirements(config *Configuration, pageMap map[string]requirement) (e
}
case "int":
found = true
row = append(row, field.String())
row = append(row, strconv.FormatInt(field.Int(), 10))
case "float64":
found = true
row = append(row, field.String())
row = append(row, strconv.FormatFloat(field.Float(), 'f', 10, 2))
case "nil":
row = append(row, field.String())
case "bool":
......@@ -128,7 +130,7 @@ func buildRequirements(config *Configuration, pageMap map[string]requirement) (e
}
default:
row = append(row, "")
row = append(row, printer.Sprintf("unsuported type", t.Name()))
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment