Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a44b84f

Browse files
author
Alberto Iannaccone
authored
set the current language on the localization provider (#957)
1 parent a3640cf commit a44b84f

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

‎arduino-ide-extension/src/browser/dialogs/settings/settings.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@ export class SettingsService {
278278
// after saving all the settings, if we need to change the language we need to perform a reload
279279
// Only reload if the language differs from the current locale. `nls.locale === undefined` signals english as well
280280
if (
281-
currentLanguage !== nls.locale &&
282-
!(currentLanguage === 'en' && nls.locale === undefined)
281+
currentLanguage !== (await this.localizationProvider.getCurrentLanguage())
283282
) {
283+
await this.localizationProvider.setCurrentLanguage(currentLanguage);
284284
if (currentLanguage === 'en') {
285285
window.localStorage.removeItem(nls.localeId);
286286
} else {

‎arduino-ide-extension/src/node/arduino-daemon-impl.ts‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { Event, Emitter } from '@theia/core/lib/common/event';
1212
import { environment } from '@theia/application-package/lib/environment';
1313
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
1414
import { BackendApplicationContribution } from '@theia/core/lib/node/backend-application';
15-
import { LocalizationProvider } from '@theia/core/lib/node/i18n/localization-provider';
1615
import { ArduinoDaemon, NotificationServiceServer } from '../common/protocol';
1716
import { DaemonLog } from './daemon-log';
1817
import { CLI_CONFIG } from './cli-config';
@@ -32,9 +31,6 @@ export class ArduinoDaemonImpl
3231
@inject(NotificationServiceServer)
3332
protected readonly notificationService: NotificationServiceServer;
3433

35-
@inject(LocalizationProvider)
36-
protected readonly localizationProvider: LocalizationProvider;
37-
3834
protected readonly toDispose = new DisposableCollection();
3935
protected readonly onDaemonStartedEmitter = new Emitter<void>();
4036
protected readonly onDaemonStoppedEmitter = new Emitter<void>();

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /