I add small enhancement in utils/i18n.php
I add code in function scan() before
$result[]= array('file'=>$_file,'string'=>$_line);
if ( strlen($_line)>1 )
{
// change first char ' to "
if ($_line[0]="'")
$_line[0] = '"';
// change last char ' to "
if ($_line[strlen($_line)-1]="'")
$_line[strlen($_line)-1] = '"';
// replace \' to '
$_line=str_replace("\'","'" ,$_line);
// replace " to \" in text but not first end last char "
// 1) copy only text
$_only_text=substr($_line,1, strlen($_line) -2);
//
$_only_text=str_replace('\"','"' ,$_only_text);
$_only_text=str_replace('"','\"' ,$_only_text);
$_line= $_line[0].$_only_text. $_line[strlen($_line)-1];
}
$result[]= array('file'=>$_file,'string'=>$_line);
This code fix:
-error when last and first char is '
-error when in string is \'
-error when in string is char "