-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Raymond recently added an 'ellipsis-separator' message to core (which
I've changed to simply 'ellipsis') defaulting to the Unicode ellipsis
character "…", which is so far only used in the Lucene search plugin
when building text snippets.
I took a quick look around at calls to $*lang->truncate() and found that
nearly all of them pass an explicit '...' $ellipsis parameter,
overriding the default which is to do a straight truncation at the cutoff.
[ Fun fact: "..." (three ASCII full-stops) and "…" (Unicode ellipsis)
both take 3 bytes in UTF-8! :D ]
Is there any objection to changing Language::truncate() to default to
using the language-appropriate 'ellipsis' message (content message when
calling on $wgContLang, UI message when calling on $wgLang)?
This would certainly be simpler than adding wfMsg() calls on all of
them. :) Callers really wanting straight truncation without a pretty
ellipsis could still pass '' explicitly.
One downside is that extensions using the new call format assuming the
ellipsis as default would not get an ellipsis when used on older
MediaWiki versions. (Boo-hoo!)
- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAklb3LEACgkQwRnhpk1wk473iACfcTON8Ae8LATR8Z+vZ6qAxRWO
h/cAoJH6mU1opFnYPzjstNyp6bDBv/3I
=l1E/
-----END PGP SIGNATURE-----