WIP new WebAdmin: remove some hard coded strings

so they can be localized

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2024-01-14 09:41:39 +01:00
parent bf94f8b87c
commit 1a0f734a9c
3 changed files with 11 additions and 19 deletions

View File

@@ -164,7 +164,8 @@ func (c *HTTPFsConfig) validate() error {
// ValidateAndEncryptCredentials validates the config and encrypts credentials if they are in plain text
func (c *HTTPFsConfig) ValidateAndEncryptCredentials(additionalData string) error {
if err := c.validate(); err != nil {
err := c.validate()
if err != nil {
var errI18n *util.I18nError
errValidation := util.NewValidationError(fmt.Sprintf("could not validate HTTP fs config: %v", err))
if errors.As(err, &errI18n) {