From 933c710ac0d7e2d37b4bff758c0b0bbd3e64fa40 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 22:47:06 +0100 Subject: [PATCH] Print component_folder_name in stringtable_validator.py --- tools/stringtable_validator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/stringtable_validator.py b/tools/stringtable_validator.py index bfdc162..d5b3fa9 100644 --- a/tools/stringtable_validator.py +++ b/tools/stringtable_validator.py @@ -53,8 +53,11 @@ def check_stringtable(filepath): print(" ERROR: Package name attribute '{}' is all lowercase, should be in titlecase.".format(package_name)) errors += 1 - if package_name.lower() != os.path.basename(os.path.dirname(filepath)): - print(" ERROR: Package name attribute '{}' does not match the component folder name.".format(package_name)) + component_folder_name = os.path.basename(os.path.dirname(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 # Get all keys contained in the stringtable