Add support for secondary placeholders for singular and plural specification in label autofill
Originally from: https://github.com/WebDevStudios/custom-post-type-ui/issues/920
When translating auto-populated string values, we want to add support for returning either {{singular}} or {{plural}} instead of %s for placeholders. PHP won't throw a fit if no %s placeholder is returned, with the replacement value still provided. It would if the replacement value wasn't provided.
So in our javascript, we need to amend the section linked below, to first check for {{singular}} or {{plural}} first and if either of those exist, replace appropriately OTHERWISE just use what we have now with checking the if ( 'plural' === plurality ) { etc.
Make sure the description/helper text reflects the availability for these placeholders.
https://github.com/WebDevStudios/custom-post-type-ui/blob/1.13.4/src/js/cptui-scripts.js#L259-L274
@wiliamjk just to confirm, this is also going to be needed for taxonomies, correct?
First pass at this and I think it will probably handle all the needed parts.
custom-post-type-ui-singular-plural.zip
@wiliamjk would love to have you help confirm that this handles everything in a way that satisfies the original issue.
@wiliamjk just to confirm, this is also going to be needed for taxonomies, correct?
Yes definitely!