1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-23 22:36:32 +02:00

Desktop: Fixes #6411: Locale was not being preserved when creating a new profile

This commit is contained in:
Laurent Cozic
2022-04-16 13:29:14 +01:00
parent 01ee178566
commit 845ac19f0d

View File

@@ -811,8 +811,12 @@ export default class BaseApplication {
appLogger.info(`Client ID: ${Setting.value('clientId')}`);
if (Setting.value('firstStart')) {
// If it's a sub-profile, the locale must come from the root
// profile.
if (!Setting.value('isSubProfile')) {
const locale = shim.detectAndSetLocale(Setting);
reg.logger().info(`First start: detected locale as ${locale}`);
}
Setting.skipDefaultMigrations();
@@ -825,9 +829,10 @@ export default class BaseApplication {
Setting.setValue('firstStart', 0);
} else {
Setting.applyDefaultMigrations();
setLocale(Setting.value('locale'));
}
setLocale(Setting.value('locale'));
if (Setting.value('env') === Env.Dev) {
// Setting.setValue('sync.10.path', 'https://api.joplincloud.com');
// Setting.setValue('sync.10.userContentPath', 'https://joplinusercontent.com');