summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4ea697b)
raw | patch | inline | side by side (parent: 4ea697b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Mar 2007 10:00:20 +0000 (10:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Mar 2007 10:00:20 +0000 (10:00 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5858 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_semantics.inc | patch | blob | history |
index da6f6998b5eb57b4ec00ef393114e0adcfd71885..77b27ccacbd5d9397e04074eca33c39b6beac538 100644 (file)
global $requires_;
if (!in_array('"relational"', $requires_))
{
- $this->message = 'missing require for match-type '. $text;
+ $this->message = sprintf(_("Missing require statement for '%s' object."), $text);
return false;
}
global $requires_;
if (!in_array('"subaddress"', $requires_))
{
- $this->message = 'missing require for tag '. $text;
+ $this->message = sprintf(_("Missing require statement for '%s' object."), $text);
return false;
}
}
$this->matchType_ == ':count' &&
$this->comparator_ != '"i;ascii-numeric"')
{
- $this->message = 'match-type :count needs comparator i;ascii-numeric';
+ $this->message = sprintf(_("Match type '%s' needs comparator '%s'."),":count","i;ascii-numeric");
return false;
}
return true;
// Check if command expects any arguments
if (!isset($this->s_['arguments']))
{
- $this->message = $id .' where semicolon expected';
+ $this->message = sprintf(_("Unexpected %s where semicolon expected"),$id);
return false;
}
// Is the argument required
if ($arg['occurrences'] != '?' && $arg['occurrences'] != '*')
{
- $this->message = $id .' where '. $arg['class'] .' expected';
+ $this->message = sprintf(_("Unexpected '%s' where '%s' expected"),$id,$arg['class']);
return false;
}
array_shift($this->s_['arguments']);
}
- $this->message = 'unexpected '. $id;
+ $this->message = sprintf(_("Unexpected '%s'."),$id);
return false;
}
{
if (!$this->validClass_('string', 'string'))
{
- $this->message = 'line '. $line .': '. $this->message;
+ $this->message = sprintf(_("Error in line %s"),$line).": ". $this->message;
return false;
}
else if (!isset($this->s_['arguments'][0]['list']))
{
- $this->message = 'line '. $line .': '. 'left bracket where '. $this->s_['arguments'][0]['class'] .' expected';
+ $this->message = sprintf(_("Error in line %s left bracket where '%s' expected"),$line,$this->s_['arguments'][0]['class']);
return false;
}
if (isset($this->s_['requires']) &&
!in_array('"'.$this->s_['requires'].'"', $requires_))
{
- $this->message = 'line '. $line .': missing require for '. $this->command_;
+ $this->message = sprintf(_("Error in line %s"),$line)." :".sprintf(_("Missing require statement for '%s' object."), $this->command_);
return false;
}
// Make sure the argument has a valid class
if (!$this->validClass_($class, $name))
{
- $this->message = 'line '. $line .': '. $this->message;
+ $this->message = sprintf(_("Error in line %s"),$line).' : '. $this->message;
return false;
}
if (isset($val['requires']) &&
!in_array('"'.$val['requires'].'"', $requires_))
{
- $this->message = 'line '. $line .': missing require for '. $val['name'] .' '. $text;
+ $this->message = sprintf(_("Error in line %s"),$line)." :".sprintf(_("Missing require statement for '%s' object."), $val['name']);
return false;
}
}
else if ($val['occurrences'] == '0')
{
- $this->message = 'line '. $line .': too many '. $val['name'] .' '. $class .'s near '. $text;
+ $this->message = sprintf(_("Error in line %s too many %s near %s."),$line,$class,$text);
return false;
}
if (isset($val['call']) && !call_user_func(array(&$this, $val['call']), $text) ||
isset($arg['call']) && !call_user_func(array(&$this, $arg['call']), $text))
{
- $this->message = 'line '. $line .': '. $this->message;
+ $this->message = sprintf(_("Error in line %s"),$line).' : '. $this->message;
return false;
}
}
}
- $this->message = 'line '. $line .': unexpected '. $name;
+ $this->message = sprintf(_("Error in line %s unexpected %s."),$line,$name);
return false;
}
{
if ($arg['occurrences'] == '+' || $arg['occurrences'] == '1')
{
- $this->message = 'line '. $line .': '. $class .' '. $text .' where '. $arg['class'] .' expected';
+ $this->message = sprintf(_("Error in line %s unexpected %s where %s expected."),$line,$class .' '. $text,$arg['class']);
return false;
}
}