Github: #6581
JIssues: http://issues.joomla.org/tracker/joomla-cms/6581
This fixes the issue of some texts being interpreted as sprintf format.
%s %s %s,1,2,3
is a sprintf format and should become 1,2,3
But $50,000
isn't, and should stay the same.
It also fixes the strings NOT being interpreted as sprintf if the values are simple texts and not language strings (so not all uppercase).
Testing
Here are some fields you can put in an extension xml file (like in a plugin) to check the output of strings:
<field name="test1" type="note" label="1:%s 2:%s 3:%s'A'B'C => 1:A 2:B 3:C" description="1:%s 2:%s 3:%s,A,B,C" />
<field name="test2" type="note" label="JGLOBAL_LIST_ALIAS_NOTE'JYES'JNO => (Alias: Yes, Note: No)" description="JGLOBAL_LIST_ALIAS_NOTE,JYES,JNO" />
<field name="test3" type="note" label="JGLOBAL_LIST_ALIAS_NOTE'Yes'No => (Alias: Yes, Note: No)" description="JGLOBAL_LIST_ALIAS_NOTE,Yes,No" />
<field name="test4" type="note" label="Some text' with a comma (leave alone)" description="Some text, with a comma" />
<field name="test5" type="note" label="$50'000 (leave alone)" description="$50,000" />
In the label is the original string and the expected result. To prevent JText passing the originals in the label, I have used a '
instead of a comma. Just so you can see what is going on.
The actual result (string that is being interpreted) is in the description
attribute (so the not-bold text).
Result currently is:
After patch it is:
Looks good to me. Thanks @nonumber