Re: [Django] #29131: Make the error message for ArrayField more user and translation-friendly

2020-03-16 Thread Django
#29131: Make the error message for ArrayField more user and translation-friendly
--+
 Reporter:  Vlada Macek   |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  closed
Component:  contrib.postgres  |  Version:  2.0
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  1
--+

Comment (by felixxm):

 I'm not sure what kind of change or documentation improvement we could do.
 These patches changed only error messages. Index and slice transforms
 still use 0-based indexing.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.bdf1057f60b1bf5af182f1edbe655f17%40djangoproject.com.


Re: [Django] #29131: Make the error message for ArrayField more user and translation-friendly

2020-03-16 Thread Django
#29131: Make the error message for ArrayField more user and translation-friendly
--+
 Reporter:  Vlada Macek   |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  closed
Component:  contrib.postgres  |  Version:  2.0
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  1
--+

Comment (by Pavel Savchenko):

 This feature came as a surprise to us when we upgraded from 2.0 to 2.1, as
 we were relying on 0-index (i.e we were adding +1 manually to ).

 I guess it's too late for release notes (though we could mention it in
 3.1?), though we could also mention that it's 1-indexed in the related
 documentation here:

 
https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#django.contrib.postgres.fields.ArrayField.base_field

 What do you think, shall we create a separate ticket for documenting this?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.110304021aa4f352b8fd4f38d71bb785%40djangoproject.com.


Re: [Django] #29131: Make the error message for ArrayField more user and translation-friendly

2018-05-13 Thread Django
#29131: Make the error message for ArrayField more user and translation-friendly
--+
 Reporter:  Vlada Macek   |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  closed
Component:  contrib.postgres  |  Version:  2.0
 Severity:  Normal|   Resolution:  fixed
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  1
--+
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => fixed


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.5d89f2fa6a71f4247424e8755715b3f7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29131: Make the error message for ArrayField more user and translation-friendly

2018-05-13 Thread Django
#29131: Make the error message for ArrayField more user and translation-friendly
--+
 Reporter:  Vlada Macek   |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.postgres  |  Version:  2.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  1
--+

Comment (by Tim Graham ):

 In [changeset:"31ce1f74334add625a4ed82b531d769828237882" 31ce1f74]:
 {{{
 #!CommitTicketReference repository=""
 revision="31ce1f74334add625a4ed82b531d769828237882"
 Refs #29131 -- Fixed space handling in ArrayField's item_invalid message.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.62fd4fbf6753f16ece9fcde303b926b5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29131: Make the error message for ArrayField more user and translation-friendly

2018-04-22 Thread Django
#29131: Make the error message for ArrayField more user and translation-friendly
--+
 Reporter:  Vlada Macek   |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.postgres  |  Version:  2.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  1
--+

Comment (by Tim Graham ):

 In [changeset:"b33f10d8cc5037f49d5f9c462c510f0fcf11bcf5" b33f10d]:
 {{{
 #!CommitTicketReference repository=""
 revision="b33f10d8cc5037f49d5f9c462c510f0fcf11bcf5"
 Refs #29131 -- Made ArrayField error messages index from 1 instead of 0.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.ebbb0a4c4e32af911ac474735d7542dc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29131: Make the error message for ArrayField more user and translation-friendly

2018-02-14 Thread Django
#29131: Make the error message for ArrayField more user and translation-friendly
--+
 Reporter:  Vlada Macek   |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.postgres  |  Version:  2.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  1
--+

Comment (by Vlada Macek):

 > Changing array to list might be okay, but what about all the messages in
 the ArrayField model field that use "array".

 Quickly peeking... I'd say this could be the only message observable by
 the end user.

 > About the addition of "(count from the left)"... I think that would be
 better added in translational only for languages (if any?) where counting
 in lists happens from the right?

 I proposed such suboptimal wording rather to point out the non-technical
 people might not be even prepared to count items from either side.

 The resulting concatenated message for
 `ArrayField(base_field=models.EmailField)`  looks like this:

 `: Item %(nth)s in the array did not validate: Enter valid
 e-mail address`

 Personally I'd expect the value itself to be mentioned:

 `: One of the values in the list (%(value)s) did not validate:
 Enter valid e-mail address`

 > I guess the idea would be to modify
 `contrib.postgres.utils.prefix_validation_error()` to add the space
 instead.

 Exactly what I found out.

 Thank you.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.622ad43fd770c9b356ce682bbc065c8e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #29131: Make the error message for ArrayField more user and translation-friendly (was: Error message of ArrayField is unfriendly and has excessive trailing space)

2018-02-14 Thread Django
#29131: Make the error message for ArrayField more user and translation-friendly
--+
 Reporter:  Vlada Macek   |Owner:  (none)
 Type:  Cleanup/optimization  |   Status:  new
Component:  contrib.postgres  |  Version:  2.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  0 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  1
--+
Changes (by Tim Graham):

 * type:  Bug => Cleanup/optimization
 * stage:  Unreviewed => Accepted


Comment:

 I think indexing from 1 instead of 0 is an improvement.

 Changing array to list might be okay, but what about all the messages in
 the `ArrayField` model field that use "array".

 About the addition of "(count from the left)"... I think that would be
 better added in translational only for languages (if any?) where counting
 in lists happens from the right?

 I see your point about the trailing space -- the translated messages I
 checked don't have the trailing space. I guess the idea would be to modify
 `contrib.postgres.utils.prefix_validation_error()` to add the space
 instead.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.0e6b67ffc4586babe5643efe46b1f662%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.