From 6ab3c8098587e9c2a8d1bb3bcdbb60759cc13035 Mon Sep 17 00:00:00 2001 From: Andrey Babushkin <55714097+reyand43@users.noreply.github.com> Date: Mon, 10 Mar 2025 16:43:53 +0100 Subject: [PATCH] Fix localisation (#3125) * fix localised errors * fix locales * fix locales --- .../components/WidgetName/WidgetName.tsx | 2 + .../components/Highlights/HighlightClip.tsx | 18 ++++---- frontend/app/locales/en.json | 6 ++- frontend/app/locales/es.json | 6 ++- frontend/app/locales/fr.json | 6 ++- frontend/app/locales/ru.json | 42 ++++++++++--------- frontend/app/locales/zh.json | 6 ++- 7 files changed, 55 insertions(+), 31 deletions(-) diff --git a/frontend/app/components/Dashboard/components/WidgetName/WidgetName.tsx b/frontend/app/components/Dashboard/components/WidgetName/WidgetName.tsx index 0212b28d4..51331a759 100644 --- a/frontend/app/components/Dashboard/components/WidgetName/WidgetName.tsx +++ b/frontend/app/components/Dashboard/components/WidgetName/WidgetName.tsx @@ -1,6 +1,7 @@ import React, { useState, useRef, useEffect } from 'react'; import { Input, Tooltip } from 'antd'; import cn from 'classnames'; +import { useTranslation } from 'react-i18next'; interface Props { name: string; @@ -10,6 +11,7 @@ interface Props { } function WidgetName(props: Props) { + const { t } = useTranslation(); const { canEdit = true } = props; const [editing, setEditing] = useState(false); const [name, setName] = useState(props.name); diff --git a/frontend/app/components/Highlights/HighlightClip.tsx b/frontend/app/components/Highlights/HighlightClip.tsx index 373a7d7aa..00552ed37 100644 --- a/frontend/app/components/Highlights/HighlightClip.tsx +++ b/frontend/app/components/Highlights/HighlightClip.tsx @@ -9,6 +9,7 @@ import { Eye, Link } from 'lucide-react'; import { toast } from 'react-toastify'; import { resentOrDate } from 'App/date'; import { noNoteMsg } from 'App/mstore/notesStore'; +import { useTranslation } from 'react-i18next'; function HighlightClip({ note = 'Highlight note', @@ -33,6 +34,7 @@ function HighlightClip({ onDelete: (id: any) => any; canEdit: boolean; }) { + const { t } = useTranslation(); const noteMsg = note || noNoteMsg; const copyToClipboard = () => { const currUrl = window.location.href; @@ -44,24 +46,24 @@ function HighlightClip({ { key: 'copy', icon: , - label: 'Copy Link', + label: t('Copy Link'), }, { key: 'edit', icon: , - label: 'Edit', + label: t('Edit'), disabled: !canEdit, }, { key: 'visibility', icon: , - label: 'Visibility', + label: t('Visibility'), disabled: !canEdit, }, { key: 'delete', icon: , - label: 'Delete', + label: t('Delete'), disabled: !canEdit, }, ]; @@ -72,14 +74,14 @@ function HighlightClip({ return openEdit(); case 'copy': copyToClipboard(); - toast.success('Highlight link copied to clipboard'); + toast.success(t('Highlight link copied to clipboard')); return; case 'delete': const res = await confirm({ - header: 'Are you sure delete this Highlight?', + header: t('Are you sure delete this Highlight?'), confirmation: - 'Deleting a Highlight will only remove this instance and its associated note. It will not affect the original session.', - confirmButton: 'Yes, Delete', + t('Deleting a Highlight will only remove this instance and its associated note. It will not affect the original session.'), + confirmButton: t('Yes, Delete'), }); if (res) { onDelete(); diff --git a/frontend/app/locales/en.json b/frontend/app/locales/en.json index a8a05ac3a..b7d9a8db4 100644 --- a/frontend/app/locales/en.json +++ b/frontend/app/locales/en.json @@ -1486,5 +1486,9 @@ "above": "above", "above or equal to": "above or equal to", "below": "below", - "below or equal to": "below or equal to" + "below or equal to": "below or equal to", + "Highlight link copied to clipboard": "Highlight link copied to clipboard", + "Are you sure delete this Highlight?": "Are you sure delete this Highlight?", + "Deleting a Highlight will only remove this instance and its associated note. It will not affect the original session.": "Deleting a Highlight will only remove this instance and its associated note. It will not affect the original session.", + "Yes, Delete": "Yes, Delete" } diff --git a/frontend/app/locales/es.json b/frontend/app/locales/es.json index c2866618a..133e7d43d 100644 --- a/frontend/app/locales/es.json +++ b/frontend/app/locales/es.json @@ -1486,5 +1486,9 @@ "above": "por encima de", "above or equal to": "por encima o igual a", "below": "por debajo de", - "below or equal to": "por debajo o igual a" + "below or equal to": "por debajo o igual a", + "Highlight link copied to clipboard": "Enlace resaltado copiado al portapapeles", + "Are you sure delete this Highlight?": "¿Estás seguro de que deseas eliminar este Resaltado?", + "Deleting a Highlight will only remove this instance and its associated note. It will not affect the original session.": "Eliminar un Resaltado solo eliminará esta instancia y su nota asociada. No afectará a la sesión original.", + "Yes, Delete": "Sí, eliminar" } diff --git a/frontend/app/locales/fr.json b/frontend/app/locales/fr.json index f8c8a1929..836adba1f 100644 --- a/frontend/app/locales/fr.json +++ b/frontend/app/locales/fr.json @@ -1486,5 +1486,9 @@ "above": "au-dessus de", "above or equal to": "supérieur ou égal à", "below": "en dessous de", - "below or equal to": "inférieur ou égal à" + "below or equal to": "inférieur ou égal à", + "Highlight link copied to clipboard": "Lien de mise en avant copié dans le presse-papiers", + "Are you sure delete this Highlight?": "Êtes-vous sûr de vouloir supprimer cette mise en avant ?", + "Deleting a Highlight will only remove this instance and its associated note. It will not affect the original session.": "La suppression d'une mise en avant ne supprimera que cette instance et sa note associée. Cela n'affectera pas la session d'origine.", + "Yes, Delete": "Oui, supprimer" } diff --git a/frontend/app/locales/ru.json b/frontend/app/locales/ru.json index edd28036c..b4a713c6a 100644 --- a/frontend/app/locales/ru.json +++ b/frontend/app/locales/ru.json @@ -69,8 +69,8 @@ "You don't have the permissions to perform this action.": "У вас нет прав для выполнения этого действия.", "End": "Завершить", "Join Call": "Присоединиться к звонку", - "Live Sessions": "Живые сессии", - "No live sessions found.": "Живые сессии не найдены.", + "Live Sessions": "Онлайн сессии", + "No live sessions found.": "Онлайн сессии не найдены.", "TAB": "ВКЛАДКА", "Agent": "Агент", "Total Live Duration": "Общая Live продолжительность", @@ -254,7 +254,7 @@ "Co-Browse": "Совместный просмотр", "Enable live session replay, remote control, annotations and webRTC call/video.": "Включите воспроизведение сессий в реальном времени, удалённое управление, аннотации и звонки/видео через WebRTC.", "Recordings": "Записи", - "Record live sessions while co-browsing with users and share it with your team for training purposes.": "Записывайте живые сессии при совместном просмотре с пользователями и делитесь ими с командой для обучения.", + "Record live sessions while co-browsing with users and share it with your team for training purposes.": "Записывайте онлайн сессии при совместном просмотре с пользователями и делитесь ими с командой для обучения.", "Cobrowsing Reports": "Отчёты по совместному просмотру", "Keep an eye on cobrowsing metrics across your team and generate reports.": "Отслеживайте метрики совместного просмотра по всей команде и создавайте отчёты.", "Highlights": "Хайлайты", @@ -870,7 +870,7 @@ "You will have access to all OpenReplay features regardless of your choice.": "Вы получите доступ ко всем функциям OpenReplay независимо от вашего выбора.", "Your preference will simply help us tailor your onboarding experience.": "Ваш выбор поможет нам адаптировать процесс вашей настройки.", "Session Replay with DevTools, Co-browsing and Product Analytics": "Повтор сессии с DevTools, совместным просмотром и аналитикой продукта", - "Bug reporting via Spot": "Сообщение об ошибках через Spot", + "Bug reporting via Spot": "Сообщение об ошибках через Спот", "Continue": "Продолжить", "Autoplaying next clip in": "Следующий клип начнется через", "seconds": "секунд", @@ -1091,8 +1091,8 @@ "terms of service": "условиями использования", "privacy policy": "политикой конфиденциальности", "Already having an account?": "Уже есть аккаунт?", - "OpenReplay Spot": "OpenReplay Spot", - "The Spot link has expired.": "Ссылка Spot истекла.", + "OpenReplay Spot": "OpenReplay Спот", + "The Spot link has expired.": "Ссылка на Спот истекла.", "Contact the person who shared it to re-spot.": "Свяжитесь с человеком, который поделился ссылкой, чтобы получить новую.", "1 Hour": "1 час", "3 Hours": "3 часа", @@ -1102,7 +1102,7 @@ "Copied!": "Скопировано!", "Copy Link": "Скопировать ссылку", "Enable Public Sharing": "Включить публичный доступ", - "Anyone with the following link can access this Spot": "Любой, у кого есть эта ссылка, сможет получить доступ к этому Spot", + "Anyone with the following link can access this Spot": "Любой, у кого есть эта ссылка, сможет получить доступ к этому Споту", "Link expires in": "Ссылка истекает через", "Disable Public Sharing": "Отключить публичный доступ", "Comments": "Комментарии", @@ -1113,19 +1113,19 @@ "No Data": "Нет данных", "Activity": "Активность", "Download Video": "Скачать Видео", - "All Spots": "Все Spots", + "All Spots": "Все Споты", "Spot": "Spot", "by OpenReplay": "от OpenReplay", "Manage Access": "Управление доступом", - "Edit Spot": "Редактировать Spot", - "Spot is designed for Chrome. Please install Chrome and navigate to this page to start using Spot.": "Spot создан для Chrome. Пожалуйста, установите Chrome и перейдите на эту страницу, чтобы начать использовать Spot.", - "It looks like you haven’t installed the Spot extension yet.": "Похоже, расширение Spot еще не установлено.", + "Edit Spot": "Редактировать Спот", + "Spot is designed for Chrome. Please install Chrome and navigate to this page to start using Spot.": "Спот создан для Chrome. Пожалуйста, установите Chrome и перейдите на эту страницу, чтобы начать использовать Спот.", + "It looks like you haven’t installed the Spot extension yet.": "Похоже, расширение Спот еще не установлено.", "Get Chrome Extension": "Установить расширение для Chrome", - "Spot List": "Список Spots", - "My Spots": "Мои Spots", + "Spot List": "Список Спотов", + "My Spots": "Мои Споты", "deleted successfully.": "успешно удалено.", "No Matching Results.": "Нет совпадающих результатов.", - "spots.": "spots.", + "spots.": "споты.", "Live Participants": "Участники в реальном времени", "Filter by participant ID or name": "Фильтровать по ID участника или имени", "ongoing tests.": "текущие тесты.", @@ -1266,8 +1266,8 @@ "Lucy": "Люси", "Scatter Chart": "Диаграмма рассеяния", "Integrate Slack or MS Teams": "Интеграция со Slack или MS Teams", - "No live sessions found": "Живые сессии не найдены", - "Support users with live sessions, cobrowsing, and video calls.": "Поддерживайте пользователей с помощью живых сессий, совместного просмотра и видеозвонков.", + "No live sessions found": "Онлайн сессии не найдены", + "Support users with live sessions, cobrowsing, and video calls.": "Поддерживайте пользователей с помощью онлайн сессий, совместного просмотра и видеозвонков.", "Refresh": "Обновить", "Remove Tag": "Удалить тег", "Remove": "Удалить", @@ -1416,7 +1416,7 @@ "Show Menu": "Показать меню", "Hide Menu": "Скрыть меню", "Replays": "Повторы", - "Spots": "Spots", + "Spots": "Споты", "Analytics": "Аналитика", "Product Optimization": "Оптимизация продукта", "Preferences": "Настройки", @@ -1443,7 +1443,7 @@ "Dashboard": "Дашборд", "Assist (Live)": "Assist (Live)", "Assist (Call)": "Assist (Call)", - "Change Spot Visibility": "Изменить видимость Spot", + "Change Spot Visibility": "Изменить видимость Спота", "Clear Drilldown": "Очистить детализацию", "Select Series": "Выбрать серию", "Integrate Github": "Интеграция с Github", @@ -1486,5 +1486,9 @@ "above": "выше", "above or equal to": "выше или равно", "below": "ниже", - "below or equal to": "ниже или равно" + "below or equal to": "ниже или равно", + "Highlight link copied to clipboard": "Ссылка на хайлайт скопирована в буфер обмена", + "Are you sure delete this Highlight?": "Вы уверены, что хотите удалить этот хайлайт?", + "Deleting a Highlight will only remove this instance and its associated note. It will not affect the original session.": "Удаление хайлайта приведет к удалению только этого экземпляра и связанной с ним заметки. Оригинальная сессия не пострадает.", + "Yes, Delete": "Да, удалить" } diff --git a/frontend/app/locales/zh.json b/frontend/app/locales/zh.json index 8461e4740..2fdfd5736 100644 --- a/frontend/app/locales/zh.json +++ b/frontend/app/locales/zh.json @@ -1486,5 +1486,9 @@ "above": "大于", "above or equal to": "大于或等于", "below": "小于", - "below or equal to": "小于或等于" + "below or equal to": "小于或等于", + "Highlight link copied to clipboard": "突出显示链接已复制到剪贴板", + "Are you sure delete this Highlight?": "确定要删除此突出显示吗?", + "Deleting a Highlight will only remove this instance and its associated note. It will not affect the original session.": "删除突出显示仅会删除此实例及其关联的备注。不会影响原始会话。", + "Yes, Delete": "是的,删除" }