diff options
author | thomascube <thomas@roundcube.net> | 2011-12-07 08:51:01 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-12-07 08:51:01 +0000 |
commit | 0706075d85e3a59e8a1f5ba2187701a278ecf88a (patch) | |
tree | c3f2aee94f6f2d4359fcadf3ef1dbd5f9d62ac94 /bin/exportgettext.sh | |
parent | 40c45e9de99186eda203a925c09424a3a8ec103c (diff) |
Fix newline handling in gettext export; add import script to read .po localization files
Diffstat (limited to 'bin/exportgettext.sh')
-rwxr-xr-x | bin/exportgettext.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/exportgettext.sh b/bin/exportgettext.sh index f59474ec0..9a935dab4 100755 --- a/bin/exportgettext.sh +++ b/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); } |