You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Originally from: #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
The text was updated successfully, but these errors were encountered: