Typo updates

GarminHomeAssistant/translate.py:119: DeprecationWarning: The 'text' argument to find()-type methods is deprecated. Use 'string' instead.
This commit is contained in:
Philip Abbey
2023-12-31 16:44:20 +00:00
parent 5c593cc66a
commit f22dc469fb
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ with open("./resources/strings/strings.xml", "r") as f:
s.string = a.title()
else:
s.string = a
for s in soup.find(name="strings").findAll(text=lambda text:isinstance(text, Comment)):
for s in soup.find(name="strings").findAll(string=lambda text:isinstance(text, Comment)):
s.insert_before(" ")
s.replace_with(Comment(" " + GoogleTranslator(source='en', target=l[1]).translate(s) + " "))