mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 15:36:26 +08:00
Use correct directory in loadLanguagePackFrom API
This commit is contained in:
parent
90437016ea
commit
1f3cdd5573
@ -38,7 +38,7 @@ class ConfigureLocales
|
||||
{
|
||||
$name = $title = basename($directory);
|
||||
|
||||
if (file_exists($manifest = __DIR__.'/composer.json')) {
|
||||
if (file_exists($manifest = $directory.'/composer.json')) {
|
||||
$json = json_decode(file_get_contents($manifest), true);
|
||||
|
||||
if (empty($json)) {
|
||||
@ -55,7 +55,7 @@ class ConfigureLocales
|
||||
|
||||
$this->locales->addLocale($locale, $title);
|
||||
|
||||
if (! is_dir($localeDir = __DIR__.'/locale')) {
|
||||
if (! is_dir($localeDir = $directory.'/locale')) {
|
||||
throw new RuntimeException("Language pack $name must have a \"locale\" subdirectory.");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user