diff --git a/tools/stringtable_validator.py b/tools/stringtable_validator.py index bde27a6..ad61b9a 100644 --- a/tools/stringtable_validator.py +++ b/tools/stringtable_validator.py @@ -57,9 +57,10 @@ def check_stringtable(filepath): if package_name.lower() != component_folder_name: # TODO: Check if it might be subaddon - subcomponent_folder_name = os.path.join(os.path.dirname(os.path.dirname(filepath)), component_folder_name) - if package_name.lower() != subcomponent_folder_name: - print(" ERROR: Package name attribute '{}' does not match any of component folder name '{}' and subcomponent '{}'.".format(package_name, component_folder_name, subcomponent_folder_name)) + parent_component_folder_name = os.path.basename(os.path.dirname(os.path.dirname(filepath))) + subcomponent_name = f"{parent_component_folder_name}_{component_folder_name}" + if package_name.lower() != subcomponent_name: + print(" ERROR: Package name attribute '{}' does not match any of component folder name '{}' and subcomponent '{}'.".format(package_name, component_folder_name, subcomponent_name)) errors += 1 # Get all keys contained in the stringtable