Skip to main content

Droidlate

Droidlate is a lightweight, local, web-based translation workspace for Android strings.xml resource files. It features a clean, responsive, Weblate-inspired Single Page Application (SPA) designed to make translating Android applications fast, accurate, and resilient.


Core Usecases

  • Local Offline Workspace: Translate and edit local localization files on your machine. Avoid uploading sensitive resource files to third-party servers or setting up heavy server-side infrastructure.
  • Preserving XML Formatting & Comments: Standard XML parsers rewrite files, wiping out comments, custom spacing, ordering, and attributes. Droidlate's custom parsing engine performs in-place character index replacements to maintain exact XML styling, comments, structure, and formatting.
  • Tracking Outdated Translations: When developers update a base string in values/strings.xml, translations can become outdated. Droidlate normalizes and hashes base strings into a lightweight local sidecar metadata file, highlighting which target translations need updates.
  • Placeholder Verification & QA: Mismatched Java-style placeholders (e.g., %s, %1$d in the source but % d or missing in the target) cause runtime crashes on Android. Droidlate validates alignment on every keystroke and flags warnings.
  • Orphaned String Pruning: Over time, strings are deleted from the main codebase but linger in translation files. Droidlate lists these "orphaned" strings and lets you prune them with a single click.

Key Features

  • Sleek UI with Dark Mode: A modern HSL-tailored interface featuring layout toggles (especially optimized for mobile web layouts), status indicators, and translation statistics.
  • Keyboard Shortcuts: Built for productivity. Use Ctrl+S to instantly Save & Next, and Alt+1/Alt+2 to paste dynamic suggestions.
  • Auto-Translation Suggestions: Integrates with translation suggestion services (like Google Translate and MyMemory) to suggest translations on the fly.
  • Atomicity & Crash Resilience: Local updates are written to the target XML file first, then metadata sidecars second. If interrupted, the app automatically flags the key as Outdated on the next run, ensuring no state corruption.
  • Secure Server Binding: The local Flask server strictly binds to the loopback interface (127.0.0.1), ensuring your filesystem is safe from external network access.

Installation

The recommended way to install Droidlate is globally using pipx:

pipx install droidlate

Alternatively, you can install it using standard pip:

pip install droidlate

Local Development

If you want to run it from source or install in editable mode:

# Clone the repository and install dependencies
git clone https://github.com/estiaksoyeb/Droidlate.git
cd Droidlate
pip install -e .

Usage & CLI Commands

Once installed, you can launch the Droidlate workspace using the droidlate CLI command:

1. Auto-Scan Mode (Default)

Run the command in your Android project root (or near your resources). Droidlate will auto-detect typical folders like app/src/main/res/, src/main/res/, or res/:

droidlate

2. Specify Resource Directory

You can explicitly define where the Android resource directory is located:

droidlate --res-dir /path/to/android/app/src/main/res

3. Single-File Mode

To translate or edit a single pair of strings files directly:

droidlate --source app/src/main/res/values/strings.xml --target app/src/main/res/values-es/strings.xml

4. Custom Port

Run the local web server on a different port:

droidlate --port 8080

Repository Structure

├── droidlate/                     # Package root
│   ├── parser/
│   │   ├── xml_parser.py          # Expat character-level round-trip parser
│   │   └── diff_engine.py         # Hashing, validation, and status engines
│   ├── translator/
│   │   └── engine.py              # Translation Orchestrator
│   ├── web/
│   │   ├── server.py              # Flask server and local REST APIs
│   │   └── static/                # Single Page Web App (HTML, CSS, JS)
│   ├── cli_wizard.py              # CLI console loop wizard
│   └── main.py                    # Command entry point
├── pyproject.toml                 # Package configuration and script registration
├── requirements.txt               # App dependencies
└── README.md                      # This documentation

Credits


License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

droidlate-1.2.0.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

droidlate-1.2.0-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file droidlate-1.2.0.tar.gz.

File metadata

  • Download URL: droidlate-1.2.0.tar.gz
  • Upload date:
  • Size: 49.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for droidlate-1.2.0.tar.gz
Algorithm Hash digest
SHA256 4f8a9b5b6e125b3fa23393dee2bc216c09866c3a2746a4f8148ea4fe14c212c4
MD5 d464fbc9e98cd7a5ab9c00e9cd13733a
BLAKE2b-256 f77df72a51ef3e2f0a5157b40137fad0cd1780ebaf9ebbecf06ae6341a13f8b4

See more details on using hashes here.

File details

Details for the file droidlate-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: droidlate-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 52.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for droidlate-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc6730beb782b4ab938bfbae63f0ffe37fd122f3c80947e907387fe9a2c5dc7b
MD5 d2a537ba54fe4c0fb1cdf4eb63a1a407
BLAKE2b-256 4bebcf3fc8a04980d1ee406f3717f81e7c55b95a1ffd194c1adda4bd2e45ac35

See more details on using hashes here.

Release history Release notifications | RSS feed

1.2.2

2 files

1.2.1

2 files

This release

1.2.0 This release

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page