Added string in ENG for all validation erros.

This commit is contained in:
Boris Gulay
2016-05-27 23:25:26 +03:00
parent f28fb5bb58
commit b10f3625c2
2 changed files with 25 additions and 2 deletions

View File

@@ -182,6 +182,8 @@ class ident_switch extends rcube_plugin
{ {
$rc = rcmail::get_instance(); $rc = rcmail::get_instance();
$this->add_texts('localization');
// Check field values // Check field values
$noErrors = false; $noErrors = false;
@@ -201,7 +203,7 @@ class ident_switch extends rcube_plugin
else else
{ {
if ($fPort && ($fPort <= 0 || $fPort > 65535)) if ($fPort && ($fPort <= 0 || $fPort > 65535))
$rc->output->show_message('err.port.num', 'error'); $rc->output->show_message('err.port.range', 'error');
else else
{ {
$fUser = self::ntrim(get_input_value('_ident_switch_form_username', RCUBE_INPUT_POST)); $fUser = self::ntrim(get_input_value('_ident_switch_form_username', RCUBE_INPUT_POST));
@@ -210,7 +212,7 @@ class ident_switch extends rcube_plugin
else else
{ {
if (!$fUser) if (!$fUser)
$rc->output->show_message('err.user.empty', 'error'); $rc->output->show_message('ident_switch.err.user.empty', 'error');
else else
{ {
$fDelim = self::ntrim(get_input_value('_ident_switch_form_delimiter', RCUBE_INPUT_POST)); $fDelim = self::ntrim(get_input_value('_ident_switch_form_delimiter', RCUBE_INPUT_POST));

View File

@@ -30,3 +30,24 @@ $labels['form.password'] = 'Password';
// Folder hierarchy delimiter // Folder hierarchy delimiter
$labels['form.delimiter'] = 'Folder hierarchy delimiter'; $labels['form.delimiter'] = 'Folder hierarchy delimiter';
// \'Username\' field in IMAP section cannot be empty.
$labels['err.user.empty'] = '\'Username\' field in IMAP section cannot be empty.';
// Value in \'Label\' field of IMAP section is too long (32 chars max).
$labels['err.label.long'] = 'Value in \'Label\' field of IMAP section is too long (32 chars max).';
// Value in \'Server host name\' field of IMAP section is too long (64 chars max).
$labels['err.host.long'] = 'Value in \'Server host name\' field of IMAP section is too long (64 chars max).';
// Value in \'Username\' field of IMAP section is too long (64 chars max).
$labels['err.user.long'] = 'Value in \'Username\' field of IMAP section is too long (64 chars max).';
// Value in \'Folder hierarchy delimiter\' field of IMAP section is too long (1 char max).
$labels['err.delim.long'] = 'Value in \'Folder hierarchy delimiter\' field of IMAP section is too long (1 char max).';
// Value in \'Port\' field of IMAP section must be a number.
$labels['err.port.num'] = 'Value in \'Port\' field of IMAP section must be a number.';
// Value in \'Port\' field of IMAP section must be between 1 and 65535.
$labels['err.port.rtange'] = 'Value in \'Port\' field of IMAP section must be between 1 and 65535.';