Skip to content

Installation

EhsanAzish80 edited this page Dec 15, 2025 · 1 revision

Installation Guide

Complete installation instructions for auto-translate-localizables.


Requirements

  • Python: 3.7 or higher
  • pip: Package installer for Python
  • Operating System: macOS, Linux, or Windows

Installation Methods

Method 1: Install from PyPI (Recommended)

When published to PyPI:

pip install auto-translate-localizables

Verify installation:

auto-translate-xcloc --version
# Output: auto-translate-xcloc 1.0.0

Method 2: Install from GitHub (Current)

# Clone the repository
git clone https://github.com/EhsanAzish80/Auto-Translate-localizables.git
cd Auto-Translate-localizables

# Install in editable mode
pip install -e .

Method 3: Install from Source Archive

# Download and extract the latest release
wget https://github.com/EhsanAzish80/Auto-Translate-localizables/archive/refs/tags/v1.0.0.tar.gz
tar -xzf v1.0.0.tar.gz
cd Auto-Translate-localizables-1.0.0

# Install
pip install .

Platform-Specific Instructions

macOS

# Install Python (if needed)
brew install python3

# Install package
pip3 install auto-translate-localizables

# Add to PATH (if needed)
export PATH="$HOME/Library/Python/3.11/bin:$PATH"

# Verify
auto-translate-xcloc --version

Linux (Ubuntu/Debian)

# Install Python and pip
sudo apt update
sudo apt install python3 python3-pip

# Install package
pip3 install auto-translate-localizables

# Add to PATH (if needed)
export PATH="$HOME/.local/bin:$PATH"

# Verify
auto-translate-xcloc --version

Linux (Fedora/RHEL)

# Install Python and pip
sudo dnf install python3 python3-pip

# Install package
pip3 install auto-translate-localizables

# Verify
auto-translate-xcloc --version

Windows

# Install Python from python.org
# Then install package
pip install auto-translate-localizables

# Verify
auto-translate-xcloc --version

Development Installation

For contributors or advanced users:

# Clone repository
git clone https://github.com/EhsanAzish80/Auto-Translate-localizables.git
cd Auto-Translate-localizables

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Or use the install script
./install_dev.sh

Verifying Installation

Check CLI Command

auto-translate-xcloc --version
# Expected: auto-translate-xcloc 1.0.0

auto-translate-xcloc --help
# Should show help text

Check Python Import

python3 -c "from auto_translate_localizables import XLIFFTranslator; print('✓ Import successful')"
# Expected: ✓ Import successful

Check Available Commands

Both commands should work:

auto-translate-xcloc --version
xcloc-translate --version

Dependencies

The package automatically installs these dependencies:

Required

  • deep-translator>=1.11.4 - Translation API wrapper
  • lxml>=4.9.0 - XML/XLIFF processing

Optional (GUI)

  • tkinter - Usually included with Python

Development (Optional)

  • pytest>=7.0 - Testing
  • black>=22.0 - Code formatting
  • mypy>=0.950 - Type checking

Troubleshooting Installation

Command Not Found

If auto-translate-xcloc is not found after installation:

macOS/Linux:

# Find where pip installed scripts
python3 -m pip show auto-translate-localizables

# Add to PATH
export PATH="$HOME/.local/bin:$PATH"
# Or for macOS:
export PATH="$HOME/Library/Python/3.11/bin:$PATH"

# Make permanent by adding to ~/.bashrc or ~/.zshrc
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

Windows:

# Add Python Scripts to PATH via System Environment Variables
# Or use Python module syntax:
python -m auto_translate_localizables.cli --help

Import Errors

If you get import errors:

# Reinstall dependencies
pip install -r requirements.txt --force-reinstall

# Or reinstall the package
pip install --force-reinstall auto-translate-localizables

Permission Errors

macOS/Linux:

# Use --user flag to install in user directory
pip install --user auto-translate-localizables

Windows:

# Run as administrator or use --user flag
pip install --user auto-translate-localizables

SSL Certificate Errors

# Use trusted host flag
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org auto-translate-localizables

Upgrading

Upgrade to Latest Version

pip install --upgrade auto-translate-localizables

Upgrade from GitHub

cd Auto-Translate-localizables
git pull origin main
pip install --upgrade -e .

Uninstalling

pip uninstall auto-translate-localizables

Next Steps

✅ Installation complete!


Additional Resources