WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#17160 closed enhancement (fixed)

Static WP_I18N strings in wp-load

Reported by: niallkennedy Owned by:
Milestone: 3.2 Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch
Focuses: Cc:

Description

Any reason why WP_I18N strings in wp-load need to be dynamic strings?

Patch to change to static strings.

Attachments (1)

wp-load.diff (1.7 KB) - added by niallkennedy 4 years ago.
text direction ans wp_die title as static text

Download all attachments as: .zip

Change History (7)

comment:1 @westi4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Our coding standards prefer the use of double quotes on a string that contains single quotes over escaping of the quote / apostrophe.

Closing as WONTFIX.

@niallkennedy4 years ago

text direction ans wp_die title as static text

comment:2 @niallkennedy4 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Modified patch to static strings for text direction and wp_die title. The wp_die message remains as dynamic string to adhere to coding standards.

comment:3 follow-up: @sivel4 years ago

Please do not over write patches when attaching a new patch. Doing so does not allow others to understand the context of comments made in regards to previous patches. If you do not select to replace, it will automatically increment the patch number or you can handle this on your own.

comment:4 in reply to: ↑ 3 @niallkennedy4 years ago

Replying to sivel:

Please do not over write patches when attaching a new patch. Doing so does not allow others to understand the context of comments made in regards to previous patches. If you do not select to replace, it will automatically increment the patch number or you can handle this on your own.

Sorry for creating confusion.

The original patch changed three strings in wp-load from dynamic strings to static strings: WP_I18N_TEXT_DIRECTION; WP_I18N_NO_CONFIG; WP_I18N_ERROR_TITLE.

Westi noted my proposed change to WP_I18N_NO_CONFIG requires escaping the apostrophe in "doesn't" and therefore violates the WordPress Coding Standards.

The other two strings do not contain an apostrophe and therefore should be eligible for a change to a static string.

comment:5 @westi4 years ago

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

(In [17645]) Switch some strings to single rather than double quotes in wp-load.php. Fixes #17160 props niallkennedy.

comment:6 @SergeyBiryukov3 years ago

  • Milestone set to 3.2
Note: See TracTickets for help on using tickets.