diff --git a/phpBB/includes/acp/acp_storage.php b/phpBB/includes/acp/acp_storage.php index a31bb8a97a..393a5b5d76 100644 --- a/phpBB/includes/acp/acp_storage.php +++ b/phpBB/includes/acp/acp_storage.php @@ -215,6 +215,9 @@ class acp_storage foreach ($new_options as $def_k => $def_v) { + $provider = $this->provider_collection->get_by_class($this->get_new_provider($storage_name)); + $def_title = $this->lang->lang('STORAGE_ADAPTER_' . strtoupper($provider->get_name()) . '_OPTION_' . strtoupper($def_k)); + $value = $this->get_new_def($storage_name, $def_k); switch ($def_v['type']) @@ -222,21 +225,21 @@ class acp_storage case 'email': if (!filter_var($value, FILTER_VALIDATE_EMAIL)) { - $messages[] = $this->lang->lang('STORAGE_FORM_TYPE_EMAIL_INCORRECT_FORMAT'); + $messages[] = $this->lang->lang('STORAGE_FORM_TYPE_EMAIL_INCORRECT_FORMAT', $def_title, $storage_title); } case 'text': case 'password': $maxlength = isset($def_v['maxlength']) ? $def_v['maxlength'] : 255; if (strlen($value) > $maxlength) { - $messages[] = $this->lang->lang('STORAGE_FORM_TYPE_TEXT_TOO_LONG'); + $messages[] = $this->lang->lang('STORAGE_FORM_TYPE_TEXT_TOO_LONG', $def_title, $storage_title); } break; case 'radio': case 'select': if (!in_array($value, array_values($def_v['options']))) { - $messages[] = $this->lang->lang('STORAGE_FORM_TYPE_SELECT_NOT_AVAILABLE'); + $messages[] = $this->lang->lang('STORAGE_FORM_TYPE_SELECT_NOT_AVAILABLE', $def_title, $storage_title); } break; } diff --git a/phpBB/language/en/acp/storage.php b/phpBB/language/en/acp/storage.php index 1f721cf5f2..1241cee9c9 100644 --- a/phpBB/language/en/acp/storage.php +++ b/phpBB/language/en/acp/storage.php @@ -54,12 +54,11 @@ $lang = array_merge($lang, array( 'STORAGE_ADAPTER_LOCAL_OPTION_PATH' => 'Path', // Form validation - // Todo" more descriptive form errors showing storage name and field name 'STORAGE_UPDATE_SUCCESSFUL' => 'All storages were successfuly updated.', 'STORAGE_NO_CHANGES' => 'No changes has been made.', - 'STORAGE_PROVIDER_NOT_EXISTS' => 'Provider selected for %s dont exist.', + 'STORAGE_PROVIDER_NOT_EXISTS' => 'Provider selected for %s doesn\'t exist.', 'STORAGE_PROVIDER_NOT_AVAILABLE' => 'Provider selected for %s is not available.', - 'STORAGE_FORM_TYPE_EMAIL_INCORRECT_FORMAT' => 'Incorrect email', - 'STORAGE_FORM_TYPE_TEXT_TOO_LONG' => 'Text is too long', - 'STORAGE_FORM_TYPE_SELECT_NOT_AVAILABLE' => 'Selected value is not available', + 'STORAGE_FORM_TYPE_EMAIL_INCORRECT_FORMAT' => 'Incorrect email for %s of %s.', + 'STORAGE_FORM_TYPE_TEXT_TOO_LONG' => 'Text is too long for %s of %s.', + 'STORAGE_FORM_TYPE_SELECT_NOT_AVAILABLE' => 'Selected value is not available for %s of %s.', ));