JSCHEMAORG_FIELD_COMPONENT_SECTIONS_TEXT="%2$s"
Surely we don't need meaningless strings like this.
Labels |
Added:
No Code Attached Yet
|
go for the latter or we swap one useless string for another useless string
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-02-23 21:00:28 |
Closed_By | ⇒ | brianteeman |
The only place where that string is used is here: https://github.com/joomla/joomla-cms/blob/5.0-dev/libraries/src/Form/Field/SchemaorgComponentSectionsField.php#L52
As one can see, the language string
JSCHEMAORG_FIELD_COMPONENT_SECTIONS_TEXT
contains only one positional parameter, but the sprintf is called with 2 parameters. This is definitely wrong.The PHP code mentioned above was obviously copied from here: https://github.com/joomla/joomla-cms/blob/5.0-dev/libraries/src/Form/Field/WorkflowComponentSectionsField.php#L62
The corresponding language string is
JWORKFLOW_FIELD_COMPONENT_SECTIONS_TEXT="%1$s: %2$s"
.So either we fix the string
JSCHEMAORG_FIELD_COMPONENT_SECTIONS_TEXT
to be like the one for workflows, or we fix the call to it so it uses only one parameter. But in the latter case it would not need theJSCHEMAORG_FIELD_COMPONENT_SECTIONS_TEXT
string at all.