Vaporjawn/Klingon-Translator
React web app that translates between English and Klingon with a Star Trek-themed interface. Features text-to-speech, multiple Star Trek themes, and is perfect for fans learning the Klingon language.
๐ Klingon Universal Translator
A fully functional Star Trek-themed Klingon โ English translator built with modern web technologies. This application provides a Google Translate-inspired interface with authentic Star Trek visual design and comprehensive translation capabilities.
โญ Star this repository if you find it useful! Help us reach more Star Trek fans and developers.
๐ Project Status
- โ Active Development - Regularly maintained and updated
- ๐ Production Ready - Stable release with comprehensive testing
- ๐ฏ Open Source - MIT License, contributions welcome
- ๐ Live Demo - klingon-translator.pages.dev (Coming Soon)
- ๐ GitHub Pages - Automated deployment via GitHub Actions
โจ Features
๐ Core Translation Features
- Bidirectional Translation: English โ Klingon with intelligent fuzzy matching
- Real-time Translation: Auto-translate with 500ms delay for smooth UX
- Phonetic Pronunciations: Authentic Klingon pronunciations for all translations
- Confidence Scoring: Translation confidence indicators based on similarity algorithms
- Translation History: Maintains last 20 translations for reference
๐จ Star Trek-Themed UI
- 5 Authentic Star Trek Themes: TOS, TNG, DS9, Voyager, and Discovery color schemes
- Google Translate-Inspired Layout: Familiar, intuitive interface design
- Smooth Animations: Framer Motion animations with Star Trek-inspired effects
- Responsive Design: Works perfectly on desktop, tablet, and mobile devices
- Gradient Effects: Subtle Star Trek-inspired background gradients and glowing elements
๐ Audio Features
- Text-to-Speech: Native browser speech synthesis for both languages
- Star Trek Sound Effects: Authentic beeps and chimes during translation
- Voice Customization: Deeper, slower voice settings for Klingon pronunciation
- Audio Controls: Play, pause, and control audio output
๐ฏ Technical Excellence
- Enterprise-Grade Architecture: Modular, maintainable TypeScript codebase
- Type Safety: 100% TypeScript with strict mode enabled
- Modern React Patterns: Hooks, custom hooks, and functional components
- Performance Optimized: Lazy loading, memoization, and efficient re-renders
- Error Handling: Comprehensive error boundaries and user feedback
๐ Quick Start
Prerequisites
- Node.js 18+ and npm
- Modern browser with Speech Synthesis API support
Installation
-
Clone the repository
git clone https://github.com/your-username/klingon-translator.git cd klingon-translator -
Install dependencies
npm install
-
Start development server
npm run dev
-
Open your browser
http://localhost:5173
Build for Production
npm run build
npm run preview # Preview production build๐ ๏ธ Technology Stack
Core Technologies
- โ๏ธ React 19.1.1 - Modern React with latest features
- ๐ TypeScript - Type-safe development with strict mode
- โก Vite 7.1.12 - Lightning-fast build tool with experimental rolldown
- ๐จ Material-UI v6 - Complete Material Design component library
- ๐ฌ Framer Motion - Smooth, performant animations
Architecture Highlights
- ๐๏ธ Enterprise Project Structure - Organized by feature modules
- ๐ฏ Custom Hooks - Reusable translation and speech logic
- ๐จ Theme System - 5 Star Trek variant themes with complete customization
- ๐ Translation Engine - Advanced fuzzy matching with Levenshtein distance
- ๐ Audio Services - Web Speech API integration with Star Trek effects
๐ Usage Guide
Basic Translation
- Select Languages: Choose source and target languages from dropdowns
- Enter Text: Type or paste text in the input area
- Auto-Translate: Translation appears automatically after 500ms
- Manual Translate: Use the floating action button for immediate translation
Language Swapping
- Click the swap icon (๐) between language selectors
- Instantly reverses translation direction and swaps text
Audio Features
- ๐ Listen: Click volume icons to hear pronunciations
- ๐ต Sound Effects: Enjoy Star Trek-inspired translation sounds
- โธ๏ธ Control: Audio stops automatically or can be manually controlled
Advanced Features
- ๐ฑ Mobile Responsive: Works seamlessly on all device sizes
- โจ๏ธ Keyboard Shortcuts: Efficient keyboard navigation
- ๐จ Theme Variants: Experience different Star Trek eras (TNG default)
- ๐ Translation History: Access your recent translations
๐ Klingon Dictionary
Our translator includes 50+ authentic Klingon words and phrases:
Essential Phrases
- Qapla' - Success! / Goodbye
- nuqneH - What do you want? (greeting)
- yIjah - Beam me up
- Heghlu'meH QaQ jajvam - Today is a good day to die
Common Words
- jup - friend
- jagh - enemy
- nugh - society
- wo' - empire
- DIch - true/certain
Battle Terms
- yoDlu' - battle stations
- HIv - attack
- Hub - defend
- SeHwI' - controller
And many more! The dictionary includes phonetic pronunciations, parts of speech, and example usage for each entry.
๐จ Star Trek Theme Variants
๐ Available Themes
- TOS (The Original Series) - Classic 1960s gold and red
- TNG (The Next Generation) - Modern blue and gold (default)
- DS9 (Deep Space Nine) - Deep space purples and teals
- VOY (Voyager) - Exploration blues and silvers
- DISCO (Discovery) - Contemporary copper and blue
Theme Features
- Authentic Color Palettes - Based on actual Star Trek UI designs
- Component Overrides - Custom Material-UI styling for each theme
- Gradient Backgrounds - Subtle animated backgrounds
- Glow Effects - Futuristic lighting effects on interactive elements
๐๏ธ Project Architecture
src/
โโโ components/ # React components
โ โโโ TranslatorInterface.tsx
โโโ hooks/ # Custom React hooks
โ โโโ useTranslation.ts
โโโ services/ # Business logic services
โ โโโ translationService.ts
โ โโโ speechService.ts
โโโ theme/ # Star Trek theme system
โ โโโ starTrekTheme.ts
โโโ data/ # Static data
โ โโโ klingonDictionary.ts
โโโ types/ # TypeScript definitions
โ โโโ index.ts
โโโ utils/ # Utility functions
Key Components
- TranslatorInterface: Main UI component with Google Translate-like layout
- useTranslation: Hook managing translation state and logic
- useSpeech: Hook handling audio synthesis and playback
- TranslationService: Core translation engine with fuzzy matching
- SpeechService: Text-to-speech with Star Trek sound effects
- StarTrekTheme: Complete theme system with 5 variant themes
๐ง Development
Scripts
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run type-check # TypeScript type checkingCode Quality
- ESLint + Prettier - Consistent code formatting
- TypeScript Strict Mode - Maximum type safety
- Performance Monitoring - Bundle size analysis
- Modern React Patterns - Hooks, functional components
๐บ๏ธ Project Roadmap
๐ Version 1.0 (Current)
- โ Core translation functionality
- โ Star Trek themed UI with 5 theme variants
- โ Text-to-Speech with pronunciation
- โ Google Translate-inspired interface
- โ Responsive design for all devices
- โ Translation confidence scoring
- โ Sound effects and animations
๐ฏ Version 1.1 (Next Release)
- ๐ Enhanced Dictionary - Expand to 100+ Klingon terms
- ๐ Grammar Analysis - Basic Klingon grammar checking
- ๐ Phrase Builder - Common phrase construction assistant
- ๐ Voice Recognition - Speech-to-text for both languages
- ๐ Offline Mode - Progressive Web App capabilities
- ๐ Keyboard Shortcuts - Advanced accessibility features
๐ Version 1.2 (Future)
- ๐ Translation History - Persistent storage and export
- ๐จ Custom Themes - User-created theme variants
- ๐ฑ Mobile App - React Native companion app
- ๐ค AI Translation - Machine learning improvements
- ๐ Multi-Language - Support for additional alien languages
- ๐ฅ Community Dictionary - User-contributed translations
๐ฎ Long Term Vision
- ๐ฎ Language Learning Game - Interactive Klingon lessons
- ๐ฃ๏ธ Conversation Mode - Real-time voice translation
- ๐ Cultural Context - Star Trek universe integration
- ๐ญ Character Voices - Voice synthesis with Star Trek characters
- ๐ Federation Languages - Vulcan, Romulan, and more
๐ค Contributing
We welcome contributions from Star Trek fans and developers alike! Here's how to get started:
๐ Quick Contribution Guide
- โญ Star this repository to show your support
- ๐ด Fork the repository
- ๐ฟ Create a feature branch:
git checkout -b feature/amazing-feature - ๐ Read our Contributing Guidelines for detailed instructions
- โจ Make your changes following our coding standards
- ๐งช Add tests for new functionality
- ๐พ Commit changes:
git commit -m 'Add amazing feature' - ๐ค Push to branch:
git push origin feature/amazing-feature - ๐ Open a Pull Request using our PR template
๐ฏ What We're Looking For
- ๐ Dictionary Contributions - Add new Klingon words and phrases
- ๐จ UI/UX Improvements - Enhance the Star Trek experience
- ๐ Audio Enhancements - Better pronunciation and sound effects
- ๐ฑ Accessibility Features - Make it work for everyone
- ๐งช Testing - Unit tests, integration tests, E2E tests
- ๐ Documentation - Code comments, README improvements
- ๐ Bug Fixes - Help us maintain quality
- ๐ง Performance Optimizations - Keep it fast and smooth
๐ฅ Recognition
All contributors are recognized in our Contributors Hall of Fame and in release notes!
๐ก๏ธ Code of Conduct
By participating, you agree to abide by our Code of Conduct. We're committed to making this a welcoming space for all Star Trek fans and developers.
๐ Contribution Guidelines
- ๐ TypeScript Required - Follow strict mode requirements
- ๐จ Code Style - Maintain existing patterns and use Prettier
- ๐งช Testing - Add appropriate tests for new features
- ๐ Documentation - Update docs for significant changes
- โ Quality Gates - Ensure all builds pass before submitting
- ๐ Security - Follow our security policy for vulnerabilities
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๏ฟฝโ๐ป Author
Created by vaporjawn
This project was built with passion for Star Trek and modern web development technologies. Feel free to reach out for questions, suggestions, or collaboration opportunities!
๏ฟฝ๐ Acknowledgments
- Star Trek Universe - For inspiring this project and the Klingon language
- Klingon Language Institute - For maintaining authentic Klingon linguistics
- Material-UI Team - For the excellent component library
- React Community - For the amazing ecosystem and tools
- Vite Team - For the incredibly fast development experience
Live Long and Prosper ๐
May this translator serve you well on your journey through the final frontier.
Copyright ยฉ 2025 vaporjawn. All rights reserved.