Skip to content
Permalink
Browse files

[DDW-588] Runs prettier:format

  • Loading branch information...
MarcusHurney committed Mar 15, 2019
1 parent f8f3efc commit 509181ffcd02003f464ca04bba18343f7f1cc6c8
@@ -1,10 +1,9 @@
// @flow
export type Locales = {
english: string,
japanese: string
japanese: string,
};


export const LOCALES: Locales = {
english: 'en-US',
japanese: 'ja-JP',
@@ -3,6 +3,7 @@ import { MainIpcChannel } from './lib/MainIpcChannel';
import { DETECT_SYSTEM_LOCALE_CHANNEL } from '../../common/ipc/api';
import type { DetectSystemLocaleResponse } from '../../common/ipc/api';

export const detectSystemLocaleChannel: (
MainIpcChannel<void, DetectSystemLocaleResponse>
) = new MainIpcChannel(DETECT_SYSTEM_LOCALE_CHANNEL);
export const detectSystemLocaleChannel: MainIpcChannel<
void,
DetectSystemLocaleResponse
> = new MainIpcChannel(DETECT_SYSTEM_LOCALE_CHANNEL);
@@ -4,6 +4,8 @@ import { LOCALES } from '../../common/types/locales.types.js';

export const detectSystemLocale = (): string => {
const systemLocale = app.getLocale();
if (systemLocale === 'ja') { return LOCALES.japanese; }
if (systemLocale === 'ja') {
return LOCALES.japanese;
}
return LOCALES.english;
};
@@ -3,6 +3,7 @@ import { RendererIpcChannel } from './lib/RendererIpcChannel';
import { DETECT_SYSTEM_LOCALE_CHANNEL } from '../../../common/ipc/api';
import type { DetectSystemLocaleResponse } from '../../../common/ipc/api';

export const detectSystemLocaleChannel: (
RendererIpcChannel<DetectSystemLocaleResponse, void>
) = new RendererIpcChannel(DETECT_SYSTEM_LOCALE_CHANNEL);
export const detectSystemLocaleChannel: RendererIpcChannel<
DetectSystemLocaleResponse,
void
> = new RendererIpcChannel(DETECT_SYSTEM_LOCALE_CHANNEL);
@@ -184,9 +184,7 @@ export default class SettingsStore extends Store {
}

_getSystemLocale = async () => {
this._onReceiveSystemLocale(
await detectSystemLocaleChannel.request()
);
this._onReceiveSystemLocale(await detectSystemLocaleChannel.request());
};

_updateLocale = async ({ locale }: { locale: string }) => {

0 comments on commit 509181f

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.