Translate Frontend Store

Fixed indexer copy translation

(cherry picked from commit d31fcbb2dfe98a540a359b98b204d101d554cf03)
(cherry picked from commit 276352dda478aaa7be7d0fc744548adddec6e6b6)

Closes #9118
Closes #9121
pull/9123/head
Stevie Robinson 9 months ago committed by Bogdan
parent 093bb94e42
commit fcd8a4a873

@ -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);

@ -11,6 +11,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';
import createBulkEditItemHandler from '../Creators/createBulkEditItemHandler';
import createBulkRemoveItemHandler from '../Creators/createBulkRemoveItemHandler';
@ -152,7 +153,7 @@ export default {
// Set the name in pendingChanges
newState.pendingChanges = {
name: `${item.name} - Copy`
name: translate('DefaultNameCopiedProfile', { 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);

@ -223,6 +223,8 @@
"Default": "Default",
"DefaultCase": "Default Case",
"DefaultDelayProfile": "This is the default profile. It applies to all movies that don't have an explicit profile.",
"DefaultNameCopiedProfile": "{name} - Copy",
"DefaultNameCopiedSpecification": "{name} - Copy",
"DelayProfile": "Delay Profile",
"DelayProfiles": "Delay Profiles",
"DelayingDownloadUntilInterp": "Delaying download until {0} at {1}",

Loading…
Cancel
Save