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

@ -138,7 +138,7 @@ Possible future extensions might include specifying the alternative texts to use
The [schema](https://raw.githubusercontent.com/house-of-abbey/GarminHomeAssistant/main/config.schema.json) is checked by using a URL directly back to this GitHub source repository, so you do not need to install that file. You can just copy & paste your entity names from the YAML configuration files used to configure Home Assistant. With a submenu, there's a difference between "title" and "name". The "name" goes on the menu item, and the "title" at the head of the submenu. If your dashboard definition fails to meet the schema, the application will simply drop items with the wrong field names without warning.
### Old depricated format
### Old deprecated format
Version 1.5 brought in a change to the JSON schema so the follow old format remains useable but is no longer favoured. The schema now marks it as 'depracated' to nudge people over.

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) + " "))