summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/locale.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/locale.inc b/includes/locale.inc
index d660e0454..f4c11dcc4 100644
--- a/includes/locale.inc
+++ b/includes/locale.inc
@@ -658,8 +658,14 @@ function _locale_import_append_plural($entry, $key) {
*/
function _locale_import_shorten_comments($comment) {
$comm = '';
- while(strlen($comm) < 128 && count($comment)) {
- $comm .= substr(array_shift($comment), 1) .', ';
+ while (count($comment)) {
+ $test = $comm . substr(array_shift($comment), 1) .', ';
+ if (strlen($comm) < 130) {
+ $comm = $test;
+ }
+ else {
+ break;
+ }
}
return substr($comm, 0, -2);
}