data: simplify and validate Japanese imports
This commit is contained in:
@@ -45,6 +45,13 @@ def verify(path):
|
||||
if value != " ".join(value.split(" ")):
|
||||
errors.append(f"{where}: noncanonical candidate spacing")
|
||||
values = value.split(" ")
|
||||
if path.name.endswith(".map"):
|
||||
if len(value) > 64:
|
||||
errors.append(f"{where}: value exceeds 64 runes")
|
||||
else:
|
||||
for candidate in values:
|
||||
if len(candidate) > 64:
|
||||
errors.append(f"{where}: candidate exceeds 64 runes")
|
||||
if len(values) != len(set(values)):
|
||||
errors.append(f"{where}: duplicate candidate")
|
||||
return errors
|
||||
|
||||
Reference in New Issue
Block a user