Fix: Convert a single string in the array to a list array (#2293)

This commit is contained in:
Ludy 2024-11-21 22:18:41 +01:00 committed by GitHub
parent 32d575b4e9
commit 7773df7443
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,8 +123,10 @@ def check_for_missing_keys(reference_file, file_list, branch):
def read_properties(file_path): def read_properties(file_path):
if (os.path.isfile(file_path) and os.path.exists(file_path)):
with open(file_path, "r", encoding="utf-8") as file: with open(file_path, "r", encoding="utf-8") as file:
return file.read().splitlines() return file.read().splitlines()
return [""]
def check_for_differences(reference_file, file_list, branch, actor): def check_for_differences(reference_file, file_list, branch, actor):
@ -140,10 +142,11 @@ def check_for_differences(reference_file, file_list, branch, actor):
only_reference_file = True only_reference_file = True
for file_path in file_list: for file_path in file_list[0].split():
basename_current_file = os.path.basename(branch + "/" + file_path) basename_current_file = os.path.basename(branch + "/" + file_path)
if ( if (
basename_current_file == basename_reference_file basename_current_file == basename_reference_file
or not file_path.startswith("src/main/resources/messages_")
or not file_path.endswith(".properties") or not file_path.endswith(".properties")
or not basename_current_file.startswith("messages_") or not basename_current_file.startswith("messages_")
): ):