[wp-trac] [WordPress Trac] #54875: WordPress not honoring translations of _x() label functions of custom post type

WordPress Trac noreply at wordpress.org
Sat Jan 22 02:33:35 UTC 2022


#54875: WordPress not honoring translations of _x() label functions of custom post
type
--------------------------+------------------------------
 Reporter:  twinpictures  |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  I18N          |     Version:
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by twinpictures):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 found the issue. _x needs to have the 'context' defined using msgctxt like
 so:

 {{{
 #: inc/file.php:120
 msgctxt "taxonomy general name"
 msgid "Event Category"
 msgstr "Veranstaltung Kategorie"
 }}}

 Issues is resolved, just not well documented.

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


More information about the wp-trac mailing list