mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 05:46:00 +00:00
fix(localization): incorrect locale when first entering (#3968)
This commit is contained in:
parent
d46dc75125
commit
a82e8a1ed6
@ -119,7 +119,7 @@ export class LocalizationManagementPlugin extends Plugin {
|
||||
await next();
|
||||
const { resourceName, actionName } = ctx.action.params;
|
||||
if (resourceName === 'app' && actionName === 'getLang') {
|
||||
const custom = await this.resources.getResources(ctx.get('X-Locale') || 'en-US');
|
||||
const custom = await this.resources.getResources(ctx.body.lang || 'en-US');
|
||||
const appLang = ctx.body;
|
||||
const resources = { ...appLang.resources };
|
||||
Object.keys(custom).forEach((key) => {
|
||||
|
Loading…
Reference in New Issue
Block a user