summaryrefslogtreecommitdiff
path: root/bin/exportgettext.sh
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-12-31 15:21:20 +0000
committerthomascube <thomas@roundcube.net>2011-12-31 15:21:20 +0000
commit5b5ed46815b48590d96ee0a2ec1e6b39ca9c413d (patch)
tree704798c705ce8eff21253bc49b1d27064bda7abd /bin/exportgettext.sh
parentb9441a1632638c23c118867543f6477cecb8134d (diff)
Fix export of multiline texts
Diffstat (limited to 'bin/exportgettext.sh')
-rwxr-xr-xbin/exportgettext.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/exportgettext.sh b/bin/exportgettext.sh
index b1649ef0d..67fa7ad10 100755
--- a/bin/exportgettext.sh
+++ b/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);
}