Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20582 closed Bug (fixed)

Default label_suffix should be translatable

Reported by: Claude Paroz Owned by: nobody
Component: Forms Version: dev
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 11 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Aymeric Augustin, 11 years ago

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 by Stephane Raimbault, 11 years ago

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

in reply to:  2 comment:3 by Claude Paroz, 11 years ago

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

by Claude Paroz, 11 years ago

Attachment: 20582-1.diff added

comment:4 by Claude Paroz, 11 years ago

Has patch: set
Version: 1.5master

comment:5 by Tim Graham, 11 years ago

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 by Claude Paroz, 11 years ago

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 by Tim Graham, 11 years ago

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

comment:8 by Claude Paroz <claude@…>, 11 years ago

Resolution: fixed
Status: newclosed

In 755720798393e78fc3094cc3f790852737cb6813:

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

Thanks Tim Graham for the review.

comment:9 by Claude Paroz <claude@…>, 11 years ago

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