diff --git a/src/App.tsx b/src/App.tsx index 002cb96..3f5ca9f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,6 +6,7 @@ import { initializeUserId, getCurrentUserId } from './constants/user'; import { trackScreenView } from './services/analyticsService'; import customAnalyticsService from './services/customAnalyticsService'; import { BalanceProvider } from './contexts/BalanceContext'; +import { getTranslation } from './constants/translations'; // Ленивая загрузка компонентов const OnboardingWelcome = lazy(() => import('./screens/onboarding/OnboardingWelcome')); @@ -29,7 +30,7 @@ const LoadingScreen = () => ( alignItems: 'center', height: '100vh' }}> - Загрузка... + {getTranslation('loading')} ); diff --git a/src/components/blocks/GenerateButton.tsx b/src/components/blocks/GenerateButton.tsx index a72a1b3..df50f3c 100644 --- a/src/components/blocks/GenerateButton.tsx +++ b/src/components/blocks/GenerateButton.tsx @@ -1,5 +1,6 @@ import React from 'react'; import styles from './GenerateButton.module.css'; +import { getTranslation } from '../../constants/translations'; interface GenerateButtonProps { onGenerate: () => void; @@ -13,8 +14,8 @@ const GenerateButton: React.FC = ({ onGenerate, tokenCount onClick={onGenerate} > - Начать генерацию - {tokenCount} токенов + {getTranslation('start_generation')} + {getTranslation('tokens_count', tokenCount)} ); diff --git a/src/components/blocks/GridButtonsBlock.tsx b/src/components/blocks/GridButtonsBlock.tsx index 2d6d04d..78dab01 100644 --- a/src/components/blocks/GridButtonsBlock.tsx +++ b/src/components/blocks/GridButtonsBlock.tsx @@ -2,6 +2,7 @@ import React, { useState } from 'react'; import { ButtonBlock } from '../../types/blocks'; import SquareButton from './SquareButton'; import styles from './GridButtonsBlock.module.css'; +import { getTranslation } from '../../constants/translations'; interface GridButtonsBlockProps { block: ButtonBlock; @@ -61,7 +62,7 @@ const GridButtonsBlock: React.FC = ({ block, onAction, is className={styles.showMoreButton} onClick={() => setExpanded(!expanded)} > - {expanded ? 'Свернуть' : 'Показать больше'} + {expanded ? getTranslation('collapse') : getTranslation('show_more')} )} diff --git a/src/components/blocks/TextInputBlock.tsx b/src/components/blocks/TextInputBlock.tsx index 45028bf..3e4033a 100644 --- a/src/components/blocks/TextInputBlock.tsx +++ b/src/components/blocks/TextInputBlock.tsx @@ -1,6 +1,7 @@ import React, { useState, useRef } from 'react'; import styles from './TextInputBlock.module.css'; import { TextInputBlock as TextInputBlockType } from '../../types/blocks'; +import { getTranslation } from '../../constants/translations'; interface TextInputBlockProps { block: TextInputBlockType; @@ -40,7 +41,7 @@ const TextInputBlock: React.FC = ({ block, visible, onTextC