v6 Localization: Errors #2354
Closed
Eonasdan
started this conversation in
Request for comment
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm going to include some console errors/warnings for options type checking e.g.
minDate: 'cheese'
will now produce an error asTD: Could not correctly parse "cheese" to a date for option restrictions.minDate.
There's also an error event that in v4 and v5 do not really give any reasons. From the current usages I only see this event getting fired when a user provides a date that is invalid (due to maxDate, for instance). I was thinking about adding a "reason" property with an message like
Unable to set date provide value was not valid
. Since this is only used in one place it might not be a big deal.The question is: Do I need to provide a way to localize these errors? It's primarily up to the developer to deal with the config errors and I would guess developers are already dealing with
error.td
.I'm hoping to provide a way to create a localization plugin for the tooltip options e.g.
tooltips.selectTime: 'Select Time'
so that someone could translate those and other developers could just<script src="td.local.es.js"></script>
and getSeleccionar hora
instead. I might be able to use that to also localize the error messages.Beta Was this translation helpful? Give feedback.
All reactions