mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/17191] Update language file helper for new composer values
PHPBB3-17191
This commit is contained in:
parent
99fabe2eb8
commit
36ea0c1f2e
2 changed files with 8 additions and 4 deletions
|
@ -24,8 +24,8 @@
|
||||||
"local-name": "British English",
|
"local-name": "British English",
|
||||||
"phpbb-version": "4.0.0-a1-dev",
|
"phpbb-version": "4.0.0-a1-dev",
|
||||||
"direction": "ltr",
|
"direction": "ltr",
|
||||||
"user_lang": "en-gb",
|
"user-lang": "en-gb",
|
||||||
"plural_rule": "1",
|
"plural-rule": "1",
|
||||||
"recaptcha_lang": "en-GB"
|
"recaptcha-lang": "en-GB"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ class language_file_helper
|
||||||
*/
|
*/
|
||||||
protected function get_language_data_from_json(array $data) : array
|
protected function get_language_data_from_json(array $data) : array
|
||||||
{
|
{
|
||||||
if (!isset($data['extra']['language-iso']) || !isset($data['extra']['english-name']) || !isset($data['extra']['local-name']))
|
if (!isset($data['extra']['language-iso']) || !isset($data['extra']['english-name']) || !isset($data['extra']['local-name']) || !isset($data['extra']['direction']) || !isset($data['extra']['user-lang']) || !isset($data['extra']['plural-rule']) || !isset($data['extra']['recaptcha-lang']))
|
||||||
{
|
{
|
||||||
throw new DomainException('INVALID_LANGUAGE_PACK');
|
throw new DomainException('INVALID_LANGUAGE_PACK');
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,10 @@ class language_file_helper
|
||||||
'author' => implode(', ', $authors),
|
'author' => implode(', ', $authors),
|
||||||
'version' => $data['version'],
|
'version' => $data['version'],
|
||||||
'phpbb_version' => $data['extra']['phpbb-version'],
|
'phpbb_version' => $data['extra']['phpbb-version'],
|
||||||
|
'direction' => $data['extra']['direction'],
|
||||||
|
'user-lang' => $data['extra']['user-lang'],
|
||||||
|
'plural-rule' => $data['extra']['plural-rule'],
|
||||||
|
'recaptcha-lang'=> $data['extra']['recaptcha-lang'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue