Middle
Functional requirements Text translation function Input field for text with a volume of 1-400 characters Translation is displayed in the right field after 1 second of user inactivity Translation into English should accurately convey the meaning of the original text Language detection system When entering text in Russian, the system automatically: • Detects the source language as Russian • Sets the translation language to English When entering text in English, the system automatically: • Detects the source language as English • Sets the translation language to Russian Managing the word collection Adding to the collection: Button "Add to collection" is available next to the translated text On click, a confirmation appears: "Translation added to the 'Favorites' collection" The element appears in the "Collection" tab Removing from the collection: Button "Remove from collection" is available for each item in the collection On click, a confirmation appears: "Removed from 'Favorites'" The element is immediately removed from the collection Document translation Supported formats: DOCX documents in Russian Upload process: Navigate to the "Documents" tab Select a file via the "Choose manually" element Processing time: up to 2 minutes Translation result: Status "Document translation completed" Active button "Download translation" Download the file with the original name The file content contains a correct translation into English
sobes.tech AI
Answer from AI
To implement the described system, the following functional blocks must be provided:
- Text translation function:
- Input field with a length limit of 1-400 characters.
- User inactivity tracking (1-second timer) to trigger translation.
- Translate text while preserving meaning (use a quality translator, e.g., Google Translate API or a custom model).
- Language detection:
- Automatically detect the language (Russian or English) when text is entered.
- Set the translation language depending on the source language (Russian → English, English → Russian).
- Language detection can be implemented using libraries such as langdetect.
- Word collection management:
- "Add to collection" button next to the translation.
- Show confirmation upon adding and save the item in the "Collection" tab.
- In the "Collection" tab, each item has a "Remove from collection" button with confirmation and immediate removal.
- Document translation:
- Support uploading DOCX files in Russian.
- Interface for selecting files in the "Documents" tab.
- Process the file (up to 2 minutes) with content translation.
- After completion, display the status "Document translation completed" and an active "Download translation" button.
- The downloadable file should retain the original name and contain a correct English translation.
For testing:
- Verify translation accuracy with different input languages.
- Check the inactivity timer functionality.
- Verify adding and removing items from the collection with confirmation displays.
- Test uploading, processing, and downloading translated documents.
This approach will ensure compliance with functional requirements and user convenience.