1 gettext.inc _locale_import_shorten_comments($comment)

Generates a short, one-string version of the passed comment array.

Parameters

$comment: An array of strings containing a comment.

Return value

Short one-string version of the comment.:

Related topics

File

core/includes/gettext.inc, line 840
Gettext parsing and generating API.

Code

function _locale_import_shorten_comments($comment) {
  $comm = '';
  while (count($comment)) {
    $test = $comm . substr(array_shift($comment), 1) . ', ';
    if (strlen($comm) < 130) {
      $comm = $test;
    }
    else {
      break;
    }
  }
  return trim(substr($comm, 0, -2));
}