Skip to content

Commit

Permalink
Maybe this time
Browse files Browse the repository at this point in the history
  • Loading branch information
3Mydlo3 committed Dec 18, 2024
1 parent 38b18cd commit 5cfd94a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/stringtable_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5cfd94a

Please sign in to comment.