mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-07-30 16:38:31 +00:00
Update removeTranslations.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: __JosephAbbey <me@josephabbey.dev>
This commit is contained in:
@ -74,7 +74,12 @@ def main(translation_id: str) -> None:
|
|||||||
|
|
||||||
:param translation_id: The id of the translation to remove.
|
:param translation_id: The id of the translation to remove.
|
||||||
"""
|
"""
|
||||||
xml_files = [d + "/strings/strings.xml" for d in os.listdir(".") if os.path.isdir(d) and "resources-" in d and os.path.exists(d + "/strings/strings.xml")]
|
xml_files = []
|
||||||
|
for directory in os.listdir("."):
|
||||||
|
if os.path.isdir(directory) and "resources-" in directory:
|
||||||
|
xml_file_path = os.path.join(directory, "strings", "strings.xml")
|
||||||
|
if os.path.exists(xml_file_path):
|
||||||
|
xml_files.append(xml_file_path)
|
||||||
|
|
||||||
for xml_file in xml_files:
|
for xml_file in xml_files:
|
||||||
print(f"Processing file: {xml_file}")
|
print(f"Processing file: {xml_file}")
|
||||||
|
Reference in New Issue
Block a user