Changeset 5558 in subversion


Ignore:
Timestamp:
Dec 7, 2011 3:51:01 AM (18 months ago)
Author:
thomasb
Message:

Fix newline handling in gettext export; add import script to read .po localization files

Location:
trunk/roundcubemail/bin
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/bin/exportgettext.sh

    r5537 r5558  
    88 | This file is part of the Roundcube Webmail client                     | 
    99 | Copyright (C) 2011, The Roundcube Dev Team                            | 
    10  | Licensed under the GNU GPLv3                                          | 
     10 | Licensed under the GNU General Public License                         | 
    1111 |                                                                       | 
    1212 | PURPOSE:                                                              | 
     
    188188{ 
    189189        $out = ""; 
    190         $lines = explode("\n", stripslashes($str)); 
    191         $suffix = count($lines) > 1 ? '\n' : ''; 
     190        $lines = explode("\n", wordwrap(stripslashes($str))); 
    192191        foreach ($lines as $line) 
    193                 $out .= '"' . addcslashes($line, '"') . $suffix . "\"\n"; 
     192                $out .= '"' . addcslashes($line, '"') . "\"\n"; 
    194193        return rtrim($out); 
    195194} 
Note: See TracChangeset for help on using the changeset viewer.