From fbcf1b03c5663512ed3936ca3d6aa432aef26788 Mon Sep 17 00:00:00 2001 From: Stevie Robinson Date: Fri, 1 Sep 2023 02:49:38 +0200 Subject: [PATCH] Translate Frontend Store (cherry picked from commit d31fcbb2dfe98a540a359b98b204d101d554cf03) --- frontend/src/Store/Actions/Settings/appProfiles.js | 3 ++- frontend/src/Store/Actions/indexerActions.js | 2 +- src/NzbDrone.Core/Localization/Core/en.json | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/Store/Actions/Settings/appProfiles.js b/frontend/src/Store/Actions/Settings/appProfiles.js index 357588b75..92a48e0b8 100644 --- a/frontend/src/Store/Actions/Settings/appProfiles.js +++ b/frontend/src/Store/Actions/Settings/appProfiles.js @@ -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); diff --git a/frontend/src/Store/Actions/indexerActions.js b/frontend/src/Store/Actions/indexerActions.js index 0325891be..ff0cfe5d4 100644 --- a/frontend/src/Store/Actions/indexerActions.js +++ b/frontend/src/Store/Actions/indexerActions.js @@ -210,7 +210,7 @@ export const reducers = createHandleActions({ // Set the name in pendingChanges newState.pendingChanges = { - name: `${item.name} - Copy` + name: translate('DefaultNameCopiedProfile', { name: item.name }) }; return updateSectionState(state, section, newState); diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json index 9baeeebbd..4b26243ab 100644 --- a/src/NzbDrone.Core/Localization/Core/en.json +++ b/src/NzbDrone.Core/Localization/Core/en.json @@ -131,6 +131,7 @@ "Database": "Database", "Date": "Date", "Dates": "Dates", + "DefaultNameCopiedProfile": "{name} - Copy", "Delete": "Delete", "DeleteAppProfile": "Delete App Profile", "DeleteAppProfileMessageText": "Are you sure you want to delete the app profile '{name}'?",