diff options
| author | Adam Soltys <[email protected]> | 2026-10-09 10:36:39 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-09 10:36:39 -0700 |
| commit | 41d7b9d4e5d0e10cdac708d9c9cd4838e47240ec (patch) | |
| tree | 767d6dffc8dc14b90c368606d8fc39c68b050fb2 /names/compose-libretranslate.yml | |
| parent | ad028dd1c61e41913e4628046b96bf162bc4ba4a (diff) | |
| download | coinosv3-41d7b9d4e5d0e10cdac708d9c9cd4838e47240ec.tar.gz coinosv3-41d7b9d4e5d0e10cdac708d9c9cd4838e47240ec.zip | |
Translation: posts in another language are shown in yours — "Translated from Spanish · Show original" under the words, automatic by default for posts the language guess calls foreign (Settings → Nostr → Translation switches it off and leaves a Translate link instead), and ⋯ → Translate for any post. The browser's on-device Translator does it when the language pair is already installed (desktop Chrome); otherwise the registrar's new POST /translate (names/translate.js): a cached, 4-at-a-time front for a LibreTranslate container on cs (names/compose-libretranslate.yml, v1.9.6, 32 languages; none for sw/mr/ta/te, so those readers get no offer). Links, nostr: mentions, :emoji:, #tags and long codes are never sent to the model — only the prose between them, batched in one call (src/translate-split.js, shared). Translations are remembered (coinos-translations, 300). tools/translate-test.js
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vps2H27rhbG9ZqseGfMrc3
Diffstat (limited to 'names/compose-libretranslate.yml')
| -rw-r--r-- | names/compose-libretranslate.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/names/compose-libretranslate.yml b/names/compose-libretranslate.yml new file mode 100644 index 0000000..80ed9c6 --- /dev/null +++ b/names/compose-libretranslate.yml @@ -0,0 +1,26 @@ +# LibreTranslate for post translation (coinos v3). Reached only by the +# names registrar over the docker network (POST /translate there); no port +# on the host, no web UI. Models live in the lt-data volume. +services: + libretranslate: + image: libretranslate/libretranslate:v1.9.6 + container_name: libretranslate + environment: + LT_LOAD_ONLY: en,es,fr,de,pt,id,tr,vi,ru,ar,ur,hi,bn,ja,ko,zh,it,nl,pl,uk,fa,he,th,sv,cs,el,ro,hu,fi,da,nb,ca + LT_DISABLE_WEB_UI: "true" + LT_CHAR_LIMIT: "5000" + LT_THREADS: "4" + LT_UPDATE_MODELS: "true" + volumes: + - lt-data:/home/libretranslate/.local + networks: [net] + deploy: + resources: + limits: + memory: 8g + restart: unless-stopped +volumes: + lt-data: +networks: + net: + external: true |
