Make WordPress Core

Opened 3 years ago

Closed 6 months ago

#56551 closed enhancement (duplicate)

Don't internationalize (translate) messages in `_doing_it_wrong()`

Reported by: helen's profile helen Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords:
Focuses: Cc:

Description

Localizing WordPress is very important and good; however, IMO it doesn't make sense for the error messages emitted by _doing_it_wrong() to be translated. This is because when you have a developer-facing error message one of the primary uses is to copy-paste it to search for what to do about it. Our messages are pretty human-friendly but it still seems like extra work for a net-negative outcome.

If we really want them to be translated in UI, then I would suggest that the message show in both the localized version as well as the non-localized (English) one.

Change History (7)

#1 @Clorith
3 years ago

I agree that technical error logs should probably be in a fixed language, and be non-translatable (case in point, Site Health's debug information is localized in the UI, but the values you can copy are all fixed strings).

I think having the errors twice would just be added confusion, and noise if anything, and I think it's perfectly fine to have them be English only, but leave the "Please see Debugging in WordPress for more information" be translatable still so that users can easily identify where to go.

#2 @SergeyBiryukov
3 years ago

Related/duplicate: #56234

#3 follow-up: @swissspidy
3 years ago

To echo the comments from that other ticket about this, I‘d like to say that this would be a poor experience for non-native English speaking developers. I understand the point with the search experience though, so maybe there could be some middle ground, e.g. displaying unique error codes that can be referenced?

#4 in reply to: ↑ 3 @chesio
3 years ago

Replying to swissspidy:

[...] so maybe there could be some middle ground, e.g. displaying unique error codes that can be referenced?

Every error message can be referenced by a timestamp as moment in time the error message has been added to the codebase. I know at least one other CMS that uses this approach.

#5 @sabernhardt
3 years ago

  • Component changed from Text Changes to I18N

#6 @swissspidy
6 months ago

  • Keywords 2nd-opinion added

#7 @swissspidy
6 months ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #56234.

Note: See TracTickets for help on using tickets.