WordPress.org

Make WordPress Core

#37492 closed defect (bug) (wontfix)

Unifying translation strings in wp_die()

Reported by: ramiy Owned by: SergeyBiryukov
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: administration Cc:

Description

In ticket #34521 (Unifying permission error messages) we updated hundreds of translation strings inside wp_die(), fixing error messages you usually see after permission check if ( ! current_user_can( 'xxx' ) ).

In this ticket, we are going to fix 24 translation strings inside wp_die() that use <h1> and <p> tags.

I should say that we can either fix over 500 strings inside wp_die() and add HTML tags (<h1> & <p>) to all of them. Or, we can remove those unneeded HTML tags from 24 strings and unify translation strings in wp_die().

Attachments (2)

37492.patch (12.5 KB) - added by ramiy 22 months ago.
37492.2.patch (15.8 KB) - added by ramiy 20 months ago.

Download all attachments as: .zip

Change History (15)

@ramiy
22 months ago

#1 @ramiy
22 months ago

  • Component changed from Text Changes to General
  • Keywords has-patch added

no string changes, only HTML tags removal.

#2 @SergeyBiryukov
21 months ago

  • Milestone changed from Awaiting Review to 4.7

#3 @SergeyBiryukov
21 months ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.


21 months ago

This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.


21 months ago

#6 @ramiy
20 months ago

@SergeyBiryukov any updates?

#7 @ramiy
20 months ago

  • Component changed from General to I18N

@ramiy
20 months ago

#8 @ramiy
20 months ago

I updated the patch after changeset 38698. And I found few more wp_die() with HTML tags. Total 32 items updated.

Again, no text changes, the patch removes the 'Cheatin&#8217; uh?' title and the HTML tags.

#9 @ocean90
20 months ago

None of the strings include HTML tags. Which I18N issue are you trying to fix? What am I missing here?

#10 @ramiy
20 months ago

@ocean90 I'm not fixing anything, I'm trying to unify translation strings inside wp_die(). The i18n component seems like the most suitable component for this ticket.

You are right, the strings have no HTML tags, but the wp_die() do have HTML tags.

I just want to have a standard way to show error messages. Either with H1 tags, in this case lets add them to all 500+ other die functions, or remove the H1 tags from the remaining 32 die functions.

Last edited 20 months ago by ramiy (previous) (diff)

This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.


20 months ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


20 months ago

#13 @ocean90
19 months ago

  • Milestone 4.7 deleted
  • Resolution set to wontfix
  • Status changed from reviewing to closed

Closing as wontfix since there is no i18n issue with the current strings.

Those wp_die() messages were introduced in #14530 to provide more helpful feedback.

Note: See TracTickets for help on using tickets.