mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/14628] Supports translatable error messages in the CLI installer
PHPBB3-14628
This commit is contained in:
parent
ef226138c8
commit
1629e6aaf3
1 changed files with 6 additions and 5 deletions
|
@ -124,13 +124,14 @@ class cli_iohandler extends iohandler_base
|
||||||
public function add_error_message($error_title, $error_description = false)
|
public function add_error_message($error_title, $error_description = false)
|
||||||
{
|
{
|
||||||
$this->io->newLine();
|
$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 = $this->translate_message($error_title, $error_description);
|
||||||
$message_string = $message['title'] . (!empty($message['description']) ? "\n" . $message['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);
|
$this->io->error($message_string);
|
||||||
|
|
||||||
if ($this->progress_bar !== null)
|
if ($this->progress_bar !== null)
|
||||||
|
|
Loading…
Add table
Reference in a new issue