You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return&arduino.CantCreateSketchError{Cause: errors.New(tr("sketch name cannot be empty"))}
76
76
}
77
77
iflen(name) >sketchNameMaxLength {
78
-
return&arduino.CantCreateSketchError{Cause: errors.New(tr("sketch name too long (%d characters). Maximum allowed length is %d",
78
+
return&arduino.CantCreateSketchError{Cause: errors.New(tr("sketch name too long (%[1]d characters). Maximum allowed length is %[2]d",
79
79
len(name),
80
80
sketchNameMaxLength))}
81
81
}
82
82
if!sketchNameValidationRegex.MatchString(name) {
83
-
return&arduino.CantCreateSketchError{Cause: errors.New(tr("invalid sketch name \"%s\". Required pattern %s",
84
-
name,
85
-
sketchNameValidationRegex.String()))}
83
+
return&arduino.CantCreateSketchError{Cause: errors.New(tr(`invalid sketch name "%[1]s": the first character must be alphanumeric, the following ones can also contain "_", "-", and ".".`,
require.EqualError(t, err, fmt.Sprintf(`Can't create sketch: invalid sketch name "%s": the first character must be alphanumeric, the following ones can also contain "_", "-", and ".".`,
0 commit comments