Make WordPress Core

Opened 15 months ago

Last modified 14 months ago

#56551 new enhancement

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

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


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 (5)

#1 @Clorith
15 months 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
15 months ago

Related/duplicate: #56234

#3 follow-up: @swissspidy
15 months 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
15 months 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
14 months ago

  • Component changed from Text Changes to I18N
Note: See TracTickets for help on using tickets.