From 9163cc28647e9936fe9c9e390871f9130d2bf40b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Bartus?= Date: Sun, 10 Apr 2016 10:30:15 +0200 Subject: [PATCH 1/2] [ticket/14589] Add error messages for failable installer requirements PHPBB3-14589 --- phpBB/language/en/install.php | 20 +++++++++++-------- .../requirements/task/check_filesystem.php | 8 ++++++-- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 9a727be649..738b8af648 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -90,15 +90,19 @@ $lang = array_merge($lang, array( // Requirements translation $lang = array_merge($lang, array( // Filesystem requirements - 'FILE_NOT_EXISTS' => 'File not exists', - 'FILE_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to exist.', - 'FILE_NOT_WRITABLE' => 'File not writable', - 'FILE_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to be writable.', + 'FILE_NOT_EXISTS' => 'File not exists', + 'FILE_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to exist.', + 'FILE_NOT_EXISTS_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s file exists for a better forum user experience.', + 'FILE_NOT_WRITABLE' => 'File not writable', + 'FILE_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to be writable.', + 'FILE_NOT_WRITABLE_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s file be writable for a better forum user experience.', - 'DIRECTORY_NOT_EXISTS' => 'Directory not exists', - 'DIRECTORY_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to exist.', - 'DIRECTORY_NOT_WRITABLE' => 'Directory not writable', - 'DIRECTORY_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to be writable.', + 'DIRECTORY_NOT_EXISTS' => 'Directory not exists', + 'DIRECTORY_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to exist.', + 'DIRECTORY_NOT_EXISTS_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s directory exists for a better forum user experience.', + 'DIRECTORY_NOT_WRITABLE' => 'Directory not writable', + 'DIRECTORY_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to be writable.', + 'DIRECTORY_NOT_WRITABLE_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s directory be writable for a better forum user experience.', // Server requirements 'PHP_VERSION_REQD' => 'PHP version', diff --git a/phpBB/phpbb/install/module/requirements/task/check_filesystem.php b/phpBB/phpbb/install/module/requirements/task/check_filesystem.php index 2aec3915e0..868af39433 100644 --- a/phpBB/phpbb/install/module/requirements/task/check_filesystem.php +++ b/phpBB/phpbb/install/module/requirements/task/check_filesystem.php @@ -177,7 +177,9 @@ class check_filesystem extends \phpbb\install\task_base if (!($exists && $writable)) { $title = ($exists) ? 'FILE_NOT_WRITABLE' : 'FILE_NOT_EXISTS'; - $description = array($title . '_EXPLAIN', $file); + $lang_suffix = '_EXPLAIN'; + $lang_suffix .= ($failable) ? '_OPTIONAL' : ''; + $description = array($title . $lang_suffix, $file); if ($failable) { @@ -244,7 +246,9 @@ class check_filesystem extends \phpbb\install\task_base if (!($exists && $writable)) { $title = ($exists) ? 'DIRECTORY_NOT_WRITABLE' : 'DIRECTORY_NOT_EXISTS'; - $description = array($title . '_EXPLAIN', $dir); + $lang_suffix = '_EXPLAIN'; + $lang_suffix .= ($failable) ? '_OPTIONAL' : ''; + $description = array($title . $lang_suffix, $dir); if ($failable) { From 972255247bce8ea547483e4a22ed75bf4f6c2f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Bartus?= Date: Mon, 11 Apr 2016 19:42:40 +0200 Subject: [PATCH 2/2] [ticket/14589] Fix grammatical errors in language strings PHPBB3-14589 --- phpBB/language/en/install.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php index 738b8af648..88cbaf1533 100644 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -90,17 +90,17 @@ $lang = array_merge($lang, array( // Requirements translation $lang = array_merge($lang, array( // Filesystem requirements - 'FILE_NOT_EXISTS' => 'File not exists', + 'FILE_NOT_EXISTS' => 'File does not exist', 'FILE_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to exist.', - 'FILE_NOT_EXISTS_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s file exists for a better forum user experience.', - 'FILE_NOT_WRITABLE' => 'File not writable', + 'FILE_NOT_EXISTS_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s file exist for a better forum user experience.', + 'FILE_NOT_WRITABLE' => 'File is not writable', 'FILE_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s file needs to be writable.', 'FILE_NOT_WRITABLE_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s file be writable for a better forum user experience.', - 'DIRECTORY_NOT_EXISTS' => 'Directory not exists', + 'DIRECTORY_NOT_EXISTS' => 'Directory does not exist', 'DIRECTORY_NOT_EXISTS_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to exist.', - 'DIRECTORY_NOT_EXISTS_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s directory exists for a better forum user experience.', - 'DIRECTORY_NOT_WRITABLE' => 'Directory not writable', + 'DIRECTORY_NOT_EXISTS_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s directory exist for a better forum user experience.', + 'DIRECTORY_NOT_WRITABLE' => 'Directory is not writable', 'DIRECTORY_NOT_WRITABLE_EXPLAIN' => 'To be able to install phpBB the %1$s directory needs to be writable.', 'DIRECTORY_NOT_WRITABLE_EXPLAIN_OPTIONAL' => 'It is recommended that the %1$s directory be writable for a better forum user experience.',