Skip to content

Commit 560bee1

Browse files
committed
Merge pull request phpbb#4284 from CHItA/ticket/14589
[ticket/14589] Add error messages for failable installer requirements * CHItA/ticket/14589: [ticket/14589] Fix grammatical errors in language strings [ticket/14589] Add error messages for failable installer requirements
2 parents 336f5b4 + 9722552 commit 560bee1

2 files changed

Lines changed: 19 additions & 11 deletions

File tree

phpBB/language/en/install.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,19 @@
9090
// Requirements translation
9191
$lang = array_merge($lang, array(
9292
// Filesystem requirements
93-
'FILE_NOT_EXISTS' => 'File not exists',
94-
'FILE_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to exist.',
95-
'FILE_NOT_WRITABLE' => 'File not writable',
96-
'FILE_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to be writable.',
97-
98-
'DIRECTORY_NOT_EXISTS' => 'Directory not exists',
99-
'DIRECTORY_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to exist.',
100-
'DIRECTORY_NOT_WRITABLE' => 'Directory not writable',
101-
'DIRECTORY_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to be writable.',
93+
'FILE_NOT_EXISTS' => 'File does not exist',
94+
'FILE_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to exist.',
95+
'FILE_NOT_EXISTS_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s file exist for a better forum user experience.',
96+
'FILE_NOT_WRITABLE' => 'File is not writable',
97+
'FILE_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to be writable.',
98+
'FILE_NOT_WRITABLE_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s file be writable for a better forum user experience.',
99+
100+
'DIRECTORY_NOT_EXISTS' => 'Directory does not exist',
101+
'DIRECTORY_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to exist.',
102+
'DIRECTORY_NOT_EXISTS_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s directory exist for a better forum user experience.',
103+
'DIRECTORY_NOT_WRITABLE' => 'Directory is not writable',
104+
'DIRECTORY_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to be writable.',
105+
'DIRECTORY_NOT_WRITABLE_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s directory be writable for a better forum user experience.',
102106

103107
// Server requirements
104108
'PHP_VERSION_REQD' => 'PHP version',

phpBB/phpbb/install/module/requirements/task/check_filesystem.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ protected function check_file($file, $failable = false)
177177
if (!($exists && $writable))
178178
{
179179
$title = ($exists) ? 'FILE_NOT_WRITABLE' : 'FILE_NOT_EXISTS';
180-
$description = array($title . '_EXPLAIN', $file);
180+
$lang_suffix = '_EXPLAIN';
181+
$lang_suffix .= ($failable) ? '_OPTIONAL' : '';
182+
$description = array($title . $lang_suffix, $file);
181183

182184
if ($failable)
183185
{
@@ -244,7 +246,9 @@ protected function check_dir($dir, $failable = false)
244246
if (!($exists && $writable))
245247
{
246248
$title = ($exists) ? 'DIRECTORY_NOT_WRITABLE' : 'DIRECTORY_NOT_EXISTS';
247-
$description = array($title . '_EXPLAIN', $dir);
249+
$lang_suffix = '_EXPLAIN';
250+
$lang_suffix .= ($failable) ? '_OPTIONAL' : '';
251+
$description = array($title . $lang_suffix, $dir);
248252

249253
if ($failable)
250254
{

0 commit comments

Comments
 (0)