Skip to content

Troubleshooting

Ehsan Azish edited this page Dec 15, 2025 · 1 revision

Troubleshooting

Common Issues

Installation Issues

"No module named 'deep_translator'"

Solution:

pip3 install -r requirements.txt

Or install individually:

pip3 install deep-translator lxml

"tkinter not found" (GUI)

macOS:

brew install python-tk

Ubuntu/Debian:

sudo apt-get install python3-tk

Windows: Tkinter comes with Python - reinstall Python from python.org

Translation Issues

"No . xcloc folders found"

Cause: Workspace path is incorrect or doesn't contain localization folders

Solution:

  1. Verify your workspace path
  2. Ensure folders have .xcloc extension
  3. Check folder structure matches expected format

"XLIFF file not found"

Cause: .xcloc folder doesn't contain Localizable.xliff

Solution:

  1. Export localizations from Xcode
  2. Ensure the XLIFF file is named Localizable.xliff
  3. Check file permissions

"Translation failed" or "Network error"

Cause: Internet connection issue or Google Translate rate limiting

Solution:

  1. Check internet connection
  2. Wait a few minutes (rate limiting)
  3. Translate fewer languages at once
  4. Add delays between translations

Placeholders Not Preserved

Cause: Complex or unusual placeholder format

Solution:

  1. Review the translation log
  2. Check if placeholder format is supported
  3. Manually fix if needed
  4. Report issue on GitHub

File Permission Issues

"Permission denied" when saving

Solution:

chmod u+w /path/to/localization/folder/*. xcloc

XLIFF Validation Errors

"Invalid XLIFF structure"

Solution:

  1. Check if XLIFF was manually edited
  2. Re-export from Xcode
  3. Validate XML structure with an XML validator

Performance Issues

Slow Translation

Causes:

  • Many languages
  • Large XLIFF files
  • Network speed

Solutions:

  1. Translate fewer languages at once
  2. Use --only to target specific languages
  3. Check network connection

High Memory Usage

Solution:

  • Process one language at a time using --only
  • Close other applications

Debugging

Enable Verbose Logging

Add print statements or check the log window in GUI for detailed information.

Test with Dry Run

python3 translate_xliff.py --dry-run

This shows what would be translated without making changes.

Validate XLIFF Manually

Use an XML validator or online tool to check XLIFF structure.

Getting Help

If you can't resolve an issue:

  1. Check existing issues: GitHub Issues
  2. Create a new issue with:
    • Your Python version
    • Operating system
    • Full error message
    • Steps to reproduce
  3. Check the documentation:

Known Limitations

  • Requires internet connection
  • Rate limiting by Google Translate
  • Translation quality varies by language
  • No built-in translation memory
  • Limited support for plural forms