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:
commit
90cefcf0f4
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user