Moved invalid location message to location

This commit is contained in:
GeoffreyCoulaud
2023-07-26 15:27:28 +02:00
parent 04d0e9e90e
commit fa8a15addf
9 changed files with 20 additions and 11 deletions

View File

@@ -351,20 +351,10 @@ class PreferencesWindow(Adw.PreferencesWindow):
# Bad picked location, inform user
else:
title = _("Invalid Directory")
match location_name:
case "cache":
# The variable is the name of the source
subtitle_format = _("Select the {} cache directory.")
case "config":
# The variable is the name of the source
subtitle_format = _("Select the {} configuration directory.")
case "data":
# The variable is the name of the source
subtitle_format = _("Select the {} data directory.")
dialog = create_dialog(
self,
title,
subtitle_format.format(source.name),
location.invalid_subtitle.format(source.name),
"choose_folder",
_("Set Location"),
)