-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add check for existence of en language pack #108
base: master
Are you sure you want to change the base?
Conversation
@@ -79,6 +79,11 @@ public function validateDirectory(array $files) | |||
} | |||
} | |||
|
|||
if (!empty($langs) && !array_key_exists('en', $langs)) | |||
{ | |||
$this->output->addMessage(OutputInterface::FATAL, sprintf("English language pack is missing")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be:
$this->output->addMessage(OutputInterface::FATAL, 'English language pack is missing');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's just a formality, and double quotes are already used in this file in lines 92 and 100 (numbering with my PR), so what
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're calling the sprintf
function for no reason, plus with double quotes, just adding extra processing that's not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it also should be a error instead of a fatal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iMattPro: Sorry, I didn't see that you removed the sprintf command. That is easily fixed.
@paul999: If an extension doesn't have a en language pack (English is the fallback language for every situation where a language key could not be found in the chosen language) then phpBB will terminate with a fatal error. This is a good enough reason to make it not an error but a fatal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sprintf command has been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
Currently EPV does not check whether an extension has an English language pack, since English is the default and fallback language a missing "en" language pack should throw an error.
This PR adds check to do exactly that