forked from firefox-devtools/profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
l10n.js
24 lines (21 loc) · 920 Bytes
/
l10n.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// @flow
import type {
Selector,
L10nState,
Localization,
PseudoStrategy,
} from 'firefox-profiler/types';
export const getL10nState: Selector<L10nState> = (state) => state.l10n;
export const getLocalization: Selector<Localization> = (state) =>
getL10nState(state).localization;
export const getPrimaryLocale: Selector<string | null> = (state) =>
getL10nState(state).primaryLocale;
export const getDirection: Selector<'ltr' | 'rtl'> = (state) =>
getL10nState(state).direction;
export const getRequestedLocales: Selector<string[] | null> = (state) =>
getL10nState(state).requestedLocales;
export const getPseudoStrategy: Selector<PseudoStrategy> = (state) =>
getL10nState(state).pseudoStrategy;