id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 38218 Make post type labels work during locale switching swissspidy "This came up while working on #38157 and #26511. Moving the logic from `get_post_type_labels()` into its own class would greatly benefit the efforts made to switch locales. It essentially replaces the post type labels object with a new class that returns the labels on the fly (note: includes tests from #38157). The downside is that labels are never stored in an array but always translated upon request (performance problems?). What's needed for just-in-time translation (in addition to the current patch) is probably allowing passing a callback instead of an array of labels to the function. The same would need to be done for custom taxonomies and perhaps post statuses." enhancement closed normal Posts, Post Types normal duplicate needs-patch needs-unit-tests