Error checking in i18n::include_by_class shouldn't complain if mysite/lang doesn't exist - only if a module doesn't have internationalisation options.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47834 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-01-10 03:34:46 +00:00
parent d3b146167c
commit 2619c6fac1

View File

@ -1260,7 +1260,10 @@ class i18n extends Controller {
self::set_locale('en_US');
self::include_by_class($class);
} else {
user_error("i18n::include_by_class: Locale file $file should exist", E_USER_WARNING);
// Throw an error if the given module doesn't have translations
if($module != project()) {
user_error("i18n::include_by_class: Locale file $file should exist", E_USER_WARNING);
}
}
}