1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #9960: Creating a profile changes the language of Joplin (#10038)

This commit is contained in:
cagnusmarlsen 2024-03-05 23:39:23 +05:30 committed by GitHub
parent 9a6484c488
commit 5e4c35a18f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -747,8 +747,15 @@ export default class BaseApplication {
} }
if (Setting.value('firstStart')) { if (Setting.value('firstStart')) {
const locale = shim.detectAndSetLocale(Setting);
reg.logger().info(`First start: detected locale as ${locale}`); // detectAndSetLocale sets the locale to the system default locale.
// Not calling it when a new profile is created ensures that the
// the language set by the user is not overridden by the system
// default language.
if (!Setting.value('isSubProfile')) {
const locale = shim.detectAndSetLocale(Setting);
reg.logger().info(`First start: detected locale as ${locale}`);
}
Setting.skipDefaultMigrations(); Setting.skipDefaultMigrations();
if (Setting.value('env') === 'dev') { if (Setting.value('env') === 'dev') {