How userkhalid35/codealpha_language_translation_tool works
This is a PySide6 desktop translation application. Users enter text and language choices in the window; the controller dispatches translation to a background worker, which chunks text and calls Google translation services, then returns results for display and history. The app also supports language detection/selection, searchable favorites/history, theme switching, persistent settings, and connectivity monitoring. Edges reflect shown calls or README-described behavior; some UI and worker details are only partially excerpted.
Main entry points: main_controller.py Main controller · main_window.py Translation window · translation_service.py Translation worker · main.py App bootstrap
Components 18
Application flow
- App bootstrap
main.py - Main controller
controllers/main_controller.py - Connectivity monitor
ui/main_window.py - Connectivity check
utils/helpers.py
Translation
- Translation worker
services/translation_service.py - Text chunking
services/translation_service.py - Translation service
services/translation_service.py - Google translation
- Google Client API
- Language catalog
services/translation_service.py
History and state
- App state model
models/translation_model.py - History item model
models/translation_model.py - State persistence
utils/helpers.py - Settings file
config/settings.json - History and favorites
controllers/main_controller.py
Interface
- Translation window
ui/main_window.py - Theme styles
ui/styles.py
Other components
- Desktop user
Connections 20
- Desktop user → Translation window: enters text
README.md - App bootstrap → Translation window: creates
main.py - App bootstrap → Main controller: creates
main.py - Translation window → Main controller: emits requests
controllers/main_controller.py - Main controller → Translation worker: starts worker
controllers/main_controller.py - Translation worker → Text chunking: splits input
README.md - Translation worker → Translation service: uses session
services/translation_service.py - Translation worker → Google translation: translates chunks
services/translation_service.py - Translation worker → Google Client API: falls back
services/translation_service.py - Main controller → Translation window: updates result
README.md - Translation window → Language catalog: loads language choices
ui/main_window.py - Main controller → App state model: maintains state
controllers/main_controller.py - Main controller → History item model: creates history items
controllers/main_controller.py - Main controller → History and favorites: filters and updates
controllers/main_controller.py - History and favorites → Translation window: refreshes list
controllers/main_controller.py - Main controller → State persistence: loads and saves
controllers/main_controller.py - State persistence → Settings file: reads and writes
utils/helpers.py - Translation window → Theme styles: applies theme
ui/main_window.py - Translation window → Connectivity monitor: starts checks
README.md - Connectivity monitor → Connectivity check: checks connectivity
ui/main_window.py