aboutsummaryrefslogtreecommitdiffstats
path: root/src/style.css
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-09 10:36:39 -0700
committerAdam Soltys <[email protected]>2026-10-09 10:36:39 -0700
commit41d7b9d4e5d0e10cdac708d9c9cd4838e47240ec (patch)
tree767d6dffc8dc14b90c368606d8fc39c68b050fb2 /src/style.css
parentad028dd1c61e41913e4628046b96bf162bc4ba4a (diff)
downloadcoinosv3-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 'src/style.css')
-rw-r--r--src/style.css7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/style.css b/src/style.css
index 93a7da7..c80f8e0 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1610,3 +1610,10 @@ body::after {
padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer;
}
.wallet-side-amount { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
+/* "Translated from Spanish · Show original" under a post's words */
+.note-translate { margin-top: 4px; }
+.note-translate-btn {
+ background: none; border: none; padding: 0; margin: 0; font: inherit; color: var(--muted);
+ cursor: pointer; text-decoration: underline; text-underline-offset: 2px; min-height: 0;
+}
+.note-translate-btn:hover { color: var(--ink); }