mirror of
https://github.com/directus/directus.git
synced 2026-01-23 15:18:08 -05:00
Use 'language' instead of 'locale' in the app
This commit is contained in:
@@ -10482,9 +10482,9 @@
|
||||
"group": null,
|
||||
"length": "32"
|
||||
},
|
||||
"locale": {
|
||||
"language": {
|
||||
"collection": "directus_users",
|
||||
"field": "locale",
|
||||
"field": "language",
|
||||
"datatype": "VARCHAR",
|
||||
"unique": false,
|
||||
"primary_key": false,
|
||||
|
||||
@@ -5639,7 +5639,7 @@
|
||||
},
|
||||
{
|
||||
"collection": "directus_users",
|
||||
"field": "locale",
|
||||
"field": "language",
|
||||
"datatype": "VARCHAR",
|
||||
"unique": false,
|
||||
"primary_key": false,
|
||||
@@ -5666,7 +5666,7 @@
|
||||
"validation": null,
|
||||
"group": null,
|
||||
"length": "8",
|
||||
"name": "Locale"
|
||||
"name": "Language"
|
||||
},
|
||||
{
|
||||
"collection": "directus_users",
|
||||
|
||||
@@ -57,7 +57,7 @@ export async function hydrate(stores = useStores()) {
|
||||
*/
|
||||
await userStore.hydrate();
|
||||
|
||||
setLanguage((userStore.state.currentUser?.locale as Language) || 'en-US');
|
||||
setLanguage((userStore.state.currentUser?.language as Language) || 'en-US');
|
||||
|
||||
await Promise.all(stores.filter(({ id }) => id !== 'userStore').map((store) => store.hydrate?.()));
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export type User = {
|
||||
role: Role;
|
||||
password_reset_token: string | null;
|
||||
timezone: string;
|
||||
locale: string;
|
||||
language: string;
|
||||
locale_options: null;
|
||||
avatar: null | Avatar;
|
||||
company: string | null;
|
||||
|
||||
Reference in New Issue
Block a user