[fix] args for config panel i18n unknown key

This commit is contained in:
ljf 2021-10-14 12:53:15 +02:00
parent c506477551
commit 4532c75f29

View file

@ -220,9 +220,9 @@ class ConfigPanel:
self.new_values = {} self.new_values = {}
if self.save_path and not creation and not os.path.exists(self.save_path): if self.save_path and not creation and not os.path.exists(self.save_path):
raise YunohostError(f"{self.entity_type}_unknown", name=entity) raise YunohostError(f"{self.entity_type}_unknown", **{self.entity_type:entity})
if self.save_path and creation and os.path.exists(self.save_path): if self.save_path and creation and os.path.exists(self.save_path):
raise YunohostError(f"{self.entity_type}_exists", name=entity) raise YunohostError(f"{self.entity_type}_exists", **{self.entity_type:entity})
# Search for hooks in the config panel # Search for hooks in the config panel
self.hooks = {func: getattr(self, func) self.hooks = {func: getattr(self, func)