mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Localization Framework
This commit is contained in:
parent
99ccaab6a6
commit
729a876fc7
23 changed files with 811 additions and 32 deletions
48
frontend/src/Store/Actions/Settings/languages.js
Normal file
48
frontend/src/Store/Actions/Settings/languages.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
import createFetchHandler from 'Store/Actions/Creators/createFetchHandler';
|
||||
import { createThunk } from 'Store/thunks';
|
||||
|
||||
//
|
||||
// Variables
|
||||
|
||||
const section = 'settings.languages';
|
||||
|
||||
//
|
||||
// Actions Types
|
||||
|
||||
export const FETCH_LANGUAGES = 'settings/languages/fetchLanguages';
|
||||
|
||||
//
|
||||
// Action Creators
|
||||
|
||||
export const fetchLanguages = createThunk(FETCH_LANGUAGES);
|
||||
|
||||
//
|
||||
// Details
|
||||
|
||||
export default {
|
||||
|
||||
//
|
||||
// State
|
||||
|
||||
defaultState: {
|
||||
isFetching: false,
|
||||
isPopulated: false,
|
||||
error: null,
|
||||
items: []
|
||||
},
|
||||
|
||||
//
|
||||
// Action Handlers
|
||||
|
||||
actionHandlers: {
|
||||
[FETCH_LANGUAGES]: createFetchHandler(section, '/language')
|
||||
},
|
||||
|
||||
//
|
||||
// Reducers
|
||||
|
||||
reducers: {
|
||||
|
||||
}
|
||||
|
||||
};
|
|
@ -9,6 +9,7 @@ import importListExclusions from './Settings/importListExclusions';
|
|||
import importLists from './Settings/importLists';
|
||||
import indexerOptions from './Settings/indexerOptions';
|
||||
import indexers from './Settings/indexers';
|
||||
import languages from './Settings/languages';
|
||||
import mediaManagement from './Settings/mediaManagement';
|
||||
import metadata from './Settings/metadata';
|
||||
import metadataProfiles from './Settings/metadataProfiles';
|
||||
|
@ -31,6 +32,7 @@ export * from './Settings/importLists';
|
|||
export * from './Settings/importListExclusions';
|
||||
export * from './Settings/indexerOptions';
|
||||
export * from './Settings/indexers';
|
||||
export * from './Settings/languages';
|
||||
export * from './Settings/metadataProfiles';
|
||||
export * from './Settings/mediaManagement';
|
||||
export * from './Settings/metadata';
|
||||
|
@ -64,6 +66,7 @@ export const defaultState = {
|
|||
indexers: indexers.defaultState,
|
||||
importLists: importLists.defaultState,
|
||||
importListExclusions: importListExclusions.defaultState,
|
||||
languages: languages.defaultState,
|
||||
metadataProfiles: metadataProfiles.defaultState,
|
||||
mediaManagement: mediaManagement.defaultState,
|
||||
metadata: metadata.defaultState,
|
||||
|
@ -105,6 +108,7 @@ export const actionHandlers = handleThunks({
|
|||
...indexers.actionHandlers,
|
||||
...importLists.actionHandlers,
|
||||
...importListExclusions.actionHandlers,
|
||||
...languages.actionHandlers,
|
||||
...metadataProfiles.actionHandlers,
|
||||
...mediaManagement.actionHandlers,
|
||||
...metadata.actionHandlers,
|
||||
|
@ -137,6 +141,7 @@ export const reducers = createHandleActions({
|
|||
...indexers.reducers,
|
||||
...importLists.reducers,
|
||||
...importListExclusions.reducers,
|
||||
...languages.reducers,
|
||||
...metadataProfiles.reducers,
|
||||
...mediaManagement.reducers,
|
||||
...metadata.reducers,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue