Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CPT: Use translated labels from type object for empty content #5346
This pull request seeks to use the exact labels as provided from the post types REST API endpoint when there are no posts to be shown on the custom post types list screen. This is to address localization concerns for languages where the context of the post type as used in the sentence could alter its translation.
Verify that post type labels are shown when there is no content to be displayed on the custom post types list screen.
A few things:
This becomes a little stranger (or, at least, inconsistent) when you navigate from any state like
This is something of an edge case, but I guess it's good to be aware of it.
Not a part of the actual change, but still important:
The biggest oddity is the hardcoded line
German, French and indeed most Indo-European languages will have the same problem.
Also, the current hardcoded phrasing is awkward even in English, if the user is looking at drafts:
(Feel free to ignore this if you want to get this particular PR merged quickly.)
Hmm, there could be one or two contributing factors here:
I do agree this can lead to confusing scenarios where strings are translated differently in Calypso, but I don't see an obvious solution to this problem.
This makes sense to me. Do any alternatives come to mind as improvements on these strings? Perhaps one which doesn't reference the noun, avoiding the gender issue?
"Would you like to start writing?"
This doesn't feel especially applicable to all post types, though, such as a real estate listing custom post type for a Jetpack site.
As an aside, these strings were adopted from existing posts/pages screens, which would similarly be affected by any translation confusion.
Thanks for the detailed answer.
Something like the one you suggested — "Would you like to start writing?" — could work, though I'd also consider the existing l10n'd labels, since AFAIK
We're already using the
Circling back to this PR, rebased and pushed an update to remove the secondary "Would you like to create one?" line.
I'm fine to iterate on this more in subsequent PRs, but it'd be a good idea to get these strings out of the codebase before they cause too much confusion.