Skip to content

Translating

TailSocks is translated on Hosted Weblate. Translators work in the browser, with machine suggestions to start from; Weblate sends the result back to this repository as pull requests. English is the source, Russian is maintained alongside it, and every other language comes from Weblate.

Open the project on Hosted Weblate, pick a language (or start a new one) and translate. Strings that are brand or protocol names — Taildrop, Taildrive, MagicDNS, DNS, Serve, Funnel — and technical placeholders such as addresses are marked non-translatable and do not appear.

A few conventions:

  • Keep placeholders exactly: %1$s, %2$d, \n.
  • Keep it short. Explanations on screen are folded to one or two lines; a translation twice the length of the English is cut off.
  • “Tailscale” and its product names stay as they are; the app is an unofficial client, never “the Tailscale app”.
  1. Create the project on hosted.weblate.org → Add new translation project. Name TailSocks, slug tailsocks, website the GitHub repository. Translation licence: BSD-3-Clause, the code’s own — the default, Proprietary, rules out the free Libre plan. The project starts in a trial; once it exists, ask for the Libre plan (public, libre-licensed projects) from its billing page.

  2. Main component, From version control:

    • Repository: https://github.com/bropines/tailsocks.git, branch main.
    • Version control: GitHub pull request. Afterwards accept the offer to move the component to the Hosted Weblate GitHub app: it pushes translation branches and opens pull requests, so nothing lands on main unreviewed.
    • File format: Android String Resource.
    • File mask: app/src/main/res/values-*/strings.xml
    • Monolingual base language file: app/src/main/res/values/strings.xml
    • Template for new translations: the same base file. Language code style: Android.
  3. The other string files — screens keep their strings in strings_<area>.xml next to strings.xml. Add the Component discovery add-on to the main component:

    • Regular expression: app/src/main/res/values-(?P<language>[^/]*)/(?P<component>strings_[^/]*)\.xml
    • Component name: {{ component }}
    • Base file: app/src/main/res/values/{{ component }}.xml, also as the template for new translations.
    • File format: Android String Resource.
  4. Notifications of new pushes come through the GitHub app. Only without it: this repository’s Settings → Webhooks → Add webhook, payload URL https://hosted.weblate.org/hooks/github/, content type application/json, just the push event.

  5. Add-ons worth enabling: Cleanup translation files (drops strings the source removed) and Squash Git commits (one commit per language per PR).

  6. Badge for the README once the project exists:

    [![Translation status](https://hosted.weblate.org/widget/tailsocks/svg-badge.svg)](https://hosted.weblate.org/engage/tailsocks/)

Add every new string in English to values/ and in Russian to values-ru/; Weblate carries the rest. Give a screen with many strings its own strings_<area>.xml rather than growing strings.xml. Mark a string translatable="false" only when it is not language at all: a brand or protocol name, an address, a format with no words.