Skip to content

Add script to auto-translate missing keys in translation files #788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 28, 2025

Conversation

Ahmed-Nagi1
Copy link
Contributor

  • Added a Python script that compares en.json and any other translation file in /locales.
  • The script finds missing keys in the target file, translates their values using Google Translate (web scraping), and inserts the translations automatically.
  • Translations are processed in parallel for speed.
  • Output is colorized using colorama for better clarity (missing keys in yellow, translations in cyan/magenta, errors in red, success in green).
  • A backup of the target file is created before updating.

Also updated ar.json with new auto-translated keys.

@yeongpin
Copy link
Owner

why dont use python google trans?

… handling, and improve language code mapping. Introduce interactive menu for processing language files and backup options. Update Bulgarian, Japanese, and Chinese translations with new keys and improved error messages.
@yeongpin yeongpin merged commit 0e4d918 into yeongpin:main Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants