recurser/jquery-i18n — pull request #5 by eikes (2012-02-15 13:16:17+00:00)
Title: Fix incorrect behavior if a string that begins with %s is passed to passed to printf

Example:

$.i18n.printf("%s and %s are fun", ["foo", "bar"]);

Before:

"s and foo are funbar are fun"

After:

"foo and bar are fun"

Reason:

In line 121 this test returns true because the lastIndexOf returns -1 because there is no %s in the empty string and this value matches its length (0) minus 1:

tS[i].lastIndexOf('%') == tS[i].length-1