diff --git a/src/app/[locale]/pages/marking-audio/page.tsx b/src/app/[locale]/pages/marking-audio/page.tsx index 64a16b7..8df2cef 100644 --- a/src/app/[locale]/pages/marking-audio/page.tsx +++ b/src/app/[locale]/pages/marking-audio/page.tsx @@ -1,12 +1,15 @@ import ProtectionSummary from '@/app/ui/marking-page/protection-summary'; import TestSection from '@/app/ui/marking-page/test-section'; import FilesTable from '@/app/ui/dashboard/files-table'; +import {useTranslations} from 'next-intl'; export default function Page() { + const t = useTranslations('Global'); + return (
-

Защита аудио

+

{t('audio-protection')}

{/* */} diff --git a/src/app/[locale]/pages/marking-video/page.tsx b/src/app/[locale]/pages/marking-video/page.tsx index 3f5c730..476b82e 100644 --- a/src/app/[locale]/pages/marking-video/page.tsx +++ b/src/app/[locale]/pages/marking-video/page.tsx @@ -2,13 +2,16 @@ import ProtectionSummary from '@/app/ui/marking-page/protection-summary'; import TestSection from '@/app/ui/marking-page/test-section'; import UploadSectionVideo from '@/app/ui/marking-page/upload-section-video'; import FilesTable from '@/app/ui/dashboard/files-table'; +import {useTranslations} from 'next-intl'; export default function Page() { + const t = useTranslations('Global'); + return (
-

Защита видео

+

{t('video-protection')}

diff --git a/src/app/components/tanstakTable.tsx b/src/app/components/tanstakTable.tsx index bff4a59..e302a7b 100644 --- a/src/app/components/tanstakTable.tsx +++ b/src/app/components/tanstakTable.tsx @@ -11,7 +11,7 @@ import { SortingState, ColumnFiltersState, } from '@tanstack/react-table'; -import { IconImageFile, IconVideoFile, IconAudioFile, IconEye, IconDownload, IconShield, DoubleArrowRight, ArrowRight, DoubleArrowLeft, ArrowLeft, ArrowUp, ArrowDown, Filter } from '@/app/ui/icons/icons'; +import { IconImageFile, IconVideoFile, IconAudioFile, IconEye, IconDownload, IconShield, IconDoubleArrowRight, IconArrowRight, IconDoubleArrowLeft, IconArrowLeft, IconArrowUp, IconArrowDown, IconFilter } from '@/app/ui/icons/icons'; import { useTranslations } from 'next-intl'; import DropDownList from '@/app/components/dropDownList'; @@ -101,14 +101,14 @@ export default function TanstakFilesTable() { { column.getIsSorted() === 'asc' ? - + : column.getIsSorted() === 'desc' ? - + : - + } @@ -138,14 +138,14 @@ export default function TanstakFilesTable() { { column.getIsSorted() === 'asc' ? - + : column.getIsSorted() === 'desc' ? - + : - + } @@ -171,14 +171,14 @@ export default function TanstakFilesTable() { { column.getIsSorted() === 'asc' ? - + : column.getIsSorted() === 'desc' ? - + : - + } @@ -204,14 +204,14 @@ export default function TanstakFilesTable() { { column.getIsSorted() === 'asc' ? - + : column.getIsSorted() === 'desc' ? - + : - + } @@ -493,14 +493,14 @@ export default function TanstakFilesTable() { onClick={() => table.firstPage()} disabled={!table.getCanPreviousPage()} > - +
@@ -536,14 +536,14 @@ export default function TanstakFilesTable() { onClick={() => table.nextPage()} disabled={!table.getCanNextPage()} > - +
diff --git a/src/app/ui/header/notificationsButton.tsx b/src/app/ui/header/notificationsButton.tsx index 66e7ead..4ae1292 100644 --- a/src/app/ui/header/notificationsButton.tsx +++ b/src/app/ui/header/notificationsButton.tsx @@ -3,7 +3,9 @@ import { useState, useRef } from 'react'; import { fetchFruits } from '@/app/actions/action'; import { useClickOutside } from '@/app/hooks/useClickOutside'; +import { useTranslations } from 'next-intl'; import Link from 'next/link'; +import {IconNotification} from '@/app/ui/icons/icons'; export default function NotificationsButton() { const [isOpen, setIsOpen] = useState(false); @@ -11,6 +13,7 @@ export default function NotificationsButton() { const [loading, setLoading] = useState(false); const [error, setError] = useState(null); const menuRef = useRef(null); + const t = useTranslations('Global'); useClickOutside(menuRef, () => { setIsOpen(false); @@ -57,26 +60,38 @@ export default function NotificationsButton() { ) : ( <>
-

Уведомления

- Нет новых +

+ {t('notifications')} +

+ + {t('no-new')} +
{data ? (
-
+
+ +
-
Токены добавлены
-
На ваш баланс добавлено 100 токенов. Теперь вы можете защитить ещё больше файлов!
-
4 дн назад
+
+ {t('tokens-added')} +
+
{t('added')} 100 {t('tokens')}.
+
4 {t('days-ago')}
{JSON.stringify(data)}
) : ( -

Нет данных

+

+ {t('no-data')} +

)}
- Посмотреть все + + {t('view-all')} +
)} diff --git a/src/app/ui/icons/icons.tsx b/src/app/ui/icons/icons.tsx index 8840b9c..f06d1c1 100644 --- a/src/app/ui/icons/icons.tsx +++ b/src/app/ui/icons/icons.tsx @@ -56,45 +56,51 @@ export function IconEye() { ) } -export function DoubleArrowRight() { +export function IconDoubleArrowRight() { return ( - + ) } -export function DoubleArrowLeft() { +export function IconDoubleArrowLeft() { return ( - + ) } -export function ArrowRight() { +export function IconArrowRight() { return ( - + ) } -export function ArrowLeft() { +export function IconArrowLeft() { return ( - + ) } -export function ArrowUp() { +export function IconArrowUp() { return ( - + ) } -export function ArrowDown() { +export function IconArrowDown() { return ( - + ) } -export function Filter() { +export function IconFilter() { return ( - + + ) +} + +export function IconNotification() { + return ( + ) } \ No newline at end of file diff --git a/src/app/ui/settings/api-settings.tsx b/src/app/ui/settings/api-settings.tsx index 88e36fc..e9b962c 100644 --- a/src/app/ui/settings/api-settings.tsx +++ b/src/app/ui/settings/api-settings.tsx @@ -1,31 +1,38 @@ import Link from 'next/link'; +import { useTranslations } from 'next-intl'; export default function APISettings() { + const t = useTranslations('Global'); + return (
-

🔌 API настройки

+

+ {t('api-settings')} +

- +
- ⚠️ Используйте этот ключ для доступа к API. Не передавайте его третьим лицам. + {t('use-this-key-for-api-access')}

- 📚 Документация API + {t('api-documentation')}

- Полная документация API доступна по ссылке: + {t('full-api-documentation-available-at-link')}:
api.no-copy.ru/docs

diff --git a/src/app/ui/settings/danger-zone.tsx b/src/app/ui/settings/danger-zone.tsx index 0ccb89d..9c26f3d 100644 --- a/src/app/ui/settings/danger-zone.tsx +++ b/src/app/ui/settings/danger-zone.tsx @@ -1,24 +1,34 @@ +import { useTranslations } from 'next-intl'; + export default function DangerZone() { + const t = useTranslations('Global'); + return (
-

⚠️ Опасная зона

+

+ {t('danger-zone')} +

- 🗑️ Удаление аккаунта + {t('account-deletion')}

- ⚠️ Удаление аккаунта приведет к безвозвратной потере всех данных, включая загруженный контент, отчеты и настройки. Это действие нельзя отменить. + {t('account-deletion-warning')}

- +

- 🔄 Сброс всех настроек + {t('reset-all-settings')}

- 🔧 Восстановить все настройки аккаунта к значениям по умолчанию. + {t('reset-settings-description')}

- +
) diff --git a/src/app/ui/settings/last-activity-settings.tsx b/src/app/ui/settings/last-activity-settings.tsx index 44247c1..d4241e7 100644 --- a/src/app/ui/settings/last-activity-settings.tsx +++ b/src/app/ui/settings/last-activity-settings.tsx @@ -1,11 +1,17 @@ +import { useTranslations } from 'next-intl'; + export default function LastActivitySettings() { + const t = useTranslations('Global'); + return (
-

🕒 Последняя активность

+

+ {t('last-activity')} +

- 📝 Пока нет записей о активности + {t('no-activity-records-yet')}
diff --git a/src/app/ui/settings/notifications-monitoring-settings.tsx b/src/app/ui/settings/notifications-monitoring-settings.tsx index cb11841..d0d961a 100644 --- a/src/app/ui/settings/notifications-monitoring-settings.tsx +++ b/src/app/ui/settings/notifications-monitoring-settings.tsx @@ -1,5 +1,6 @@ 'use client' +import { useTranslations } from 'next-intl'; import { useActionState, useState } from 'react'; export default function NotificationsMonitoringSettings() { @@ -12,35 +13,48 @@ export default function NotificationsMonitoringSettings() { const [selectedMonitoringValue, setSelectedMonitoringValue] = useState('weekly'); const [selectedWatermarkValue, setSelectedWatermarkValue] = useState('high'); + const t = useTranslations('Global'); return (
-

🔔 Уведомления и мониторинг

+

+ {t('notifications-and-monitoring')} +

- Получать уведомления о нарушениях на email + + {t('receive-violation-notifications-on-email')} +
- Автоматическая проверка контента в интернете + + {t('automatic-content-check-on-internet')} +
- +
- +
- +
diff --git a/src/app/ui/settings/safety-settings.tsx b/src/app/ui/settings/safety-settings.tsx index 8695e07..f592c92 100644 --- a/src/app/ui/settings/safety-settings.tsx +++ b/src/app/ui/settings/safety-settings.tsx @@ -1,6 +1,7 @@ 'use client' import { useActionState, useState } from 'react'; +import { useTranslations } from 'next-intl'; export default function SafetySetting() { const [errorMessage, formAction, isPending] = useActionState( @@ -9,26 +10,39 @@ export default function SafetySetting() { }, undefined ); + const t = useTranslations('Global'); return (
-

🔐 Безопасность

+

+ {t('security')} +

- +
- + - Минимум 6 символов + + {t('minimum-8-characters')} +
- +
- +
diff --git a/src/app/ui/settings/subscription-settings.tsx b/src/app/ui/settings/subscription-settings.tsx index c40071f..a984483 100644 --- a/src/app/ui/settings/subscription-settings.tsx +++ b/src/app/ui/settings/subscription-settings.tsx @@ -1,8 +1,14 @@ +import { useTranslations } from 'next-intl'; + export default function SubscriptionSettings() { + const t = useTranslations('Global'); + return (
-

💎 Подписка

+

+ {t('subscription')} +

diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index 77fff71..7651538 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -55,7 +55,7 @@ "type-filter": "Type filter", "items-per-page": "Items per page", "email": "Email", - "image-protection": "Защита изображений", + "image-protection": "Image protection", "account-settings": "Account settings", "personal-data": "Personal data", "full-name": "Full name", @@ -69,7 +69,52 @@ "female": "Female", "used-to-send-congratulations": "Used to send congratulations", "automatically-filled-in-based-on-date-of-birth": "Automatically filled in based on date of birth", - "save-changes": "Save changes" + "save-changes": "Save changes", + "video-protection": "Video protection", + "audio-protection": "Audio protection", + "notifications-and-monitoring": "Notifications and Monitoring", + "email-notifications": "Email Notifications", + "receive-violation-notifications-on-email": "Receive violation notifications via email", + "automatic-monitoring": "Automatic Monitoring", + "automatic-content-check-on-internet": "Automatic content check on the internet", + "monitoring-frequency": "Monitoring Frequency", + "daily": "Daily", + "weekly": "Weekly", + "monthly": "Monthly", + "watermark-intensity": "Watermark Intensity", + "low": "Low", + "medium": "Medium", + "high": "High", + "security": "Security", + "current-password": "Current Password", + "new-password": "New Password", + "minimum-8-characters": "Minimum 8 characters", + "confirm-password": "Confirm Password", + "change-password": "Change Password", + "subscription": "Subscription", + "api-settings": "API Settings", + "your-api-key": "Your API Key", + "copy": "Copy", + "update-key": "Update Key", + "api-documentation": "API Documentation", + "full-api-documentation-available-at-link": "Full API documentation available at the link", + "last-activity": "Last Activity", + "no-activity-records-yet": "No activity records yet", + "use-this-key-for-api-access": "Use this key for API access. Do not share it with third parties.", + "danger-zone": "Danger Zone", + "account-deletion": "Account Deletion", + "account-deletion-warning": "Account deletion will lead to irreversible loss of all data, including uploaded content, reports and settings. This action cannot be undone.", + "delete-account": "Delete Account", + "reset-all-settings": "Reset All Settings", + "reset-settings-description": "Restore all account settings to default values.", + "reset-settings": "Reset Settings", + "notifications": "Notifications", + "no-new": "No new", + "tokens-added": "Tokens added", + "added": "Added", + "no-data": "No data", + "view-all": "View all", + "days-ago": "days ago" }, "Login-register-form": { "and": "and", @@ -115,7 +160,7 @@ "sign-in": "Sign in", "terms-of-use": "terms of use", "email-already-registered": "Email already registered", - "password-does-not-match" : "Password does not match", + "password-does-not-match": "Password does not match", "email-not-found": "Email not found", "register-error-no-digits": "The name should not contain a number." } diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index e758ff2..4119ccd 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -69,7 +69,52 @@ "female": "Женский", "used-to-send-congratulations": "Используется для отправки поздравления", "automatically-filled-in-based-on-date-of-birth": "Заполняется автоматически исходя из даты рождения", - "save-changes": "Сохранить изменения" + "save-changes": "Сохранить изменения", + "video-protection": "Защита видео", + "audio-protection": "Защита аудио", + "notifications-and-monitoring": "Уведомления и мониторинг", + "email-notifications": "Email уведомления", + "receive-violation-notifications-on-email": "Получать уведомления о нарушениях на email", + "automatic-monitoring": "Автоматический мониторинг", + "automatic-content-check-on-internet": "Автоматическая проверка контента в интернете", + "monitoring-frequency": "Частота мониторинга", + "daily": "Ежедневно", + "weekly": "Еженедельно", + "monthly": "Ежемесячно", + "watermark-intensity": "Интенсивность водяного знака", + "low": "Низкая", + "medium": "Средняя", + "high": "Высокая", + "security": "Безопасность", + "current-password": "Текущий пароль", + "new-password": "Новый пароль", + "minimum-8-characters": "Минимум 8 символов", + "confirm-password": "Подтвердите пароль", + "change-password": "Изменить пароль", + "subscription": "Подписка", + "api-settings": "API настройки", + "your-api-key": "Ваш API ключ", + "copy": "Копировать", + "update-key": "Обновить ключ", + "api-documentation": "Документация API", + "full-api-documentation-available-at-link": "Полная документация API доступна по ссылке", + "last-activity": "Последняя активность", + "no-activity-records-yet": "Пока нет записей о активности", + "use-this-key-for-api-access": "Используйте этот ключ для доступа к API. Не передавайте его третьим лицам.", + "danger-zone": "Опасная зона", + "account-deletion": "Удаление аккаунта", + "account-deletion-warning": "Удаление аккаунта приведет к безвозвратной потере всех данных, включая загруженный контент, отчеты и настройки. Это действие нельзя отменить.", + "delete-account": "Удалить аккаунт", + "reset-all-settings": "Сброс всех настроек", + "reset-settings-description": "Восстановить все настройки аккаунта к значениям по умолчанию.", + "reset-settings": "Сбросить настройки", + "notifications": "Уведомления", + "no-new": "Нет новых", + "tokens-added": "Токены добавлены", + "added": "Добавлено", + "no-data": "Нет данных", + "view-all": "Посмотреть все", + "days-ago": "дней назад" }, "Login-register-form": { "and": "и", @@ -115,7 +160,7 @@ "sign-in": "Войти в систему", "terms-of-use": "условиями использования", "email-already-registered": "Такой Email уже зарегистрирован", - "password-does-not-match" : "Пароль не совпадает", + "password-does-not-match": "Пароль не совпадает", "email-not-found": "Email не найден", "register-error-no-digits": "В имени не должно быть цифр." }