Code

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#16973 closed Bug (duplicate)

Admin messages need capfirst for translations

Reported by: erw Owned by: nobody
Component: contrib.admin Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As discussed in the i18n group here, admin messages such as "The %(name)s "%(obj)s" was changed successfully." have translations starting immediately with "%(name)s" in many languages. Since the verbose name of the model is lowercase, the result is a message saying e.g. 'employee "Xyz" was changed successfully' where it should start with 'Employee'.

Attachments (1)

admin_message_capfirst_fix.diff (1.6 KB) - added by erw 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by erw

comment:1 Changed 3 years ago by erw

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

The attached patch also fixes the problem that these three translated strings exist:

'The %(name)s "%(obj)s" was added successfully.',
'You may edit it again below.', and the combined
'The %(name)s "%(obj)s" was added successfully. You may edit it again below.'

In response_change where the combined version is used, I have split it into the two already translated strings so the redundant string is removed and it matches the way 'You may edit it again below.' is added to the 'was added successfully' message in response_add.

comment:2 Changed 3 years ago by julien

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

Thanks for this. It has already been reported in #16350, so I'm closing as a duplicate. Please continue the conversation over there. Cheers!

comment:3 Changed 2 years ago by aaugustin

#17246 was a duplicate.

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.