i18n: add domain configpanel help keys in expected keys + add/remove some keys

This commit is contained in:
axolotle 2023-12-07 14:28:08 +01:00
parent 544fe85773
commit 2db709e043
3 changed files with 9 additions and 1 deletions

View file

@ -758,6 +758,7 @@
"service_description_ssh": "Allows you to connect remotely to your server via a terminal (SSH protocol)",
"service_description_yunohost-api": "Manages interactions between the YunoHost web interface and the system",
"service_description_yunohost-firewall": "Manages open and close connection ports to services",
"service_description_yunohost-portal-api": "Manages interactions between the different user portal web interfaces and the system",
"service_description_yunomdns": "Allows you to reach your server using 'yunohost.local' in your local network",
"service_disable_failed": "Could not make the service '{service}' not start at boot.\n\nRecent service logs:{logs}",
"service_disabled": "The service '{service}' will not be started anymore when system boots.",

View file

@ -135,6 +135,12 @@ def find_expected_string_keys():
# Domain config panel
domain_config = toml.load(open(ROOT + "share/config_domain.toml"))
domain_settings_with_help_key = [
"portal_logo",
"portal_public_intro",
"portal_theme",
"portal_user_intro",
]
for panel in domain_config.values():
if not isinstance(panel, dict):
continue
@ -145,6 +151,8 @@ def find_expected_string_keys():
if not isinstance(values, dict):
continue
yield f"domain_config_{key}"
if key in domain_settings_with_help_key:
yield f"domain_config_{key}_help"
# Global settings
global_config = toml.load(open(ROOT + "share/config_global.toml"))

View file

@ -698,7 +698,6 @@ class ConfigPanel:
def _get_raw_settings(self) -> "RawSettings":
if not self.save_path or not os.path.exists(self.save_path):
return {}
# raise YunohostValidationError("config_no_settings")
return read_yaml(self.save_path)