[buddypress-trac] [BuddyPress Trac] #8821: Preventing ArgumentCountError when using sprintf/printf functions
buddypress-trac
noreply at wordpress.org
Wed Feb 15 08:12:01 UTC 2023
#8821: Preventing ArgumentCountError when using sprintf/printf functions
------------------------------------+----------------------
Reporter: imath | Owner: slaFFik
Type: defect (bug) | Status: new
Priority: normal | Milestone: 11.1.0
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: dev-feedback has-patch |
------------------------------------+----------------------
Changes (by prbot):
* keywords: dev-feedback => dev-feedback has-patch
Comment:
''This ticket was mentioned in
[https://github.com/buddypress/buddypress/pull/66 PR #66] on
[https://github.com/buddypress/buddypress/ buddypress/buddypress] by
[https://profiles.wordpress.org/imath/ @imath].''
In 11.0 we have removed 1 placeholder to 2 strings used to display the
activity action for published posts. Issues were raised about the fact
some polyglots team did not update corresponding translations leaving the
removed placeholder. As these two strings are used inside `sprintf()`
function it resulted fatal errors for the corresponding locales. We hope
improving the comment will avoid such mistakes. It is a temporary fix, the
right one would be to create a sanitization function wrapping `sprintf()`
to make sure expected placeholders are found into the translated string.
Although this kind of function should be made available by WordPress imho,
a quick check into some tickets reported upstream made us realize this
would not happen. We will handle it for our usage.
Trac ticket: https://buddypress.trac.wordpress.org/ticket/8821
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8821#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list