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