Code

Opened 13 months ago

Closed 12 months ago

Last modified 12 months ago

#20582 closed Bug (fixed)

Default label_suffix should be translatable

Reported by: claudep 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 claudep 13 months ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 13 months ago by aaugustin

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 follow-up: Changed 13 months ago by stephaner

  • 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 13 months ago by claudep

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 13 months ago by claudep

comment:4 Changed 13 months ago by claudep

  • Has patch set
  • Version changed from 1.5 to master

comment:5 Changed 12 months ago by timo

  • 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 12 months ago by claudep

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 12 months ago by timo

  • Needs documentation unset
  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

comment:8 Changed 12 months ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In 755720798393e78fc3094cc3f790852737cb6813:

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

Thanks Tim Graham for the review.

comment:9 Changed 12 months 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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.