? Success

User tests: Successful: Unsuccessful:

avatar nonumber
nonumber
25 Mar 2015

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:

avatar nonumber nonumber - open - 25 Mar 2015
avatar nonumber nonumber - change - 25 Mar 2015
Title
Fixed issue with non-language strings with comma's being interpreted as ...
Fixed issue with non-language strings with comma's being interpreted as sprintf format
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2015
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 25 Mar 2015
The description was changed
Title
Fixed issue with non-language strings with comma's being interpreted as ...
Fixed issue with non-language strings with comma's being interpreted as sprintf format
Labels Added: ?
avatar nonumber nonumber - reference | - 25 Mar 15
avatar nonumber nonumber - close - 25 Mar 2015
avatar nonumber nonumber - change - 25 Mar 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-03-25 21:03:41
avatar nonumber nonumber - close - 25 Mar 2015
avatar nonumber nonumber - change - 25 Mar 2015
Status Closed New
avatar nonumber nonumber - reopen - 25 Mar 2015
avatar nonumber nonumber - reopen - 25 Mar 2015
avatar nonumber nonumber - change - 25 Mar 2015
The description was changed
avatar zero-24 zero-24 - change - 26 Mar 2015
Status New Pending
Easy No Yes
avatar zero-24 zero-24 - change - 27 Mar 2015
Category Language & Strings Libraries
avatar dongilbert
dongilbert - comment - 6 Apr 2015

:+1: Looks good to me. Thanks @nonumber

avatar zero-24 zero-24 - alter_testresult - 6 Apr 2015 - dongilbert: Tested successfully
avatar designbengel
designbengel - comment - 11 Jun 2015

@test great!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6581.

avatar designbengel designbengel - test_item - 11 Jun 2015 - Tested successfully
avatar zero-24 zero-24 - change - 11 Jun 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 11 Jun 2015

Based on the tests by @designbengel and @dongilbert I moving this here to RTC :smile: Thanks @nonumber


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6581.

avatar zero-24 zero-24 - change - 11 Jun 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 11 Jun 2015
Labels Added: ?
avatar nonumber
nonumber - comment - 12 Jun 2015

Ok, great :)

avatar zero-24 zero-24 - change - 2 Jul 2015
Milestone Added:
avatar zero-24 zero-24 - change - 2 Jul 2015
Milestone Added:
avatar mbabker mbabker - change - 11 Jul 2015
Status Ready to Commit Closed
Closed_Date 2015-03-25 21:03:41 2015-07-11 13:58:49
Closed_By mbabker
avatar mbabker mbabker - close - 11 Jul 2015
avatar zero-24 zero-24 - close - 11 Jul 2015
avatar mbabker mbabker - close - 11 Jul 2015
avatar mbabker
mbabker - comment - 11 Jul 2015

Merged to staging via b95031b

avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment