-
Notifications
You must be signed in to change notification settings - Fork 891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rephrase sentences to exclude mention of a post type #16773
Comments
@OlaIola I don't think this is really a plugin bug. Do you think this can be fixed by changing the translation? If so, can you submit a suggestion at the translations page? |
I don't think it can be fixed by translation because you cannot chuck out %s the string will become fuzzy. Passive voice can be used to make word forms look right, but it isn't a good practice and the second sentence will look ugly and vague in Russian. |
Ah ok, well I'll have to take your word for it since I don't speak / read Russian 😄 |
We have part of the same thing in Swedish. When (for instance) the name of a post type is injected into a string, I don't know which grammatical gender I should use for it. Sometimes I overcome this by adding the extra word "post type" into my translation.
|
As noted above, just inserting a post type name into a generic string like A general best practice in WordPress is to avoid post type and taxonomy names in generic strings due to i18n concerns and structural differences in languages. See the previous discussions for reference:
To clarify a bit more, while both the post type name and the string itself can be translatable, this or any other generic string like that is not correctly translatable. It does not account for grammatical gender or declensions in other languages, so no matter how you translate it, the result is still incorrect. For example, in Russian, "Post" is feminine and "Product" is masculine, so "on this post" and "on this product" would require a different translation and there is simply no way to translate That is the case for many other languages too, and is the reason why WordPress core does not use generic strings for post type or taxonomy names, and offers an array of labels to be used instead. Searching for
Searching for
There might be more if some other strings don't have that comment. These will all need to be changed to have a different default string for hierarchical and non-hierarchical post types, similar to how WordPress core handles it, see get_post_type_labels().
For any custom post types, there should be a filter so that developers could change the strings based on the specific post type. Trying to account for any random post type in the translation is not feasible, for the reasons described above. |
Russian has different ends of words in different cases and translates phrases this way looks unnatural:
"Allow search engines to show this %s in search results?" - here we should have an accusative form
"Should search engines follow links on this %1$s?" - here we should have a prepositional form
I don't think it's possible to make it fit easily, and I propose to exclude mentioning the post type from these phrases.
The text was updated successfully, but these errors were encountered: