1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 07:35:29 +02:00

Merge pull request #4315 from Nicofuma/ticket/14628

[ticket/14628] Supports translatable error messages in the CLI installer
This commit is contained in:
Marc Alexander 2016-05-16 14:05:24 +02:00
commit 90cefcf0f4

View File

@ -124,13 +124,14 @@ class cli_iohandler extends iohandler_base
public function add_error_message($error_title, $error_description = false)
{
$this->io->newLine();
if (strpos($error_title, '<br />') !== false)
{
$error_title = strip_tags(str_replace('<br />', "\n", $error_title));
}
$message = $this->translate_message($error_title, $error_description);
$message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['description'] : '');
if (strpos($message_string, '<br />') !== false)
{
$message_string = strip_tags(str_replace('<br />', "\n", $message_string));
}
$this->io->error($message_string);
if ($this->progress_bar !== null)