Threshold for existing languages to be included (75%)

This commit is contained in:
Jakob Borg 2014-10-08 13:57:11 +02:00
parent fcf60e7f7c
commit 9eb185ec39

View File

@ -63,12 +63,11 @@ func main() {
var langs []string var langs []string
for code, stat := range stats { for code, stat := range stats {
code = strings.Replace(code, "_", "-", 1) code = strings.Replace(code, "_", "-", 1)
if !curValidLangs[code] { pct := 100 * stat.Translated / (stat.Translated + stat.Untranslated)
if pct := 100 * stat.Translated / (stat.Translated + stat.Untranslated); pct < 95 { if pct < 75 || !curValidLangs[code] && pct < 95 {
log.Printf("Skipping language %q (too low completion ratio %d%%)", code, pct) log.Printf("Skipping language %q (too low completion ratio %d%%)", code, pct)
os.Remove("lang-" + code + ".json") os.Remove("lang-" + code + ".json")
continue continue
}
} }
langs = append(langs, code) langs = append(langs, code)