Skip to content
Browse files

Fix export of multiline texts

  • Loading branch information...
1 parent b9441a1 commit 5b5ed46815b48590d96ee0a2ec1e6b39ca9c413d @thomascube thomascube committed Dec 31, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 bin/exportgettext.sh
View
5 bin/exportgettext.sh
@@ -226,8 +226,9 @@ function gettext_quote($str)
{
$out = "";
$lines = explode("\n", wordwrap(stripslashes($str)));
- foreach ($lines as $line)
- $out .= '"' . addcslashes($line, '"') . "\"\n";
+ $last = count($lines) - 1;
+ foreach ($lines as $i => $line)
+ $out .= '"' . addcslashes($line, '"') . ($i < $last ? ' ' : '') . "\"\n";
return rtrim($out);
}

0 comments on commit 5b5ed46

Please sign in to comment.
Something went wrong with that request. Please try again.