Skip to content

Commit

Permalink
Add message that subaddon was detected
Browse files Browse the repository at this point in the history
  • Loading branch information
3Mydlo3 committed Dec 18, 2024
1 parent 5cfd94a commit 25d63ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/stringtable_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,13 @@ def check_stringtable(filepath):
component_folder_name = os.path.basename(os.path.dirname(filepath))

if package_name.lower() != component_folder_name:
# TODO: Check if it might be subaddon
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
else:
print(f" INFO: Detected subaddon '{subcomponent_name}' used in Package name attribute.")

# Get all keys contained in the stringtable
keys = package.findall("Key")
Expand Down

0 comments on commit 25d63ed

Please sign in to comment.