Skip to content

Commit

Permalink
Try to handle subcomponent in stringtable_validator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
3Mydlo3 committed Dec 18, 2024
1 parent 933c710 commit 38b18cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/stringtable_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def check_stringtable(filepath):

if package_name.lower() != component_folder_name:
# TODO: Check if it might be subaddon
print(" ERROR: Package name attribute '{}' does not match the component folder name '{}'.".format(package_name, component_folder_name))
errors += 1
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))
errors += 1

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

0 comments on commit 38b18cd

Please sign in to comment.