Translate Frontend Store
This commit is contained in:
parent
467ce70291
commit
d31fcbb2df
|
@ -10,6 +10,7 @@ import getProviderState from 'Utilities/State/getProviderState';
|
|||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
import selectProviderSchema from 'Utilities/State/selectProviderSchema';
|
||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import { removeItem, set, update, updateItem } from '../baseActions';
|
||||
|
||||
//
|
||||
|
@ -176,7 +177,7 @@ export default {
|
|||
const newItem = {
|
||||
...item,
|
||||
id: newId,
|
||||
name: `${item.name} - Copy`
|
||||
name: translate('DefaultNameCopiedSpecification', { name: item.name })
|
||||
};
|
||||
newState.items = [...items, newItem];
|
||||
newState.itemMap[newId] = newState.items.length - 1;
|
||||
|
|
|
@ -7,6 +7,7 @@ import createSetSettingValueReducer from 'Store/Actions/Creators/Reducers/create
|
|||
import { createThunk } from 'Store/thunks';
|
||||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||
import translate from 'Utilities/String/translate';
|
||||
|
||||
//
|
||||
// Variables
|
||||
|
@ -99,7 +100,7 @@ export default {
|
|||
const pendingChanges = { ...item, id: 0 };
|
||||
delete pendingChanges.id;
|
||||
|
||||
pendingChanges.name = `${pendingChanges.name} - Copy`;
|
||||
pendingChanges.name = translate('DefaultNameCopiedProfile', { name: pendingChanges.name });
|
||||
newState.pendingChanges = pendingChanges;
|
||||
|
||||
return updateSectionState(state, section, newState);
|
||||
|
|
|
@ -10,6 +10,7 @@ import getProviderState from 'Utilities/State/getProviderState';
|
|||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
import selectProviderSchema from 'Utilities/State/selectProviderSchema';
|
||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import { removeItem, set, update, updateItem } from '../baseActions';
|
||||
|
||||
//
|
||||
|
@ -176,7 +177,7 @@ export default {
|
|||
const newItem = {
|
||||
...item,
|
||||
id: newId,
|
||||
name: `${item.name} - Copy`
|
||||
name: translate('DefaultNameCopiedSpecification', { name: item.name })
|
||||
};
|
||||
newState.items = [...items, newItem];
|
||||
newState.itemMap[newId] = newState.items.length - 1;
|
||||
|
|
|
@ -6,6 +6,7 @@ import createSetSettingValueReducer from 'Store/Actions/Creators/Reducers/create
|
|||
import { createThunk } from 'Store/thunks';
|
||||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import { set } from '../baseActions';
|
||||
|
||||
//
|
||||
|
@ -98,7 +99,7 @@ export default {
|
|||
const pendingChanges = { ...item, id: 0 };
|
||||
delete pendingChanges.id;
|
||||
|
||||
pendingChanges.name = `${pendingChanges.name} - Copy`;
|
||||
pendingChanges.name = translate('DefaultNameCopiedProfile', { name: pendingChanges.name });
|
||||
newState.pendingChanges = pendingChanges;
|
||||
|
||||
return updateSectionState(state, section, newState);
|
||||
|
|
|
@ -13,6 +13,7 @@ import { createThunk } from 'Store/thunks';
|
|||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
import selectProviderSchema from 'Utilities/State/selectProviderSchema';
|
||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||
import translate from 'Utilities/String/translate';
|
||||
|
||||
//
|
||||
// Variables
|
||||
|
@ -149,7 +150,7 @@ export default {
|
|||
|
||||
// Set the name in pendingChanges
|
||||
newState.pendingChanges = {
|
||||
name: `${item.name} - Copy`
|
||||
name: translate('DefaultNameCopiedSpecification', { name: item.name })
|
||||
};
|
||||
|
||||
return updateSectionState(state, section, newState);
|
||||
|
|
|
@ -7,6 +7,7 @@ import createSetSettingValueReducer from 'Store/Actions/Creators/Reducers/create
|
|||
import { createThunk } from 'Store/thunks';
|
||||
import getSectionState from 'Utilities/State/getSectionState';
|
||||
import updateSectionState from 'Utilities/State/updateSectionState';
|
||||
import translate from 'Utilities/String/translate';
|
||||
|
||||
//
|
||||
// Variables
|
||||
|
@ -87,7 +88,7 @@ export default {
|
|||
const pendingChanges = { ...item, id: 0 };
|
||||
delete pendingChanges.id;
|
||||
|
||||
pendingChanges.name = `${pendingChanges.name} - Copy`;
|
||||
pendingChanges.name = translate('DefaultNameCopiedProfile', { name: pendingChanges.name });
|
||||
newState.pendingChanges = pendingChanges;
|
||||
|
||||
return updateSectionState(state, section, newState);
|
||||
|
|
|
@ -261,6 +261,8 @@
|
|||
"Default": "Default",
|
||||
"DefaultCase": "Default Case",
|
||||
"DefaultDelayProfile": "This is the default profile. It applies to all series that don't have an explicit profile.",
|
||||
"DefaultNameCopiedProfile": "{name} - Copy",
|
||||
"DefaultNameCopiedSpecification": "{name} - Copy",
|
||||
"DefaultNotFoundMessage": "You must be lost, nothing to see here.",
|
||||
"DelayMinutes": "{delay} Minutes",
|
||||
"DelayProfile": "Delay Profile",
|
||||
|
|
Loading…
Reference in New Issue