mirror of
https://github.com/flarum/framework.git
synced 2025-05-04 18:44:03 +08:00
Use correct directory in loadLanguagePackFrom API
This commit is contained in:
parent
94a62293eb
commit
8506d095db
@ -38,7 +38,7 @@ class ConfigureLocales
|
|||||||
{
|
{
|
||||||
$name = $title = basename($directory);
|
$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);
|
$json = json_decode(file_get_contents($manifest), true);
|
||||||
|
|
||||||
if (empty($json)) {
|
if (empty($json)) {
|
||||||
@ -55,7 +55,7 @@ class ConfigureLocales
|
|||||||
|
|
||||||
$this->locales->addLocale($locale, $title);
|
$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.");
|
throw new RuntimeException("Language pack $name must have a \"locale\" subdirectory.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user