mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 19:08:58 +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
|
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user