mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
added more error-messages and changed soetemplate::toTranslate to not write messages starting with '@' and do write extra-line of selection in options
This commit is contained in:
parent
84ef2380ee
commit
8a541d29e8
@ -29,7 +29,8 @@
|
||||
'no_filename'=> 'no filename given or selected via Browse...',
|
||||
'not_writeable' => "Error: webserver is not allowed to write into '%s' !!!",
|
||||
'exported' => "eTemplate '%s' written to '%s'",
|
||||
'newer_version' => "newer version '%s' exists !!!"
|
||||
'newer_version' => "newer version '%s' exists !!!",
|
||||
'need_name' => 'Application name needed to write a langfile !!!'
|
||||
);
|
||||
var $aligns = array(
|
||||
'' => 'Left',
|
||||
@ -405,14 +406,22 @@
|
||||
return;
|
||||
}
|
||||
elseif ($content['langfile'])
|
||||
{
|
||||
list($name) = explode('.',$content['name']);
|
||||
if (empty($name) || !@is_dir(PHPGW_SERVER_ROOT.'/'.$name))
|
||||
{
|
||||
$msg = $this->messages['need_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$additional = array();
|
||||
if (substr($content['name'],0,9) == 'etemplate')
|
||||
if ($name == 'etemplate')
|
||||
{
|
||||
$m = new editor(False);
|
||||
$additional = $m->messages + $this->etemplate->types + $this->extensions + $this->aligns;
|
||||
}
|
||||
$msg = $this->etemplate->writeLangFile($content['name'],'en',$additional);
|
||||
$msg = $this->etemplate->writeLangFile($name,'en',$additional);
|
||||
}
|
||||
}
|
||||
elseif ($content['export_xml'])
|
||||
{
|
||||
|
@ -431,7 +431,7 @@
|
||||
{
|
||||
$arr[$key] = $this->compress_array($val);
|
||||
}
|
||||
elseif ($val == '' || $val == '0')
|
||||
elseif ($val == '')
|
||||
{
|
||||
unset($arr[$key]);
|
||||
}
|
||||
@ -628,10 +628,14 @@
|
||||
{
|
||||
while (list($col,$cell) = each($cols))
|
||||
{
|
||||
$all = explode('|',$cell['help'].($cell['type'] != 'image'?'|'.$cell['label']:''));
|
||||
list($extra_row) = explode(',',$cell['size']);
|
||||
if (substr($cell['type'],0,6) != 'select' || !empty($extra_row) && $extra_row > 0)
|
||||
$extra_row = '';
|
||||
$all = explode('|',$cell['help'].($cell['type'] != 'image'?'|'.$cell['label']:'').
|
||||
(!empty($extra_row) ? '|'.$extra_row : ''));
|
||||
while (list(,$str) = each($all))
|
||||
{
|
||||
if (strlen($str) > 1)
|
||||
if (strlen($str) > 1 && $str[0] != '@')
|
||||
{
|
||||
$to_trans[strtolower($str)] = $str;
|
||||
}
|
||||
@ -679,6 +683,10 @@
|
||||
}
|
||||
list($app) = explode('.',$app);
|
||||
|
||||
if (!file_exists(PHPGW_SERVER_ROOT.'/developer_tools/inc/class.solangfile.inc.php'))
|
||||
{
|
||||
return 'Error: app developer-tools not installed !!!';
|
||||
}
|
||||
$solangfile = CreateObject('developer_tools.solangfile');
|
||||
|
||||
$langarr = $solangfile->load_app($app,$lang);
|
||||
|
Loading…
Reference in New Issue
Block a user