[wp-trac] [WordPress Trac] #53125: Error messages should not be translateable

WordPress Trac noreply at wordpress.org
Sat May 1 08:56:32 UTC 2021


#53125: Error messages should not be translateable
--------------------------+-----------------------------
 Reporter:  malthert      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 e.g. wp-db.php has an error message:

 {{{#!php
 $error_str = sprintf( __( 'WordPress database error %1$s for query %2$s'
 ), $str, $this->last_query );
 }}}

 Since this is error logged, we will end up with 5 different languages of
 this string in error log, when using multilingual websites.
 General consensus for software is that errors in logs should always be in
 English. (unlike errors displayed to the user).

 Since %1$s and %2$s in this string are in English (since mysql always
 returns errors in English), we end up with a language mish-mash.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53125>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list