mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Locales: More use of locale objects, Addressed failing tests
This commit is contained in:
@@ -12,6 +12,7 @@ use BookStack\Api\ApiToken;
|
||||
use BookStack\App\Model;
|
||||
use BookStack\App\Sluggable;
|
||||
use BookStack\Entities\Tools\SlugGenerator;
|
||||
use BookStack\Translation\LocaleDefinition;
|
||||
use BookStack\Translation\LocaleManager;
|
||||
use BookStack\Uploads\Image;
|
||||
use Carbon\Carbon;
|
||||
@@ -342,11 +343,11 @@ class User extends Model implements AuthenticatableContract, CanResetPasswordCon
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the system language for this user.
|
||||
* Get the locale for this user.
|
||||
*/
|
||||
public function getLanguage(): string
|
||||
public function getLocale(): LocaleDefinition
|
||||
{
|
||||
return app()->make(LocaleManager::class)->getForUser($this)->appLocale();
|
||||
return app()->make(LocaleManager::class)->getForUser($this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user