From 2db709e04321b2c48b29849fc2e4b216566e232e Mon Sep 17 00:00:00 2001 From: axolotle Date: Thu, 7 Dec 2023 14:28:08 +0100 Subject: [PATCH] i18n: add domain configpanel help keys in expected keys + add/remove some keys --- locales/en.json | 1 + maintenance/missing_i18n_keys.py | 8 ++++++++ src/utils/configpanel.py | 1 - 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/locales/en.json b/locales/en.json index cd7365f95..18897a65f 100644 --- a/locales/en.json +++ b/locales/en.json @@ -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.", diff --git a/maintenance/missing_i18n_keys.py b/maintenance/missing_i18n_keys.py index 2ed7fd141..1e153231d 100644 --- a/maintenance/missing_i18n_keys.py +++ b/maintenance/missing_i18n_keys.py @@ -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")) diff --git a/src/utils/configpanel.py b/src/utils/configpanel.py index 297dcd65f..ab7f6ee15 100644 --- a/src/utils/configpanel.py +++ b/src/utils/configpanel.py @@ -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)