Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#20582 closed Bug (fixed)

Default label_suffix should be translatable

Reported by: Claude Paroz Owned by: nobody
Component: Forms Version: master
Severity: Normal Keywords:
Cc: stephane.raimbault@…, timograham@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In French for example, BaseForm.label_suffix should be preceded by a non-breaking space. We could even imagine that some languages use a different character. That's why I think that the default label_suffix should be made translatable.

Attachments (1)

20582-1.diff (3.4 KB) - added by Claude Paroz 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 4 years ago by Aymeric Augustin

Indeed, most of my projects have <colon> translated in French as <non-breaking space><colon> (or maybe half-space, I'll check with my local translation expert).

comment:2 Changed 4 years ago by Stephane Raimbault

Cc: stephane.raimbault@… added

Yes, indeed, it would be a very nice improvement to Django.
Do you intend to add label_suffix translation to django/conf/locale/fr/formats.py?

PS: I don't care about non-breaking space or half-space :p

comment:3 in reply to:  2 Changed 4 years ago by Claude Paroz

Replying to stephaner:

Yes, indeed, it would be a very nice improvement to Django.
Do you intend to add label_suffix translation to django/conf/locale/fr/formats.py?

Not my first intention. Have you arguments to favor django/conf/locale/fr/formats.py over django/conf/locale/fr/LC_MESSAGES/django.po (with translator comments)?

PS: I don't care about non-breaking space or half-space :p

I think there are disputes about this. From what I've read, it is traditionally a standard non-breaking space. Swiss French prefer half-space and other French specialists recommend something in-between :-P

Changed 3 years ago by Claude Paroz

Attachment: 20582-1.diff added

comment:4 Changed 3 years ago by Claude Paroz

Has patch: set
Version: 1.5master

comment:5 Changed 3 years ago by Tim Graham

Cc: timograham@… added
Needs documentation: set
Patch needs improvement: set

Patch no longer applies cleanly. Also I think it should be documented that this is translatable (ref/forms/api.txt)? Does it need tests?

comment:6 Changed 3 years ago by Claude Paroz

https://github.com/django/django/pull/1355

Generally we don't test the translatability of strings. label_suffix customization is tested in https://github.com/django/django/blob/master/tests/forms_tests/tests/test_forms.py#L1007.

comment:7 Changed 3 years ago by Tim Graham

Needs documentation: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:8 Changed 3 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In 755720798393e78fc3094cc3f790852737cb6813:

Fixed #20582 -- Allowed default Form.label_suffix to be translated

Thanks Tim Graham for the review.

comment:9 Changed 3 years ago by Claude Paroz <claude@…>

In db33b25e8617185acbadb4ff04eaa4c37ae67dd6:

[1.6.x] Fixed #20582 -- Allowed default Form.label_suffix to be translated

Thanks Tim Graham for the review.
Backport of 7557207983 from master.

Note: See TracTickets for help on using tickets.
Back to Top