add "interface-locale" shell data key

This commit is contained in:
piotr 2023-03-07 01:31:42 +01:00
parent 1f71b67e0e
commit b5b9f4ccb4
2 changed files with 10 additions and 2 deletions

View File

@ -47,7 +47,11 @@ def main():
# "installed-version" and "updates" keys will be missing from pre-0.3.0 installs
# we only substitute them temporarily here, w/o saving
defaults = {"installed-version": "0.0.0", "updates": []}
defaults = {
"installed-version": "0.0.0",
"updates": [],
"interface-locale": ""
}
for key in defaults:
check_key(shell_data, key, defaults[key])

View File

@ -161,7 +161,11 @@ def main():
# It must be a new installation. We need to init and save the shell data file.
if not os.path.isdir(os.path.join(data_home, "nwg-shell")):
os.makedirs(os.path.join(data_home, "nwg-shell"))
shell_data = {"installed-version": __version__, "updates": [__version__]}
shell_data = {
"installed-version": __version__,
"updates": [__version__],
"interface-locale": ""
}
save_json(shell_data, shell_data_file)
else: