PollyGlot Translation Practice
AI-powered translation practice application for English, French, and Chinese with objective grading and feedback.
Overview
PollyGlot is a React application that helps users practice and improve their translation skills between English, French, and Chinese. It uses OpenAI's GPT-4o model to provide instant translations, accept user guesses, and deliver objective AI-powered feedback and grading.
Key Features
**Multi-language Support**: Translation between English, French, and Chinese**AI Translation**: Powered by OpenAI GPT-4o for accurate translations**Interactive Practice**: Users can enter their own translation guesses**Objective Grading**: AI evaluates user translations and provides scores**Feedback System**: Detailed feedback on translation accuracy and areas for improvement**Responsive UI**: Beautiful, user-friendly interface that works across devicesArchitecture
Technology Stack
**Frontend Framework**: React**AI Model**: OpenAI GPT-4o**Language Pairs**: English ↔ French ↔ ChineseCore Components
Translation input/output interfaceUser guess submission systemAI grading and feedback engineScore display and historyDevelopment Guidelines
When working on this codebase:
1. **Translation Logic**: Ensure all translation calls use GPT-4o consistently
2. **Language Support**: Maintain support for all three languages (English, French, Chinese)
3. **Grading System**: The AI grading should be objective and provide constructive feedback
4. **User Experience**: Keep the interface clean, responsive, and intuitive
5. **Error Handling**: Handle API failures gracefully, especially for OpenAI calls
6. **Performance**: Optimize API calls to minimize latency during translation and grading
API Integration
Use OpenAI's GPT-4o model for both translation and grading tasksStructure prompts to ensure consistent, objective evaluationHandle rate limits and API errors appropriatelyUI/UX Considerations
Provide clear visual feedback during translation processingDisplay grading results in an encouraging, educational mannerMake language selection intuitive and accessibleEnsure text input supports all three language character setsTesting
Test translations across all language pairsVerify grading consistency and accuracyValidate UI responsiveness across devicesTest error states and edge casesBest Practices
Keep translation prompts clear and consistentMaintain separation between translation and grading logicUse appropriate loading states for async operationsImplement proper error boundaries for API failuresConsider caching translations to reduce API costs