From 741585a72f9475f375530777fba96a8d64497e4d Mon Sep 17 00:00:00 2001 From: Valentin Kirilov Date: Mon, 29 Jun 2026 14:12:36 +0300 Subject: [PATCH 1/4] feat(ui): translate success notification messages Migrate success-messages.tsx factories to i18n (notification.success.* keys), using the i18n singleton + for bold names, the Release Notes link, and {{total}} counts. MESSAGE_ACTION now resolves its action word (claimed/ acknowledged) through i18n so the whole toast localizes. Co-Authored-By: Claude Opus 4.8 --- .../notifications/success-messages.tsx | 284 ++++++++++-------- redisinsight/ui/src/i18n/locales/bg.json | 54 ++++ redisinsight/ui/src/i18n/locales/en.json | 54 ++++ 3 files changed, 271 insertions(+), 121 deletions(-) diff --git a/redisinsight/ui/src/components/notifications/success-messages.tsx b/redisinsight/ui/src/components/notifications/success-messages.tsx index d7963c7891..955832778f 100644 --- a/redisinsight/ui/src/components/notifications/success-messages.tsx +++ b/redisinsight/ui/src/components/notifications/success-messages.tsx @@ -1,5 +1,6 @@ import React from 'react' import styled from 'styled-components' +import i18n, { Trans } from 'uiSrc/i18n' import { EXTERNAL_LINKS } from 'uiSrc/constants/links' import { IBulkActionOverview, @@ -26,62 +27,75 @@ const Li = styled.li>` } ` +// Bold span reused as the slot for interpolated messages. +// injects the translated text as children, so the placeholder is unused. +const bold = ( + + {''} + +) + export default { ADDED_NEW_INSTANCE: (instanceName: string) => ({ - title: 'Database has been added', + title: i18n.t('notification.success.addedInstance.title'), message: ( - - {formatNameShort(instanceName)} - {' '} - has been added to Redis Insight. + ), }), ADDED_NEW_RDI_INSTANCE: (instanceName: string) => ({ - title: 'Instance has been added', + title: i18n.t('notification.success.addedRdiInstance.title'), message: ( - - {formatNameShort(instanceName)} - {' '} - has been added to RedisInsight. + ), }), DELETE_INSTANCE: (instanceName: string) => ({ - title: 'Database has been deleted', + title: i18n.t('notification.success.deleteInstance.title'), message: ( - - {formatNameShort(instanceName)} - {' '} - has been deleted from Redis Insight. + ), }), DELETE_RDI_INSTANCE: (instanceName: string) => ({ - title: 'Instance has been deleted', + title: i18n.t('notification.success.deleteRdiInstance.title'), message: ( - - {formatNameShort(instanceName)} - {' '} - has been deleted from RedisInsight. + ), }), DELETE_INSTANCES: (instanceNames: Maybe[]) => { const limitShowRemovedInstances = 10 return { - title: 'Databases have been deleted', + title: i18n.t('notification.success.deleteInstances.title'), message: ( <> - - {instanceNames.length} - {' '} - databases have been deleted from Redis Insight: +
    {instanceNames.slice(0, limitShowRemovedInstances).map((el, i) => ( @@ -101,14 +115,15 @@ export default { DELETE_RDI_INSTANCES: (instanceNames: Maybe[]) => { const limitShowRemovedInstances = 10 return { - title: 'Instances have been deleted', + title: i18n.t('notification.success.deleteRdiInstances.title'), message: ( <> - - {instanceNames.length} - {' '} - instances have been deleted from RedisInsight: +
      {instanceNames.slice(0, limitShowRemovedInstances).map((el, i) => ( @@ -126,24 +141,26 @@ export default { } }, ADDED_NEW_KEY: (keyName: RedisResponseBuffer) => ({ - title: 'Key has been added', + title: i18n.t('notification.success.addedKey.title'), message: ( - - {formatNameShort(bufferToString(keyName))} - {' '} - has been added. + ), }), DELETED_KEY: (keyName: RedisResponseBuffer) => ({ - title: 'Key has been deleted', + title: i18n.t('notification.success.deletedKey.title'), message: ( - - {formatNameShort(bufferToString(keyName))} - {' '} - has been deleted. + ), }), @@ -152,21 +169,16 @@ export default { keyValue: RedisResponseBuffer, valueType: string, ) => ({ - title: ( - <> - {valueType} has been removed - - ), + title: i18n.t('notification.success.removedKeyValue.title', { valueType }), message: ( - <> - - {formatNameShort(bufferToString(keyValue))} - {' '} - has been removed from   - - {formatNameShort(bufferToString(keyName))} - - + ), }), REMOVED_LIST_ELEMENTS: ( @@ -176,11 +188,14 @@ export default { ) => { const limitShowRemovedElements = 10 return { - title: 'Elements have been removed', + title: i18n.t('notification.success.removedListElements.title'), message: ( <> - {`${numberOfElements} Element(s) removed from ${formatNameShort(bufferToString(keyName))}:`} + {i18n.t('notification.success.removedListElements.message', { + total: numberOfElements, + name: formatNameShort(bufferToString(keyName)), + })}
        {listOfElements.slice(0, limitShowRemovedElements).map((el, i) => ( @@ -201,56 +216,69 @@ export default { updateDownloadedVersion: string, onClickLink?: () => void, ) => ({ - title: 'Application updated', + title: i18n.t('notification.success.installedUpdate.title'), message: ( - <> - {`Your application has been updated to ${updateDownloadedVersion}. Find more information in `} - onClickLink?.()} - className="link-underline" - target="_blank" - rel="noreferrer" - > - Release Notes. - - + onClickLink?.()} + className="link-underline" + target="_blank" + rel="noreferrer" + /> + ), + }} + /> ), group: 'upgrade', }), // only one message is being processed at the moment - MESSAGE_ACTION: (message: string, actionName: string) => ({ - title: <>Message has been {actionName}, - message: ( - - - {message} - {' '} - has been successfully {actionName}. - - ), - }), + MESSAGE_ACTION: (id: string, action: 'claimed' | 'acknowledged') => { + // Translate the action word too, then interpolate it into the sentence. + const actionText = i18n.t( + `notification.success.messageAction.action.${action}`, + ) + return { + title: i18n.t('notification.success.messageAction.title', { + action: actionText, + }), + message: ( + + + + ), + } + }, NO_CLAIMED_MESSAGES: () => ({ - title: 'No messages claimed', - message: 'No messages exceed the minimum idle time.', + title: i18n.t('notification.success.noClaimedMessages.title'), + message: i18n.t('notification.success.noClaimedMessages.message'), }), CREATE_INDEX: () => ({ - title: 'Index has been created', - message: 'Open the list of indexes to see it.', + title: i18n.t('notification.success.createIndex.title'), + message: i18n.t('notification.success.createIndex.message'), }), DELETE_INDEX: (indexName: string) => ({ - title: 'Index has been deleted', + title: i18n.t('notification.success.deleteIndex.title'), message: ( - - {formatNameShort(getIndexDisplayName(indexName))} - {' '} - has been deleted. + ), }), TEST_CONNECTION: () => ({ - title: 'Connection is successful', + title: i18n.t('notification.success.testConnection.title'), }), UPLOAD_DATA_BULK: (data?: IBulkActionOverview, fileName?: string) => { const { processed = 0, succeed = 0, failed = 0 } = data?.summary ?? {} @@ -258,12 +286,14 @@ export default { title: ( <> - Action completed + {i18n.t('notification.success.uploadDataBulk.title')} {fileName ? ( <> - Commands executed from file: + + {i18n.t('notification.success.uploadDataBulk.fileLabel')} + {formatLongName(fileName, 34, 5)} ) : null} @@ -274,21 +304,29 @@ export default { {numberWithSpaces(processed)} - Commands Processed + + {i18n.t('notification.success.uploadDataBulk.commandsProcessed')} + {numberWithSpaces(succeed)} - Success + + {i18n.t('notification.success.uploadDataBulk.success')} + {numberWithSpaces(failed)} - Errors + + {i18n.t('notification.success.uploadDataBulk.errors')} + {millisecondsFormat(data?.duration || 0, 'H:mm:ss.SSS')} - Time Taken + + {i18n.t('notification.success.uploadDataBulk.timeTaken')} + ), @@ -297,55 +335,59 @@ export default { } }, DELETE_LIBRARY: (libraryName: string) => ({ - title: 'Library has been deleted', + title: i18n.t('notification.success.deleteLibrary.title'), message: ( - - {formatNameShort(libraryName)} - {' '} - has been deleted. + ), }), ADD_LIBRARY: (libraryName: string) => ({ - title: 'Library has been added', + title: i18n.t('notification.success.addLibrary.title'), message: ( - - {formatNameShort(libraryName)} - {' '} - has been added. + ), }), REMOVED_ALL_CAPI_KEYS: () => ({ - title: 'API keys have been removed', - message: 'All API keys have been removed from Redis Insight.', + title: i18n.t('notification.success.removedAllCapiKeys.title'), + message: i18n.t('notification.success.removedAllCapiKeys.message'), }), REMOVED_CAPI_KEY: (name: string) => ({ - title: 'API Key has been removed', - message: `${formatNameShort(name)} has been removed from Redis Insight.`, + title: i18n.t('notification.success.removedCapiKey.title'), + message: i18n.t('notification.success.removedCapiKey.message', { + name: formatNameShort(name), + }), }), DATABASE_ALREADY_EXISTS: () => ({ - title: 'Database already exists', - message: 'No new database connections have been added.', + title: i18n.t('notification.success.databaseAlreadyExists.title'), + message: i18n.t('notification.success.databaseAlreadyExists.message'), }), SUCCESS_RESET_PIPELINE: () => ({ - title: 'Pipeline has been reset', - message: - 'The RDI pipeline has been reset, consider flushing the target Redis database.', + title: i18n.t('notification.success.resetPipeline.title'), + message: i18n.t('notification.success.resetPipeline.message'), }), SUCCESS_TAGS_UPDATED: () => ({ - title: 'Tags updated successfully.', + title: i18n.t('notification.success.tagsUpdated.title'), }), AZURE_AUTH_SUCCESS: (username: string) => ({ - title: 'Azure authentication successful', + title: i18n.t('notification.success.azureAuthSuccess.title'), message: ( - Signed in as{' '} - - {username} - + ), }), diff --git a/redisinsight/ui/src/i18n/locales/bg.json b/redisinsight/ui/src/i18n/locales/bg.json index 4544e93d7b..5d83ead68d 100644 --- a/redisinsight/ui/src/i18n/locales/bg.json +++ b/redisinsight/ui/src/i18n/locales/bg.json @@ -47,6 +47,60 @@ "notification.error.reportIssueLink": "докладвайте ни.", "notification.error.title.default": "Опа, нещо се обърка...", "notification.error.tryAgainLater": "Опитайте отново по-късно.", + "notification.success.addLibrary.message": "{{name}} беше добавена.", + "notification.success.addLibrary.title": "Библиотеката беше добавена", + "notification.success.addedInstance.message": "{{name}} беше добавена към Redis Insight.", + "notification.success.addedInstance.title": "Базата данни беше добавена", + "notification.success.addedKey.message": "{{name}} беше добавен.", + "notification.success.addedKey.title": "Ключът беше добавен", + "notification.success.addedRdiInstance.message": "{{name}} беше добавена към RedisInsight.", + "notification.success.addedRdiInstance.title": "Инстанцията беше добавена", + "notification.success.azureAuthSuccess.message": "Влязохте като {{username}}", + "notification.success.azureAuthSuccess.title": "Успешно удостоверяване в Azure", + "notification.success.createIndex.message": "Отворете списъка с индекси, за да го видите.", + "notification.success.createIndex.title": "Индексът беше създаден", + "notification.success.databaseAlreadyExists.message": "Не са добавени нови връзки към списъка с бази данни.", + "notification.success.databaseAlreadyExists.title": "Базата данни вече съществува", + "notification.success.deleteIndex.message": "{{name}} беше изтрит.", + "notification.success.deleteIndex.title": "Индексът беше изтрит", + "notification.success.deleteInstance.message": "{{name}} беше изтрита от Redis Insight.", + "notification.success.deleteInstance.title": "Базата данни беше изтрита", + "notification.success.deleteInstances.message": "{{total}} бази данни бяха изтрити от Redis Insight:", + "notification.success.deleteInstances.title": "Базите данни бяха изтрити", + "notification.success.deleteLibrary.message": "{{name}} беше изтрита.", + "notification.success.deleteLibrary.title": "Библиотеката беше изтрита", + "notification.success.deleteRdiInstance.message": "{{name}} беше изтрита от RedisInsight.", + "notification.success.deleteRdiInstance.title": "Инстанцията беше изтрита", + "notification.success.deleteRdiInstances.message": "{{total}} инстанции бяха изтрити от RedisInsight:", + "notification.success.deleteRdiInstances.title": "Инстанциите бяха изтрити", + "notification.success.deletedKey.message": "{{name}} беше изтрит.", + "notification.success.deletedKey.title": "Ключът беше изтрит", + "notification.success.installedUpdate.message": "Вашето приложение беше обновено до {{version}}. Тук можете да намерете повече информация за всичко ново.", + "notification.success.installedUpdate.title": "Приложението беше обновено", + "notification.success.messageAction.action.acknowledged": "потвърдено", + "notification.success.messageAction.action.claimed": "присвоено", + "notification.success.messageAction.message": "{{id}} беше успешно {{action}}.", + "notification.success.messageAction.title": "Съобщението беше {{action}}", + "notification.success.noClaimedMessages.message": "Няма съобщения, които надвишават минималното време на бездействие.", + "notification.success.noClaimedMessages.title": "Няма заявени съобщения", + "notification.success.removedAllCapiKeys.message": "Всички API ключове бяха премахнати от Redis Insight.", + "notification.success.removedAllCapiKeys.title": "API ключовете бяха премахнати", + "notification.success.removedCapiKey.message": "{{name}} беше премахнат от Redis Insight.", + "notification.success.removedCapiKey.title": "API ключът беше премахнат", + "notification.success.removedKeyValue.message": "{{value}} беше премахната от {{name}}", + "notification.success.removedKeyValue.title": "{{valueType}} беше премахната", + "notification.success.removedListElements.message": "{{total}} елемент(а) премахнати от {{name}}:", + "notification.success.removedListElements.title": "Елементите бяха премахнати", + "notification.success.resetPipeline.message": "", + "notification.success.resetPipeline.title": "", + "notification.success.tagsUpdated.title": "Таговете бяха обновени успешно.", + "notification.success.testConnection.title": "Връзката е успешна", + "notification.success.uploadDataBulk.commandsProcessed": "Обработени команди", + "notification.success.uploadDataBulk.errors": "Грешки", + "notification.success.uploadDataBulk.fileLabel": "Команди, изпълнени от файл:", + "notification.success.uploadDataBulk.success": "Успешни", + "notification.success.uploadDataBulk.timeTaken": "Изразходвано време", + "notification.success.uploadDataBulk.title": "Действието завърши", "settings.advancedWarning": "Разширените настройки трябва да се променят само ако разбирате тяхното въздействие.", "settings.copyDiagnostics": "Копиране на системна информация", "settings.language.label": "Изберете езика, използван в Redis Insight:", diff --git a/redisinsight/ui/src/i18n/locales/en.json b/redisinsight/ui/src/i18n/locales/en.json index e14fffeec6..067a5a8f5d 100644 --- a/redisinsight/ui/src/i18n/locales/en.json +++ b/redisinsight/ui/src/i18n/locales/en.json @@ -47,6 +47,60 @@ "notification.error.reportIssueLink": "report it.", "notification.error.title.default": "Error", "notification.error.tryAgainLater": "Try again later.", + "notification.success.addLibrary.message": "{{name}} has been added.", + "notification.success.addLibrary.title": "Library has been added", + "notification.success.addedInstance.message": "{{name}} has been added to Redis Insight.", + "notification.success.addedInstance.title": "Database has been added", + "notification.success.addedKey.message": "{{name}} has been added.", + "notification.success.addedKey.title": "Key has been added", + "notification.success.addedRdiInstance.message": "{{name}} has been added to RedisInsight.", + "notification.success.addedRdiInstance.title": "Instance has been added", + "notification.success.azureAuthSuccess.message": "Signed in as {{username}}", + "notification.success.azureAuthSuccess.title": "Azure authentication successful", + "notification.success.createIndex.message": "Open the list of indexes to see it.", + "notification.success.createIndex.title": "Index has been created", + "notification.success.databaseAlreadyExists.message": "No new database connections have been added.", + "notification.success.databaseAlreadyExists.title": "Database already exists", + "notification.success.deleteIndex.message": "{{name}} has been deleted.", + "notification.success.deleteIndex.title": "Index has been deleted", + "notification.success.deleteInstance.message": "{{name}} has been deleted from Redis Insight.", + "notification.success.deleteInstance.title": "Database has been deleted", + "notification.success.deleteInstances.message": "{{total}} databases have been deleted from Redis Insight:", + "notification.success.deleteInstances.title": "Databases have been deleted", + "notification.success.deleteLibrary.message": "{{name}} has been deleted.", + "notification.success.deleteLibrary.title": "Library has been deleted", + "notification.success.deleteRdiInstance.message": "{{name}} has been deleted from RedisInsight.", + "notification.success.deleteRdiInstance.title": "Instance has been deleted", + "notification.success.deleteRdiInstances.message": "{{total}} instances have been deleted from RedisInsight:", + "notification.success.deleteRdiInstances.title": "Instances have been deleted", + "notification.success.deletedKey.message": "{{name}} has been deleted.", + "notification.success.deletedKey.title": "Key has been deleted", + "notification.success.installedUpdate.message": "Your application has been updated to {{version}}. Find more information in Release Notes.", + "notification.success.installedUpdate.title": "Application updated", + "notification.success.messageAction.action.acknowledged": "acknowledged", + "notification.success.messageAction.action.claimed": "claimed", + "notification.success.messageAction.message": "{{id}} has been successfully {{action}}.", + "notification.success.messageAction.title": "Message has been {{action}}", + "notification.success.noClaimedMessages.message": "No messages exceed the minimum idle time.", + "notification.success.noClaimedMessages.title": "No messages claimed", + "notification.success.removedAllCapiKeys.message": "All API keys have been removed from Redis Insight.", + "notification.success.removedAllCapiKeys.title": "API keys have been removed", + "notification.success.removedCapiKey.message": "{{name}} has been removed from Redis Insight.", + "notification.success.removedCapiKey.title": "API Key has been removed", + "notification.success.removedKeyValue.message": "{{value}} has been removed from {{name}}", + "notification.success.removedKeyValue.title": "{{valueType}} has been removed", + "notification.success.removedListElements.message": "{{total}} Element(s) removed from {{name}}:", + "notification.success.removedListElements.title": "Elements have been removed", + "notification.success.resetPipeline.message": "The RDI pipeline has been reset, consider flushing the target Redis database.", + "notification.success.resetPipeline.title": "Pipeline has been reset", + "notification.success.tagsUpdated.title": "Tags updated successfully.", + "notification.success.testConnection.title": "Connection is successful", + "notification.success.uploadDataBulk.commandsProcessed": "Commands Processed", + "notification.success.uploadDataBulk.errors": "Errors", + "notification.success.uploadDataBulk.fileLabel": "Commands executed from file:", + "notification.success.uploadDataBulk.success": "Success", + "notification.success.uploadDataBulk.timeTaken": "Time Taken", + "notification.success.uploadDataBulk.title": "Action completed", "settings.advancedWarning": "Advanced settings should only be changed if you understand their impact.", "settings.copyDiagnostics": "Copy system info", "settings.language.label": "Specifies the language used in Redis Insight:", From 01b2706b5b2721af1220eba1e84e144045e72bb3 Mon Sep 17 00:00:00 2001 From: Valentin Kirilov Date: Mon, 29 Jun 2026 14:34:20 +0300 Subject: [PATCH 2/4] feat(ui): translate infinite notification messages Migrate INFINITE_MESSAGES to i18n (notification.infinite.* keys) via the i18n singleton + for the bold Notice and inline Redis Cloud link, with a button.* segment for the action labels (Manage DB, Connect, Import, OK, Create, Restart). Keys re-sorted to i18next-cli's canonical order via i18n:extract. Co-Authored-By: Claude Opus 4.8 --- .../infinite-messages/InfiniteMessages.tsx | 154 +++++++++++------- redisinsight/ui/src/i18n/locales/bg.json | 45 ++++- redisinsight/ui/src/i18n/locales/en.json | 45 ++++- 3 files changed, 178 insertions(+), 66 deletions(-) diff --git a/redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx b/redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx index 078bf6beef..70508039dc 100644 --- a/redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx +++ b/redisinsight/ui/src/components/notifications/components/infinite-messages/InfiniteMessages.tsx @@ -1,5 +1,6 @@ import React from 'react' import { find } from 'lodash' +import i18n, { Trans } from 'uiSrc/i18n' import { CloudJobName, CloudJobStep } from 'uiSrc/electron/constants' import Divider from 'uiSrc/components/divider/Divider' import { OAuthProviders } from 'uiSrc/components/oauth/oauth-select-plan/constants' @@ -23,6 +24,13 @@ import { Link } from 'uiSrc/components/base/link/Link' import styles from './styles.module.scss' +// Bold span reused as the slot for interpolated messages. +const bold = ( + + {''} + +) + export enum InfiniteMessagesIds { oAuthProgress = 'oAuthProgress', oAuthSuccess = 'oAuthSuccess', @@ -67,8 +75,8 @@ interface InfiniteMessagesType { export const INFINITE_MESSAGES: InfiniteMessagesType = { AUTHENTICATING: () => ({ id: InfiniteMessagesIds.oAuthProgress, - message: 'Authenticating…', - description: 'This may take several seconds, but it is totally worth it!', + message: i18n.t('notification.infinite.authenticating.message'), + description: i18n.t('notification.infinite.authenticating.description'), customIcon: LoaderLargeIcon, }), PENDING_CREATE_DB: (step?: CloudJobStep) => ({ @@ -78,21 +86,20 @@ export const INFINITE_MESSAGES: InfiniteMessagesType = { message: ( <> {(step === CloudJobStep.Credentials || !step) && - 'Processing Cloud API keys…'} + i18n.t('notification.infinite.pendingCreateDb.credentials')} {step === CloudJobStep.Subscription && - 'Processing Cloud subscriptions…'} + i18n.t('notification.infinite.pendingCreateDb.subscription')} {step === CloudJobStep.Database && - 'Creating a free Redis Cloud database…'} + i18n.t('notification.infinite.pendingCreateDb.database')} {step === CloudJobStep.Import && - 'Importing a free Redis Cloud database…'} + i18n.t('notification.infinite.pendingCreateDb.import')} ), description: ( <> - This may take several minutes, but it is totally worth it! + {i18n.t('notification.infinite.pendingCreateDb.description')} - You can continue working in Redis Insight, and we will notify you once - done. + {i18n.t('notification.infinite.pendingCreateDb.descriptionContinue')} ), }), @@ -108,20 +115,23 @@ export const INFINITE_MESSAGES: InfiniteMessagesType = { CloudJobName.CreateFreeDatabase, CloudJobName.CreateFreeSubscriptionAndDatabase, ].includes(jobName) - const text = `You can now use your Redis Cloud database${withFeed ? ' with pre-loaded sample data' : ''}.` return { id: InfiniteMessagesIds.oAuthSuccess, - message: 'Congratulations!', + message: i18n.t('notification.infinite.successCreateDb.message'), variant: 'success', description: ( <> - {text} + {withFeed + ? i18n.t( + 'notification.infinite.successCreateDb.descriptionWithData', + ) + : i18n.t('notification.infinite.successCreateDb.description')} - - Notice: - {' '} - the database will be deleted after 15 days of inactivity. + {!!details && ( <> @@ -129,10 +139,14 @@ export const INFINITE_MESSAGES: InfiniteMessagesType = { - Plan + + {i18n.t('notification.infinite.successCreateDb.plan')} + - Free + + {i18n.t('notification.infinite.successCreateDb.planFree')} + - Cloud Vendor + + {i18n.t( + 'notification.infinite.successCreateDb.cloudVendor', + )} + - Region + + {i18n.t('notification.infinite.successCreateDb.region')} + {details.region} @@ -171,7 +191,9 @@ export const INFINITE_MESSAGES: InfiniteMessagesType = { href={MANAGE_DB_LINK} variant="inline" > - Manage DB + {i18n.t( + 'notification.infinite.successCreateDb.button.manageDb', + )} @@ -180,7 +202,7 @@ export const INFINITE_MESSAGES: InfiniteMessagesType = { onClick={() => onSuccess()} data-testid="notification-connect-db" > - Connect + {i18n.t('notification.infinite.successCreateDb.button.connect')} @@ -190,41 +212,47 @@ export const INFINITE_MESSAGES: InfiniteMessagesType = { }, DATABASE_EXISTS: (onSuccess?: () => void, onClose?: () => void) => ({ id: InfiniteMessagesIds.databaseExists, - message: 'You already have a free Redis Cloud subscription.', - description: - 'Do you want to import your existing database into Redis Insight?', + message: i18n.t('notification.infinite.databaseExists.message'), + description: i18n.t('notification.infinite.databaseExists.description'), actions: { - primary: { label: 'Import', onClick: () => onSuccess?.() }, + primary: { + label: i18n.t('notification.infinite.databaseExists.button.import'), + onClick: () => onSuccess?.(), + }, }, onClose, }), DATABASE_IMPORT_FORBIDDEN: (onClose?: () => void) => ({ id: InfiniteMessagesIds.databaseImportForbidden, - message: 'Unable to import Cloud database.', + message: i18n.t('notification.infinite.databaseImportForbidden.message'), description: ( <> - Adding your Redis Cloud database to Redis Insight is disabled due to a - setting restricting database connection management. + {i18n.t('notification.infinite.databaseImportForbidden.description')} - Log in to{' '} - - Redis Cloud - {' '} - to check your database. + + ), + }} + /> ), actions: { primary: { - label: 'OK', + label: i18n.t( + 'notification.infinite.databaseImportForbidden.button.ok', + ), onClick: () => onClose?.(), }, }, @@ -232,43 +260,53 @@ export const INFINITE_MESSAGES: InfiniteMessagesType = { }), SUBSCRIPTION_EXISTS: (onSuccess?: () => void, onClose?: () => void) => ({ id: InfiniteMessagesIds.subscriptionExists, - message: 'Your subscription does not have a free Redis Cloud database.', - description: - 'Do you want to create a free database in your existing subscription?', + message: i18n.t('notification.infinite.subscriptionExists.message'), + description: i18n.t('notification.infinite.subscriptionExists.description'), actions: { - primary: { label: 'Create', onClick: () => onSuccess?.() }, + primary: { + label: i18n.t('notification.infinite.subscriptionExists.button.create'), + onClick: () => onSuccess?.(), + }, }, onClose, }), AUTO_CREATING_DATABASE: () => ({ id: InfiniteMessagesIds.autoCreateDb, - message: 'Connecting to your database', - description: 'This may take several minutes, but it is totally worth it!', + message: i18n.t('notification.infinite.autoCreatingDatabase.message'), + description: i18n.t( + 'notification.infinite.autoCreatingDatabase.description', + ), customIcon: LoaderLargeIcon, }), APP_UPDATE_AVAILABLE: (version: string, onSuccess?: () => void) => ({ id: InfiniteMessagesIds.appUpdateAvailable, - message: 'New version is now available', + message: i18n.t('notification.infinite.appUpdateAvailable.message'), description: ( <> - With Redis Insight {version} you have access to new useful features and - optimizations. + {i18n.t('notification.infinite.appUpdateAvailable.description', { + version, + })} - Restart Redis Insight to install updates. + {i18n.t('notification.infinite.appUpdateAvailable.descriptionRestart')} ), actions: { - primary: { label: 'Restart', onClick: () => onSuccess?.() }, + primary: { + label: i18n.t( + 'notification.infinite.appUpdateAvailable.button.restart', + ), + onClick: () => onSuccess?.(), + }, }, }), SUCCESS_DEPLOY_PIPELINE: () => ({ id: InfiniteMessagesIds.pipelineDeploySuccess, - message: 'Congratulations!', + message: i18n.t('notification.infinite.successDeployPipeline.message'), description: ( <> - Deployment completed successfully! + {i18n.t('notification.infinite.successDeployPipeline.description')}
        - Check out the pipeline statistics page. + {i18n.t('notification.infinite.successDeployPipeline.descriptionCheck')} ), // TODO enable when statistics page will be available diff --git a/redisinsight/ui/src/i18n/locales/bg.json b/redisinsight/ui/src/i18n/locales/bg.json index 5d83ead68d..0afa93111e 100644 --- a/redisinsight/ui/src/i18n/locales/bg.json +++ b/redisinsight/ui/src/i18n/locales/bg.json @@ -47,20 +47,59 @@ "notification.error.reportIssueLink": "докладвайте ни.", "notification.error.title.default": "Опа, нещо се обърка...", "notification.error.tryAgainLater": "Опитайте отново по-късно.", - "notification.success.addLibrary.message": "{{name}} беше добавена.", - "notification.success.addLibrary.title": "Библиотеката беше добавена", + "notification.infinite.appUpdateAvailable.button.restart": "Рестартирай", + "notification.infinite.appUpdateAvailable.description": "С Redis Insight {{version}} получавате достъп до нови полезни функции и оптимизации.", + "notification.infinite.appUpdateAvailable.descriptionRestart": "Рестартирайте Redis Insight, за да инсталирате актуализациите.", + "notification.infinite.appUpdateAvailable.message": "Налична е нова версия", + "notification.infinite.authenticating.description": "Това може да отнеме няколко секунди, но определено си заслужава!", + "notification.infinite.authenticating.message": "Удостоверяване…", + "notification.infinite.autoCreatingDatabase.description": "Това може да отнеме няколко минути, но определено си заслужава!", + "notification.infinite.autoCreatingDatabase.message": "Свързване с вашата база данни", + "notification.infinite.databaseExists.button.import": "Импортирай", + "notification.infinite.databaseExists.description": "Искате ли да импортирате съществуващата си база данни в Redis Insight?", + "notification.infinite.databaseExists.message": "Вече имате безплатен Redis Cloud абонамент.", + "notification.infinite.databaseImportForbidden.button.ok": "OK", + "notification.infinite.databaseImportForbidden.description": "Добавянето на вашата Redis Cloud база данни към Redis Insight е изключено поради настройка, ограничаваща управлението на връзките към бази данни.", + "notification.infinite.databaseImportForbidden.logIn": "Влезте в Redis Cloud, за да проверите настройките на базата данни.", + "notification.infinite.databaseImportForbidden.message": "Неуспешно импортиране на Redis Cloud база данни.", + "notification.infinite.pendingCreateDb.credentials": "Обработка на Cloud API ключове…", + "notification.infinite.pendingCreateDb.database": "Създаване на безплатна Redis Cloud база данни…", + "notification.infinite.pendingCreateDb.description": "Това може да отнеме няколко минути, но определено си заслужава!", + "notification.infinite.pendingCreateDb.descriptionContinue": "Можете да продължите работа в Redis Insight и ще ви уведомим, когато приключи.", + "notification.infinite.pendingCreateDb.import": "Импортиране на безплатна Redis Cloud база данни…", + "notification.infinite.pendingCreateDb.subscription": "Обработка на Cloud абонаменти…", + "notification.infinite.subscriptionExists.button.create": "Създай", + "notification.infinite.subscriptionExists.description": "Искате ли да създадете безплатна база данни в съществуващия си абонамент?", + "notification.infinite.subscriptionExists.message": "Вашият абонамент няма безплатна Redis Cloud база данни.", + "notification.infinite.successCreateDb.button.connect": "Свържи се", + "notification.infinite.successCreateDb.button.manageDb": "Управление на БД", + "notification.infinite.successCreateDb.cloudVendor": "Cloud доставчик", + "notification.infinite.successCreateDb.description": "Вече можете да използвате вашата Redis Cloud база данни.", + "notification.infinite.successCreateDb.descriptionWithData": "Вече можете да използвате вашата Redis Cloud база данни с предварително заредени примерни данни.", + "notification.infinite.successCreateDb.message": "Поздравления!", + "notification.infinite.successCreateDb.notice": "Забележка: базата данни ще бъде изтрита след 15 дни бездействие.", + "notification.infinite.successCreateDb.plan": "План", + "notification.infinite.successCreateDb.planFree": "Безплатен", + "notification.infinite.successCreateDb.region": "Регион", + "notification.infinite.successDeployPipeline.description": "Внедряването завърши успешно!", + "notification.infinite.successDeployPipeline.descriptionCheck": "Вижте страницата със статистики на пайплайна.", + "notification.infinite.successDeployPipeline.message": "Поздравления!", "notification.success.addedInstance.message": "{{name}} беше добавена към Redis Insight.", "notification.success.addedInstance.title": "Базата данни беше добавена", "notification.success.addedKey.message": "{{name}} беше добавен.", "notification.success.addedKey.title": "Ключът беше добавен", "notification.success.addedRdiInstance.message": "{{name}} беше добавена към RedisInsight.", "notification.success.addedRdiInstance.title": "Инстанцията беше добавена", + "notification.success.addLibrary.message": "{{name}} беше добавена.", + "notification.success.addLibrary.title": "Библиотеката беше добавена", "notification.success.azureAuthSuccess.message": "Влязохте като {{username}}", "notification.success.azureAuthSuccess.title": "Успешно удостоверяване в Azure", "notification.success.createIndex.message": "Отворете списъка с индекси, за да го видите.", "notification.success.createIndex.title": "Индексът беше създаден", "notification.success.databaseAlreadyExists.message": "Не са добавени нови връзки към списъка с бази данни.", "notification.success.databaseAlreadyExists.title": "Базата данни вече съществува", + "notification.success.deletedKey.message": "{{name}} беше изтрит.", + "notification.success.deletedKey.title": "Ключът беше изтрит", "notification.success.deleteIndex.message": "{{name}} беше изтрит.", "notification.success.deleteIndex.title": "Индексът беше изтрит", "notification.success.deleteInstance.message": "{{name}} беше изтрита от Redis Insight.", @@ -73,8 +112,6 @@ "notification.success.deleteRdiInstance.title": "Инстанцията беше изтрита", "notification.success.deleteRdiInstances.message": "{{total}} инстанции бяха изтрити от RedisInsight:", "notification.success.deleteRdiInstances.title": "Инстанциите бяха изтрити", - "notification.success.deletedKey.message": "{{name}} беше изтрит.", - "notification.success.deletedKey.title": "Ключът беше изтрит", "notification.success.installedUpdate.message": "Вашето приложение беше обновено до {{version}}. Тук можете да намерете повече информация за всичко ново.", "notification.success.installedUpdate.title": "Приложението беше обновено", "notification.success.messageAction.action.acknowledged": "потвърдено", diff --git a/redisinsight/ui/src/i18n/locales/en.json b/redisinsight/ui/src/i18n/locales/en.json index 067a5a8f5d..640ddda197 100644 --- a/redisinsight/ui/src/i18n/locales/en.json +++ b/redisinsight/ui/src/i18n/locales/en.json @@ -47,20 +47,59 @@ "notification.error.reportIssueLink": "report it.", "notification.error.title.default": "Error", "notification.error.tryAgainLater": "Try again later.", - "notification.success.addLibrary.message": "{{name}} has been added.", - "notification.success.addLibrary.title": "Library has been added", + "notification.infinite.appUpdateAvailable.button.restart": "Restart", + "notification.infinite.appUpdateAvailable.description": "With Redis Insight {{version}} you have access to new useful features and optimizations.", + "notification.infinite.appUpdateAvailable.descriptionRestart": "Restart Redis Insight to install updates.", + "notification.infinite.appUpdateAvailable.message": "New version is now available", + "notification.infinite.authenticating.description": "This may take several seconds, but it is totally worth it!", + "notification.infinite.authenticating.message": "Authenticating…", + "notification.infinite.autoCreatingDatabase.description": "This may take several minutes, but it is totally worth it!", + "notification.infinite.autoCreatingDatabase.message": "Connecting to your database", + "notification.infinite.databaseExists.button.import": "Import", + "notification.infinite.databaseExists.description": "Do you want to import your existing database into Redis Insight?", + "notification.infinite.databaseExists.message": "You already have a free Redis Cloud subscription.", + "notification.infinite.databaseImportForbidden.button.ok": "OK", + "notification.infinite.databaseImportForbidden.description": "Adding your Redis Cloud database to Redis Insight is disabled due to a setting restricting database connection management.", + "notification.infinite.databaseImportForbidden.logIn": "Log in to Redis Cloud to check your database.", + "notification.infinite.databaseImportForbidden.message": "Unable to import Cloud database.", + "notification.infinite.pendingCreateDb.credentials": "Processing Cloud API keys…", + "notification.infinite.pendingCreateDb.database": "Creating a free Redis Cloud database…", + "notification.infinite.pendingCreateDb.description": "This may take several minutes, but it is totally worth it!", + "notification.infinite.pendingCreateDb.descriptionContinue": "You can continue working in Redis Insight, and we will notify you once done.", + "notification.infinite.pendingCreateDb.import": "Importing a free Redis Cloud database…", + "notification.infinite.pendingCreateDb.subscription": "Processing Cloud subscriptions…", + "notification.infinite.subscriptionExists.button.create": "Create", + "notification.infinite.subscriptionExists.description": "Do you want to create a free database in your existing subscription?", + "notification.infinite.subscriptionExists.message": "Your subscription does not have a free Redis Cloud database.", + "notification.infinite.successCreateDb.button.connect": "Connect", + "notification.infinite.successCreateDb.button.manageDb": "Manage DB", + "notification.infinite.successCreateDb.cloudVendor": "Cloud Vendor", + "notification.infinite.successCreateDb.description": "You can now use your Redis Cloud database.", + "notification.infinite.successCreateDb.descriptionWithData": "You can now use your Redis Cloud database with pre-loaded sample data.", + "notification.infinite.successCreateDb.message": "Congratulations!", + "notification.infinite.successCreateDb.notice": "Notice: the database will be deleted after 15 days of inactivity.", + "notification.infinite.successCreateDb.plan": "Plan", + "notification.infinite.successCreateDb.planFree": "Free", + "notification.infinite.successCreateDb.region": "Region", + "notification.infinite.successDeployPipeline.description": "Deployment completed successfully!", + "notification.infinite.successDeployPipeline.descriptionCheck": "Check out the pipeline statistics page.", + "notification.infinite.successDeployPipeline.message": "Congratulations!", "notification.success.addedInstance.message": "{{name}} has been added to Redis Insight.", "notification.success.addedInstance.title": "Database has been added", "notification.success.addedKey.message": "{{name}} has been added.", "notification.success.addedKey.title": "Key has been added", "notification.success.addedRdiInstance.message": "{{name}} has been added to RedisInsight.", "notification.success.addedRdiInstance.title": "Instance has been added", + "notification.success.addLibrary.message": "{{name}} has been added.", + "notification.success.addLibrary.title": "Library has been added", "notification.success.azureAuthSuccess.message": "Signed in as {{username}}", "notification.success.azureAuthSuccess.title": "Azure authentication successful", "notification.success.createIndex.message": "Open the list of indexes to see it.", "notification.success.createIndex.title": "Index has been created", "notification.success.databaseAlreadyExists.message": "No new database connections have been added.", "notification.success.databaseAlreadyExists.title": "Database already exists", + "notification.success.deletedKey.message": "{{name}} has been deleted.", + "notification.success.deletedKey.title": "Key has been deleted", "notification.success.deleteIndex.message": "{{name}} has been deleted.", "notification.success.deleteIndex.title": "Index has been deleted", "notification.success.deleteInstance.message": "{{name}} has been deleted from Redis Insight.", @@ -73,8 +112,6 @@ "notification.success.deleteRdiInstance.title": "Instance has been deleted", "notification.success.deleteRdiInstances.message": "{{total}} instances have been deleted from RedisInsight:", "notification.success.deleteRdiInstances.title": "Instances have been deleted", - "notification.success.deletedKey.message": "{{name}} has been deleted.", - "notification.success.deletedKey.title": "Key has been deleted", "notification.success.installedUpdate.message": "Your application has been updated to {{version}}. Find more information in Release Notes.", "notification.success.installedUpdate.title": "Application updated", "notification.success.messageAction.action.acknowledged": "acknowledged", From edf20575d702184e02f2a4727d3a16ee20372831 Mon Sep 17 00:00:00 2001 From: Valentin Kirilov Date: Mon, 29 Jun 2026 15:40:01 +0300 Subject: [PATCH 3/4] fix(ui): localize REMOVED_KEY_VALUE title per value type The value type (Member/Field/Group/Entry/Element/Consumer/JSON key) was an English literal interpolated into the title, producing mixed-language Bulgarian toasts. Add a per-type title key for each so it reads correctly and agrees in gender in Bulgarian. Co-Authored-By: Claude Opus 4.8 --- .../notifications/success-messages.tsx | 4 +++- redisinsight/ui/src/i18n/locales/bg.json | 16 +++++++++++----- redisinsight/ui/src/i18n/locales/en.json | 16 +++++++++++----- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/redisinsight/ui/src/components/notifications/success-messages.tsx b/redisinsight/ui/src/components/notifications/success-messages.tsx index 955832778f..283f73687d 100644 --- a/redisinsight/ui/src/components/notifications/success-messages.tsx +++ b/redisinsight/ui/src/components/notifications/success-messages.tsx @@ -169,7 +169,9 @@ export default { keyValue: RedisResponseBuffer, valueType: string, ) => ({ - title: i18n.t('notification.success.removedKeyValue.title', { valueType }), + title: i18n.t( + `notification.success.removedKeyValue.title.${valueType}` as never, + ), message: ( {{name}}
        беше добавена.", + "notification.success.addLibrary.title": "Библиотеката беше добавена", "notification.success.addedInstance.message": "{{name}} беше добавена към Redis Insight.", "notification.success.addedInstance.title": "Базата данни беше добавена", "notification.success.addedKey.message": "{{name}} беше добавен.", "notification.success.addedKey.title": "Ключът беше добавен", "notification.success.addedRdiInstance.message": "{{name}} беше добавена към RedisInsight.", "notification.success.addedRdiInstance.title": "Инстанцията беше добавена", - "notification.success.addLibrary.message": "{{name}} беше добавена.", - "notification.success.addLibrary.title": "Библиотеката беше добавена", "notification.success.azureAuthSuccess.message": "Влязохте като {{username}}", "notification.success.azureAuthSuccess.title": "Успешно удостоверяване в Azure", "notification.success.createIndex.message": "Отворете списъка с индекси, за да го видите.", "notification.success.createIndex.title": "Индексът беше създаден", "notification.success.databaseAlreadyExists.message": "Не са добавени нови връзки към списъка с бази данни.", "notification.success.databaseAlreadyExists.title": "Базата данни вече съществува", - "notification.success.deletedKey.message": "{{name}} беше изтрит.", - "notification.success.deletedKey.title": "Ключът беше изтрит", "notification.success.deleteIndex.message": "{{name}} беше изтрит.", "notification.success.deleteIndex.title": "Индексът беше изтрит", "notification.success.deleteInstance.message": "{{name}} беше изтрита от Redis Insight.", @@ -112,6 +110,8 @@ "notification.success.deleteRdiInstance.title": "Инстанцията беше изтрита", "notification.success.deleteRdiInstances.message": "{{total}} инстанции бяха изтрити от RedisInsight:", "notification.success.deleteRdiInstances.title": "Инстанциите бяха изтрити", + "notification.success.deletedKey.message": "{{name}} беше изтрит.", + "notification.success.deletedKey.title": "Ключът беше изтрит", "notification.success.installedUpdate.message": "Вашето приложение беше обновено до {{version}}. Тук можете да намерете повече информация за всичко ново.", "notification.success.installedUpdate.title": "Приложението беше обновено", "notification.success.messageAction.action.acknowledged": "потвърдено", @@ -125,7 +125,13 @@ "notification.success.removedCapiKey.message": "{{name}} беше премахнат от Redis Insight.", "notification.success.removedCapiKey.title": "API ключът беше премахнат", "notification.success.removedKeyValue.message": "{{value}} беше премахната от {{name}}", - "notification.success.removedKeyValue.title": "{{valueType}} беше премахната", + "notification.success.removedKeyValue.title.Consumer": "Консуматорът беше премахнат", + "notification.success.removedKeyValue.title.Element": "Елементът беше премахнат", + "notification.success.removedKeyValue.title.Entry": "Записът беше премахнат", + "notification.success.removedKeyValue.title.Field": "Полето беше премахнато", + "notification.success.removedKeyValue.title.Group": "Групата беше премахната", + "notification.success.removedKeyValue.title.JSON key": "JSON ключът беше премахнат", + "notification.success.removedKeyValue.title.Member": "Членът беше премахнат", "notification.success.removedListElements.message": "{{total}} елемент(а) премахнати от {{name}}:", "notification.success.removedListElements.title": "Елементите бяха премахнати", "notification.success.resetPipeline.message": "", diff --git a/redisinsight/ui/src/i18n/locales/en.json b/redisinsight/ui/src/i18n/locales/en.json index 640ddda197..daad385c45 100644 --- a/redisinsight/ui/src/i18n/locales/en.json +++ b/redisinsight/ui/src/i18n/locales/en.json @@ -84,22 +84,20 @@ "notification.infinite.successDeployPipeline.description": "Deployment completed successfully!", "notification.infinite.successDeployPipeline.descriptionCheck": "Check out the pipeline statistics page.", "notification.infinite.successDeployPipeline.message": "Congratulations!", + "notification.success.addLibrary.message": "{{name}} has been added.", + "notification.success.addLibrary.title": "Library has been added", "notification.success.addedInstance.message": "{{name}} has been added to Redis Insight.", "notification.success.addedInstance.title": "Database has been added", "notification.success.addedKey.message": "{{name}} has been added.", "notification.success.addedKey.title": "Key has been added", "notification.success.addedRdiInstance.message": "{{name}} has been added to RedisInsight.", "notification.success.addedRdiInstance.title": "Instance has been added", - "notification.success.addLibrary.message": "{{name}} has been added.", - "notification.success.addLibrary.title": "Library has been added", "notification.success.azureAuthSuccess.message": "Signed in as {{username}}", "notification.success.azureAuthSuccess.title": "Azure authentication successful", "notification.success.createIndex.message": "Open the list of indexes to see it.", "notification.success.createIndex.title": "Index has been created", "notification.success.databaseAlreadyExists.message": "No new database connections have been added.", "notification.success.databaseAlreadyExists.title": "Database already exists", - "notification.success.deletedKey.message": "{{name}} has been deleted.", - "notification.success.deletedKey.title": "Key has been deleted", "notification.success.deleteIndex.message": "{{name}} has been deleted.", "notification.success.deleteIndex.title": "Index has been deleted", "notification.success.deleteInstance.message": "{{name}} has been deleted from Redis Insight.", @@ -112,6 +110,8 @@ "notification.success.deleteRdiInstance.title": "Instance has been deleted", "notification.success.deleteRdiInstances.message": "{{total}} instances have been deleted from RedisInsight:", "notification.success.deleteRdiInstances.title": "Instances have been deleted", + "notification.success.deletedKey.message": "{{name}} has been deleted.", + "notification.success.deletedKey.title": "Key has been deleted", "notification.success.installedUpdate.message": "Your application has been updated to {{version}}. Find more information in Release Notes.", "notification.success.installedUpdate.title": "Application updated", "notification.success.messageAction.action.acknowledged": "acknowledged", @@ -125,7 +125,13 @@ "notification.success.removedCapiKey.message": "{{name}} has been removed from Redis Insight.", "notification.success.removedCapiKey.title": "API Key has been removed", "notification.success.removedKeyValue.message": "{{value}} has been removed from {{name}}", - "notification.success.removedKeyValue.title": "{{valueType}} has been removed", + "notification.success.removedKeyValue.title.Consumer": "Consumer has been removed", + "notification.success.removedKeyValue.title.Element": "Element has been removed", + "notification.success.removedKeyValue.title.Entry": "Entry has been removed", + "notification.success.removedKeyValue.title.Field": "Field has been removed", + "notification.success.removedKeyValue.title.Group": "Group has been removed", + "notification.success.removedKeyValue.title.JSON key": "JSON key has been removed", + "notification.success.removedKeyValue.title.Member": "Member has been removed", "notification.success.removedListElements.message": "{{total}} Element(s) removed from {{name}}:", "notification.success.removedListElements.title": "Elements have been removed", "notification.success.resetPipeline.message": "The RDI pipeline has been reset, consider flushing the target Redis database.", From 042c0a2558902ff5116602cbbcfe58e92e137408 Mon Sep 17 00:00:00 2001 From: Valentin Kirilov Date: Tue, 30 Jun 2026 13:51:46 +0300 Subject: [PATCH 4/4] fix(ui): escape user-provided names in Trans success messages parses interpolated values as markup (escapeValue is off), so a Redis key/name containing e.g. "
        " was rendered as a tag instead of literal text. Escape the user-provided values before interpolating them. Co-Authored-By: Claude Opus 4.8 --- .../notifications/success-messages.tsx | 38 ++++++++++++------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/redisinsight/ui/src/components/notifications/success-messages.tsx b/redisinsight/ui/src/components/notifications/success-messages.tsx index 283f73687d..a8c0e3369a 100644 --- a/redisinsight/ui/src/components/notifications/success-messages.tsx +++ b/redisinsight/ui/src/components/notifications/success-messages.tsx @@ -35,6 +35,12 @@ const bold = ( ) +// parses interpolated values as markup (escapeValue is off), so a +// user-provided name containing e.g. "
        " would be rendered as a tag. +// Escape such values before passing them to . +const escapeTrans = (value: string) => + value.replace(/&/g, '&').replace(//g, '>') + export default { ADDED_NEW_INSTANCE: (instanceName: string) => ({ title: i18n.t('notification.success.addedInstance.title'), @@ -42,7 +48,7 @@ export default { @@ -54,7 +60,7 @@ export default { @@ -66,7 +72,7 @@ export default { @@ -78,7 +84,7 @@ export default { @@ -146,7 +152,9 @@ export default { @@ -158,7 +166,9 @@ export default { @@ -176,8 +186,8 @@ export default { @@ -252,7 +262,7 @@ export default { @@ -273,7 +283,9 @@ export default { @@ -342,7 +354,7 @@ export default { @@ -354,7 +366,7 @@ export default { @@ -387,7 +399,7 @@ export default {