mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 18:27:51 +00:00
Handle non-existing translations in clean script (#38574)
This commit is contained in:
parent
6c5bcbfc3e
commit
f037feaebc
@ -44,7 +44,10 @@ def find_core():
|
|||||||
translations = int_dir / "translations" / "en.json"
|
translations = int_dir / "translations" / "en.json"
|
||||||
|
|
||||||
strings_json = json.loads(strings.read_text())
|
strings_json = json.loads(strings.read_text())
|
||||||
translations_json = json.loads(translations.read_text())
|
if translations.is_file():
|
||||||
|
translations_json = json.loads(translations.read_text())
|
||||||
|
else:
|
||||||
|
translations_json = {}
|
||||||
|
|
||||||
find_extra(
|
find_extra(
|
||||||
strings_json, translations_json, f"component::{int_dir.name}", missing_keys
|
strings_json, translations_json, f"component::{int_dir.name}", missing_keys
|
||||||
|
Loading…
x
Reference in New Issue
Block a user