From 0706075d85e3a59e8a1f5ba2187701a278ecf88a Mon Sep 17 00:00:00 2001 From: thomascube Date: Wed, 7 Dec 2011 08:51:01 +0000 Subject: Fix newline handling in gettext export; add import script to read .po localization files --- bin/exportgettext.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bin/exportgettext.sh') 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); } -- cgit v1.2.3