[wp-trac] [WordPress Trac] #54858: i18n: Missing locale data if part of the translation are empty

WordPress Trac noreply at wordpress.org
Thu Jan 20 00:47:59 UTC 2022


#54858: i18n: Missing locale data if part of the translation are empty
--------------------------+------------------------------
 Reporter:  arthur791004  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by swissspidy):

 Just so I understand thid correctly, somewhere in your application you are
 setting the language property, _before WP loads the translations_.

 When WP loads the translations but can‘t find any, it overrides the locale
 data with an empty object, causing your language property to be lost.

 Is that correct?

 If so, is there a way for you do set this property later on instead?

 I hesitate to change the default call in core because it seems like a
 potentially breaking change.

 Alternatively, what if core would always set some properties like language
 instead of using an empty object?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54858#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list