Skip to content

Offline translation of cache descriptions (Argos Translate) #672

Description

@AgreeDK

Problem Statement

When traveling abroad, a large share of caches are only listed in the local language. Many users would benefit from being able to translate a cache's description into their own UI language directly inside OpenSAK — without requiring an internet connection in the field, and without any per-use cost.

Proposed Solution

Proposal: Argos Translate

Argos Translate is an open-source, offline machine translation library for Python (MIT-compatible, based on OpenNMT/CTranslate2). Key properties relevant to OpenSAK:

Fully offline once language packages are downloaded — no API key, no ongoing cost, no internet required at translation time
Runs locally on CPU, translation itself is fast (well under a second per paragraph on typical hardware)
Language packages ("argosmodels") are ~50–200 MB per pair and are downloaded once, then reused indefinitely
Not every language pair exists directly; Argos automatically pivots through an intermediate language (e.g. de → en → da) when no direct pair is installed, at some cost to translation quality
Translation quality is decent — good enough to understand what a cache is about, hints, and warnings — but noticeably below commercial engines like Google Translate or DeepL

This was manually tested against real German cache description text with acceptable results (via de → en → da pivoting, since no direct de → da package exists).

Why not a commercial API (Google Cloud Translation / DeepL)?
Google Cloud Translation API gives much better quality (500,000 chars/month free tier, permanent), but requires every user to set up their own Google Cloud project with billing enabled and an API key — meaningful setup friction for a free open-source app, plus a hard internet dependency
DeepL's API Free tier has been discontinued; only a one-time 1M character development/evaluation grant remains, not a recurring free allowance — no longer viable for production use at no cost
Unofficial "free" wrappers around Google's web translator violate Google's ToS and can break or get IP-blocked without notice — not something to ship in a distributed app

Argos Translate is the only option that is both genuinely free on an ongoing basis and works fully offline, which matters for a geocaching app used in areas with poor or no mobile coverage.

Proposed implementation

  1. Language package management (Settings)
    New "Offline Translation" section in Settings
    List of available source languages with install/remove controls per language pair
    Packages should be downloaded ahead of time (e.g. before a trip, on reliable Wi-Fi) — not silently in the background
    Show installed size and allow removal to free disk space
  2. Translation action (Cache detail view)
    "Translate description" button/action on the cache detail panel
    Detects cache listing language if possible, otherwise lets the user pick source language manually
    Runs translation locally, no network call
  3. Storage
    Add fields to the cache model, e.g.:
    translated_description (text)
    translation_source_lang / translation_target_lang
    translation_locked (bool)
    translation_locked follows the same pattern as the existing "lock cache against import overwrite" mechanism: once a cache has a stored translation, re-importing GPX/PQ data must not overwrite it
    A small indicator (icon/badge) shown on the cache to signal a stored translation exists, similar to the existing corrected-coordinates warning triangle
  4. Open questions for discussion
    Should translated text be stored in a separate field (keeping the original description untouched), or should it be shown as an alternate view/tab? (Leaning towards a separate field + toggle, to preserve the original at all times.)
    Should the language package list be bundled with a subset of common languages by default, or fully opt-in/on-demand?
    Do we want auto-detection of the source language, or always let the user pick explicitly?
    Should translation apply only to the long description, or also short description / hints / logs?
    References
    GitHub: https://github.com/argosopentech/argos-translate
    Website/docs: https://www.argosopentech.com/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions