summaryrefslogtreecommitdiff
path: root/roundcubemail/bin/exportgettext.sh
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-07 08:51:01 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-12-07 08:51:01 +0000
commit6ed8cc03973eb29bc59416689758d37d3e9af2a4 (patch)
treea8780cba13968791582cb693fb82eab4d0c8d042 /roundcubemail/bin/exportgettext.sh
parent4966fc7f22a28e2eb0de256bb44613f0e580a111 (diff)
Fix newline handling in gettext export; add import script to read .po localization files
git-svn-id: https://svn.roundcube.net/trunk@5558 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/bin/exportgettext.sh')
-rwxr-xr-xroundcubemail/bin/exportgettext.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/roundcubemail/bin/exportgettext.sh b/roundcubemail/bin/exportgettext.sh
index f59474ec0..9a935dab4 100755
--- a/roundcubemail/bin/exportgettext.sh
+++ b/roundcubemail/bin/exportgettext.sh
@@ -7,7 +7,7 @@
| |
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2011, The Roundcube Dev Team |
- | Licensed under the GNU GPLv3 |
+ | Licensed under the GNU General Public License |
| |
| PURPOSE: |
| Export PHP-based localization files to PO files for gettext |
@@ -187,10 +187,9 @@ EOF;
function gettext_quote($str)
{
$out = "";
- $lines = explode("\n", stripslashes($str));
- $suffix = count($lines) > 1 ? '\n' : '';
+ $lines = explode("\n", wordwrap(stripslashes($str)));
foreach ($lines as $line)
- $out .= '"' . addcslashes($line, '"') . $suffix . "\"\n";
+ $out .= '"' . addcslashes($line, '"') . "\"\n";
return rtrim($out);
}