mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-19 07:56:38 +02:00
BUGFIX i18n::include_by_locale() assumes a themes directory always exists and causes error if that's not the case. Some projects don't require any themes, like pure applications.
This commit is contained in:
parent
83ad8d48a9
commit
7805e3e6d9
@ -1872,6 +1872,7 @@ class i18n extends Object {
|
||||
|
||||
// Load translations from themes
|
||||
$themesBase = $base . '/themes';
|
||||
if(is_dir($themesBase)) {
|
||||
foreach(scandir($themesBase) as $theme) {
|
||||
if(
|
||||
strpos($theme, SSViewer::current_theme()) === 0
|
||||
@ -1881,6 +1882,7 @@ class i18n extends Object {
|
||||
else include_once($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Finally, load any translations from registered plugins
|
||||
if ($load_plugins) self::plugins_load($locale);
|
||||
|
Loading…
Reference in New Issue
Block a user