p1=f'Language {lang} has {len(missing)} missing keys and {len(unused)} unused keys.'
p2='This is the primary language.'if(lang==PRIMARY_LANGUAGE)elsef'{len(identical_keys)} match {PRIMARY_LANGUAGE}, {len(placeholder_keys)} have the placeholder mark.'
print(f'{p1}{p2}')
lint_categories={
'Missing':missing,
'Unused':unused,
f'Matches {PRIMARY_LANGUAGE}':identical_keys,
'Placeholder':placeholder_keys,
}
forname,categoryinlint_categories.items():
iflen(category)>0:
print(name+':')
print(JsonHelpers.pprint_keys(sorted(category)))
deflint_report(self)->None:
print(f'There are {len(self.missing_keys)} translation keys in use that are missing from one or more language files.')
print(f'There are {len(self.unused_keys)} translation keys in language files that are not used.')