Prevent space before ellipsis when truncating
authorUltrasonicNXT <adamr_carter@btinternet.com>
Sun, 10 Nov 2013 08:55:10 +0000 (08:55 +0000)
committerBrian Wolff <bawolff+wn@gmail.com>
Fri, 15 Nov 2013 18:29:18 +0000 (14:29 -0400)
commit87fe16c445fb82262cd505ae73b6f202cf860164
tree8f26564ec67685daad1ecce782cf49a21b40b8ed
parent9135a720dfd51a3b311a2e6a882ac770be4b88ae
Prevent space before ellipsis when truncating

When truncating a string at a point where it contains a space (ie "hello
world" to 9 chars), the resultant string will have a space before the
ellipsis ("hello ..."). This is both gramatically incorrect and just looks
wrong, and is fixed by trimming the string before appending the ellipsis.

Change-Id: Iec86b17bfc8c50e4c1a96fd373861841fc57848d
languages/Language.php
tests/phpunit/languages/LanguageTest.php