mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 15:18:58 +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...',
|
'no_filename'=> 'no filename given or selected via Browse...',
|
||||||
'not_writeable' => "Error: webserver is not allowed to write into '%s' !!!",
|
'not_writeable' => "Error: webserver is not allowed to write into '%s' !!!",
|
||||||
'exported' => "eTemplate '%s' written to '%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(
|
var $aligns = array(
|
||||||
'' => 'Left',
|
'' => 'Left',
|
||||||
@ -406,13 +407,21 @@
|
|||||||
}
|
}
|
||||||
elseif ($content['langfile'])
|
elseif ($content['langfile'])
|
||||||
{
|
{
|
||||||
$additional = array();
|
list($name) = explode('.',$content['name']);
|
||||||
if (substr($content['name'],0,9) == 'etemplate')
|
if (empty($name) || !@is_dir(PHPGW_SERVER_ROOT.'/'.$name))
|
||||||
{
|
{
|
||||||
$m = new editor(False);
|
$msg = $this->messages['need_name'];
|
||||||
$additional = $m->messages + $this->etemplate->types + $this->extensions + $this->aligns;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$additional = array();
|
||||||
|
if ($name == 'etemplate')
|
||||||
|
{
|
||||||
|
$m = new editor(False);
|
||||||
|
$additional = $m->messages + $this->etemplate->types + $this->extensions + $this->aligns;
|
||||||
|
}
|
||||||
|
$msg = $this->etemplate->writeLangFile($name,'en',$additional);
|
||||||
}
|
}
|
||||||
$msg = $this->etemplate->writeLangFile($content['name'],'en',$additional);
|
|
||||||
}
|
}
|
||||||
elseif ($content['export_xml'])
|
elseif ($content['export_xml'])
|
||||||
{
|
{
|
||||||
|
@ -431,7 +431,7 @@
|
|||||||
{
|
{
|
||||||
$arr[$key] = $this->compress_array($val);
|
$arr[$key] = $this->compress_array($val);
|
||||||
}
|
}
|
||||||
elseif ($val == '' || $val == '0')
|
elseif ($val == '')
|
||||||
{
|
{
|
||||||
unset($arr[$key]);
|
unset($arr[$key]);
|
||||||
}
|
}
|
||||||
@ -628,10 +628,14 @@
|
|||||||
{
|
{
|
||||||
while (list($col,$cell) = each($cols))
|
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))
|
while (list(,$str) = each($all))
|
||||||
{
|
{
|
||||||
if (strlen($str) > 1)
|
if (strlen($str) > 1 && $str[0] != '@')
|
||||||
{
|
{
|
||||||
$to_trans[strtolower($str)] = $str;
|
$to_trans[strtolower($str)] = $str;
|
||||||
}
|
}
|
||||||
@ -679,6 +683,10 @@
|
|||||||
}
|
}
|
||||||
list($app) = explode('.',$app);
|
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');
|
$solangfile = CreateObject('developer_tools.solangfile');
|
||||||
|
|
||||||
$langarr = $solangfile->load_app($app,$lang);
|
$langarr = $solangfile->load_app($app,$lang);
|
||||||
|
Loading…
Reference in New Issue
Block a user