mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Threshold for existing languages to be included (75%)
This commit is contained in:
parent
fcf60e7f7c
commit
9eb185ec39
@ -63,12 +63,11 @@ func main() {
|
||||
var langs []string
|
||||
for code, stat := range stats {
|
||||
code = strings.Replace(code, "_", "-", 1)
|
||||
if !curValidLangs[code] {
|
||||
if pct := 100 * stat.Translated / (stat.Translated + stat.Untranslated); pct < 95 {
|
||||
log.Printf("Skipping language %q (too low completion ratio %d%%)", code, pct)
|
||||
os.Remove("lang-" + code + ".json")
|
||||
continue
|
||||
}
|
||||
pct := 100 * stat.Translated / (stat.Translated + stat.Untranslated)
|
||||
if pct < 75 || !curValidLangs[code] && pct < 95 {
|
||||
log.Printf("Skipping language %q (too low completion ratio %d%%)", code, pct)
|
||||
os.Remove("lang-" + code + ".json")
|
||||
continue
|
||||
}
|
||||
|
||||
langs = append(langs, code)
|
||||
|
Loading…
Reference in New Issue
Block a user