From 8e850ebfbd06de43f24ca35536aa60847d92ada9 Mon Sep 17 00:00:00 2001 From: Nic Date: Mon, 20 Jul 2026 09:40:20 +0100 Subject: [PATCH 1/6] feat(i18n): localize the extension UI in 18 languages (V2-537) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add multi-language support to ant-webex. The extension was previously English-only with every string hardcoded in the popup/onboarding HTML and TS. Approach: Hybrid — a hand-rolled runtime dictionary (no framework; the extension stays dependency-free) for all in-UI strings, plus native `_locales`/`__MSG__` for the one thing a runtime dictionary can't localize: the store-listing description (Chrome Web Store / Firefox AMO). The product name "Autonomi" stays untranslated. - src/i18n/index.ts: t() with {name} interpolation + _one/_many plurals, locale resolution (chrome.storage override -> navigator.language -> en), normalizeLocale / NATIVE_LOCALE_NAMES / RTL_LOCALES ported from ant-ui. - 18 runtime catalogs (en source of truth; 17 machine-translated baselines flagged _translator_notes for native-speaker review). Shared UI atoms are copied verbatim from the ant-ui desktop app so the two read identically. - Popup + onboarding marked with data-i18n*; dynamic strings routed through t()/tc(). Per-OS terminal copy moved from constants.ts into the catalog. - Language picker in popup Settings (System default + all 18 in native script). - Content script: bundled string subset (follows browser UI language), regenerated from the locale files on every build. - RTL: for ar/he + logical CSS properties. - build.mjs copies both string stores into dist/ and dist-firefox/. - CONTRIBUTING-i18n.md for translators. Verified: typecheck clean; build:all (Chrome + Firefox) green; structural validation 18/18 (key parity, placeholders, atoms); web-ext lint on the Firefox dist has 0 errors. Co-Authored-By: Claude Opus 4.8 (1M context) --- CONTRIBUTING-i18n.md | 139 ++++++++++++++++++++++ build.mjs | 45 ++++++- src/_locales/ar/messages.json | 6 + src/_locales/bg/messages.json | 6 + src/_locales/de/messages.json | 6 + src/_locales/en/messages.json | 6 + src/_locales/es/messages.json | 6 + src/_locales/fr/messages.json | 6 + src/_locales/he/messages.json | 6 + src/_locales/id/messages.json | 6 + src/_locales/ja/messages.json | 6 + src/_locales/ko/messages.json | 6 + src/_locales/nl/messages.json | 6 + src/_locales/pt-BR/messages.json | 6 + src/_locales/ru/messages.json | 6 + src/_locales/tr/messages.json | 6 + src/_locales/uk/messages.json | 6 + src/_locales/vi/messages.json | 6 + src/_locales/zh_CN/messages.json | 6 + src/_locales/zh_TW/messages.json | 6 + src/content/i18n.ts | 26 +++++ src/content/renderer.ts | 21 ++-- src/i18n/content-locales.json | 182 +++++++++++++++++++++++++++++ src/i18n/index.ts | 193 +++++++++++++++++++++++++++++++ src/i18n/locales/ar.json | 116 +++++++++++++++++++ src/i18n/locales/bg.json | 116 +++++++++++++++++++ src/i18n/locales/de.json | 116 +++++++++++++++++++ src/i18n/locales/en.json | 115 ++++++++++++++++++ src/i18n/locales/es.json | 116 +++++++++++++++++++ src/i18n/locales/fr.json | 116 +++++++++++++++++++ src/i18n/locales/he.json | 116 +++++++++++++++++++ src/i18n/locales/id.json | 116 +++++++++++++++++++ src/i18n/locales/ja.json | 116 +++++++++++++++++++ src/i18n/locales/ko.json | 116 +++++++++++++++++++ src/i18n/locales/nl.json | 116 +++++++++++++++++++ src/i18n/locales/pt-BR.json | 116 +++++++++++++++++++ src/i18n/locales/ru.json | 116 +++++++++++++++++++ src/i18n/locales/tr.json | 116 +++++++++++++++++++ src/i18n/locales/uk.json | 116 +++++++++++++++++++ src/i18n/locales/vi.json | 116 +++++++++++++++++++ src/i18n/locales/zh-CN.json | 116 +++++++++++++++++++ src/i18n/locales/zh-TW.json | 116 +++++++++++++++++++ src/manifest.json | 3 +- src/onboarding/index.html | 69 +++++------ src/onboarding/index.ts | 120 ++++++++++--------- src/popup/index.html | 106 ++++++++--------- src/popup/index.ts | 143 ++++++++++++++++------- src/popup/style.css | 8 +- src/shared/constants.ts | 9 +- src/types/chrome.d.ts | 1 + 50 files changed, 3051 insertions(+), 209 deletions(-) create mode 100644 CONTRIBUTING-i18n.md create mode 100644 src/_locales/ar/messages.json create mode 100644 src/_locales/bg/messages.json create mode 100644 src/_locales/de/messages.json create mode 100644 src/_locales/en/messages.json create mode 100644 src/_locales/es/messages.json create mode 100644 src/_locales/fr/messages.json create mode 100644 src/_locales/he/messages.json create mode 100644 src/_locales/id/messages.json create mode 100644 src/_locales/ja/messages.json create mode 100644 src/_locales/ko/messages.json create mode 100644 src/_locales/nl/messages.json create mode 100644 src/_locales/pt-BR/messages.json create mode 100644 src/_locales/ru/messages.json create mode 100644 src/_locales/tr/messages.json create mode 100644 src/_locales/uk/messages.json create mode 100644 src/_locales/vi/messages.json create mode 100644 src/_locales/zh_CN/messages.json create mode 100644 src/_locales/zh_TW/messages.json create mode 100644 src/content/i18n.ts create mode 100644 src/i18n/content-locales.json create mode 100644 src/i18n/index.ts create mode 100644 src/i18n/locales/ar.json create mode 100644 src/i18n/locales/bg.json create mode 100644 src/i18n/locales/de.json create mode 100644 src/i18n/locales/en.json create mode 100644 src/i18n/locales/es.json create mode 100644 src/i18n/locales/fr.json create mode 100644 src/i18n/locales/he.json create mode 100644 src/i18n/locales/id.json create mode 100644 src/i18n/locales/ja.json create mode 100644 src/i18n/locales/ko.json create mode 100644 src/i18n/locales/nl.json create mode 100644 src/i18n/locales/pt-BR.json create mode 100644 src/i18n/locales/ru.json create mode 100644 src/i18n/locales/tr.json create mode 100644 src/i18n/locales/uk.json create mode 100644 src/i18n/locales/vi.json create mode 100644 src/i18n/locales/zh-CN.json create mode 100644 src/i18n/locales/zh-TW.json diff --git a/CONTRIBUTING-i18n.md b/CONTRIBUTING-i18n.md new file mode 100644 index 0000000..a71aa67 --- /dev/null +++ b/CONTRIBUTING-i18n.md @@ -0,0 +1,139 @@ +# Contributing translations + +Thanks for helping localize the **Autonomi** browser extension (`ant-webex`). +This guide covers adding a new locale and polishing existing translations. + +## TL;DR + +- UI strings live in [`src/i18n/locales/.json`](./src/i18n/locales/) and are + loaded at runtime by [`src/i18n/index.ts`](./src/i18n/index.ts). +- English (`en.json`) is the source of truth — every other locale mirrors its + structure. +- Most non-English locales ship as **machine-translated baselines** (flagged + with `_translator_notes`). Native speakers are very welcome to polish them + via PR. +- Currently shipped: `en, ja, ko, nl, fr, bg, es, ar, he, ru, uk, zh-CN, + zh-TW, pt-BR, tr, vi, id, de` (18 locales). + +## How i18n is wired (two string stores) + +The extension is dependency-free — there is no i18n framework. Strings live in +two places, both copied into `dist/` and `dist-firefox/` by `build.mjs`: + +1. **Runtime dictionary — `src/i18n/locales/.json`.** Powers every string + in the popup and onboarding page. Fetched at page load from the packaged + assets and applied by `t()` / `applyStaticTranslations()`. This is where + ~95% of the copy lives and where almost all translation happens. + +2. **Native store listing — `src/_locales//messages.json`.** A single key, + `extDescription`, referenced from the manifest as `__MSG_extDescription__`. + This is the *only* thing a runtime dictionary can't localize: the extension + description shown in the browser and on the Chrome Web Store / Firefox AMO + listing (read from the manifest before any JS runs). The product **name** + ("Autonomi") is intentionally left untranslated. + + > Note the folder-name convention: Chinese uses **underscore** directory + > names here — `_locales/zh_CN/` and `_locales/zh_TW/` — even though the + > runtime dictionary uses hyphens (`zh-CN.json`, `zh-TW.json`). That's the + > `chrome.i18n` requirement, not a typo. + +### Content-script strings + +A small subset (the in-page Download/Open link labels and the "Failed to load" +overlay) is bundled into the content script from the `content` section of each +locale file — see `src/i18n/content-locales.json`, which `build.mjs` +**regenerates on every build**; don't hand-edit it. Edit the `content.*` keys in +the per-locale files instead. + +The content script follows the **browser UI language** (`navigator.language`); +the in-popup language override governs the extension's own pages (popup + +onboarding) but not content-script labels injected into arbitrary web pages. + +## Conventions + +Each locale file is one JSON object grouped by area (`popup.*`, `onboarding.*`, +`guide.*`, `install.*`, `downloads.*`, `settings.*`, `content.*`, `common.*`). +Keys are dotted paths used as `t('popup.no_downloads')`. + +- **Placeholders** are written `{name}` and must be preserved verbatim: + `{min} {version} {url} {os} {instr} {file} {pct} {received} {total} {asset} + {platform}`. +- **Plurals** (should any be added) use suffixed keys `*_one` / `*_many`, chosen + by the caller via `t(key, { count })` — not a `|` plural syntax. +- **Don't translate identifiers.** Keep verbatim: `Autonomi`, `antd`, + `autonomi://`, `--cors`, `GitHub`, `PowerShell`, `Terminal`, `PATH`, + `macOS`/`Windows`/`Linux`, key names (`Win`, `Enter`, `Cmd+Space`, + `Ctrl+Alt+T`), the literal shell message `"command not found"`, the 🎉 emoji, + and version/number tokens. +- **Shared atoms** (`common.download`, `common.save`, `common.connected`, + `common.checking`, `common.downloading`, `common.settings`, + `common.downloads`) are copied verbatim from the sibling `ant-ui` desktop app + so the two products read identically. Please keep them in sync rather than + re-translating. + +## Right-to-left (RTL) locales + +Arabic (`ar`) and Hebrew (`he`) ship as RTL baselines. Direction is wired +through two pieces: + +- **`src/i18n/index.ts`** — the `RTL_LOCALES` set, applied as `` + in `initI18n()`. Add new RTL locale codes here. +- **Logical CSS** — layout uses flex/gap (mirrors automatically) plus logical + properties (`margin-inline-start/end`) rather than physical `margin-left/ + right`, so it flips with `dir`. When adding CSS, prefer logical properties. + +Known minor follow-up (functional, not blocking): the indeterminate +download-progress shimmer keyframe in `popup/style.css` animates a physical +`margin-left` and doesn't mirror in RTL. It's a decorative sweep; migrate it to +a direction-aware pair opportunistically. + +## Backend error passthrough (carve-out) + +Technical error detail produced by the daemon/browser (e.g. the text after +"Failed:" in the downloads list, or after "Failed to load from Autonomi:") stays +in English — the source emits it as a pre-formatted string. Only the leading +label is localized. Please leave the appended detail alone; a later phase can +switch the source to structured error tokens. + +## Adding a new locale + +1. **Copy `en.json` to `src/i18n/locales/.json`.** Use the ISO 639-1 code + (`fr`, `de`, …) or an IETF tag where the region matters (`pt-BR`, `zh-TW`). +2. **Add `_translator_notes` as the first key** if the baseline is + machine-translated: + ```json + { "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", "common": { … } } + ``` + Keys starting with `_` are documentation-only — never consumed at runtime. +3. **Translate the values**, leaving every key path intact and in order (diffing + against `en.json` is the fastest way to find gaps). +4. **Register the code** in `SUPPORTED_LOCALES` (and `NATIVE_LOCALE_NAMES`, and + `RTL_LOCALES` if applicable) in `src/i18n/index.ts`. The Settings → Language + picker is populated from `SUPPORTED_LOCALES` automatically. +5. **Add the store-listing description** at + `src/_locales//messages.json` (underscore directory names for Chinese — + `zh_CN`, `zh_TW`). +6. **Rebuild and verify** (below), then open a PR noting whether the source is + machine-translated or human-authored. + +## Testing locally + +``` +npm run build:all # builds dist/ (Chrome) and dist-firefox/ (Firefox) +npm run typecheck +``` + +Load `dist/` as an unpacked extension (chrome://extensions → Load unpacked). +To exercise a specific locale, set your browser's UI language, or open the popup +and pick a language from **Settings → Language** (this persists an override in +`chrome.storage.local`, independent of the browser language). For RTL, pick +Arabic or Hebrew and confirm the layout mirrors. + +## Review + +Structural changes (new keys, plurals, renames) are reviewed on the English +side. Translation-only PRs get a lighter review — if you self-identify as a +native or fluent speaker, that's enough. Partial polish is welcome; you don't +have to review the whole file. + +Thanks again for the help. diff --git a/build.mjs b/build.mjs index 3055124..da62fba 100644 --- a/build.mjs +++ b/build.mjs @@ -1,5 +1,13 @@ import * as esbuild from 'esbuild'; -import { copyFileSync, mkdirSync, cpSync, existsSync, readFileSync, writeFileSync } from 'fs'; +import { + copyFileSync, + mkdirSync, + cpSync, + existsSync, + readFileSync, + writeFileSync, + readdirSync, +} from 'fs'; import { resolve, dirname } from 'path'; import { fileURLToPath } from 'url'; @@ -45,7 +53,41 @@ function buildManifest() { writeFileSync(dist('manifest.json'), JSON.stringify(merged, null, 2)); } +/** + * Regenerate src/i18n/content-locales.json from the `content` section of every + * locale file, so the content script can bundle its (small) string subset + * without fetching packaged assets. The per-locale files stay the single + * source of truth; this artifact is committed only so `tsc` resolves the + * import — it's rewritten on every build. + */ +function generateContentLocales() { + const localesDir = src('i18n/locales'); + const out = {}; + for (const file of readdirSync(localesDir)) { + if (!file.endsWith('.json')) continue; + const lang = file.slice(0, -'.json'.length); + const catalog = JSON.parse(readFileSync(resolve(localesDir, file), 'utf-8')); + if (catalog.content) out[lang] = catalog.content; + } + writeFileSync( + src('i18n/content-locales.json'), + JSON.stringify(out, null, 2) + '\n', + ); +} + +/** Copy both locale stores into a dist: native _locales (manifest __MSG__ + * fields) and the runtime dictionary fetched by popup/onboarding. */ +function copyLocaleAssets() { + if (existsSync(src('_locales'))) { + cpSync(src('_locales'), dist('_locales'), { recursive: true }); + } + cpSync(src('i18n/locales'), dist('i18n/locales'), { recursive: true }); +} + async function build() { + // Must run before esbuild bundles content/index.ts, which imports the + // generated content-locales.json. + generateContentLocales(); await Promise.all([ esbuild.build({ ...commonOptions, @@ -74,6 +116,7 @@ async function build() { ]); buildManifest(); + copyLocaleAssets(); copyFileSync(src('popup/index.html'), dist('popup/index.html')); copyFileSync(src('popup/style.css'), dist('popup/style.css')); copyFileSync(src('onboarding/index.html'), dist('onboarding/index.html')); diff --git a/src/_locales/ar/messages.json b/src/_locales/ar/messages.json new file mode 100644 index 0000000..764879c --- /dev/null +++ b/src/_locales/ar/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "نزّل وشاهد المحتوى من شبكة Autonomi اللامركزية مباشرةً في متصفحك", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/bg/messages.json b/src/_locales/bg/messages.json new file mode 100644 index 0000000..edc16d2 --- /dev/null +++ b/src/_locales/bg/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Изтегляйте и преглеждайте съдържание от децентрализираната мрежа Autonomi директно във вашия браузър", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/de/messages.json b/src/_locales/de/messages.json new file mode 100644 index 0000000..422ae52 --- /dev/null +++ b/src/_locales/de/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Laden Sie Inhalte aus dem dezentralen Autonomi-Netzwerk herunter und zeigen Sie sie direkt in Ihrem Browser an", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json new file mode 100644 index 0000000..6598bd4 --- /dev/null +++ b/src/_locales/en/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Download and view content from the Autonomi decentralized network directly in your browser", + "description": "Extension description shown in the browser and on the Chrome Web Store / Firefox AMO listing. The product name 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/es/messages.json b/src/_locales/es/messages.json new file mode 100644 index 0000000..6752b54 --- /dev/null +++ b/src/_locales/es/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Descarga y visualiza contenido de la red descentralizada Autonomi directamente en tu navegador", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/fr/messages.json b/src/_locales/fr/messages.json new file mode 100644 index 0000000..a60f5b2 --- /dev/null +++ b/src/_locales/fr/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Téléchargez et consultez le contenu du réseau décentralisé Autonomi directement dans votre navigateur", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/he/messages.json b/src/_locales/he/messages.json new file mode 100644 index 0000000..13d4bc1 --- /dev/null +++ b/src/_locales/he/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "הורד וצפה בתוכן מרשת Autonomi המבוזרת ישירות בדפדפן שלך", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/id/messages.json b/src/_locales/id/messages.json new file mode 100644 index 0000000..b40c26b --- /dev/null +++ b/src/_locales/id/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Unduh dan lihat konten dari jaringan terdesentralisasi Autonomi langsung di browser Anda", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/ja/messages.json b/src/_locales/ja/messages.json new file mode 100644 index 0000000..52c75e5 --- /dev/null +++ b/src/_locales/ja/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Autonomi 分散型ネットワークのコンテンツを、ブラウザで直接ダウンロードして表示します", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/ko/messages.json b/src/_locales/ko/messages.json new file mode 100644 index 0000000..83b581e --- /dev/null +++ b/src/_locales/ko/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Autonomi 분산 네트워크의 콘텐츠를 브라우저에서 바로 다운로드하고 볼 수 있습니다", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/nl/messages.json b/src/_locales/nl/messages.json new file mode 100644 index 0000000..8e10efe --- /dev/null +++ b/src/_locales/nl/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Download en bekijk inhoud van het gedecentraliseerde Autonomi-netwerk rechtstreeks in uw browser", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/pt-BR/messages.json b/src/_locales/pt-BR/messages.json new file mode 100644 index 0000000..d743735 --- /dev/null +++ b/src/_locales/pt-BR/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Baixe e visualize conteúdo da rede descentralizada Autonomi diretamente no seu navegador", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/ru/messages.json b/src/_locales/ru/messages.json new file mode 100644 index 0000000..4843fd1 --- /dev/null +++ b/src/_locales/ru/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Скачивайте и просматривайте контент из децентрализованной сети Autonomi прямо в браузере", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/tr/messages.json b/src/_locales/tr/messages.json new file mode 100644 index 0000000..242b04a --- /dev/null +++ b/src/_locales/tr/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Autonomi merkeziyetsiz ağından içeriği doğrudan tarayıcınızda indirin ve görüntüleyin", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/uk/messages.json b/src/_locales/uk/messages.json new file mode 100644 index 0000000..45dfd54 --- /dev/null +++ b/src/_locales/uk/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Завантажуйте та переглядайте контент із децентралізованої мережі Autonomi безпосередньо у вашому браузері", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/vi/messages.json b/src/_locales/vi/messages.json new file mode 100644 index 0000000..fbcfc66 --- /dev/null +++ b/src/_locales/vi/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "Tải xuống và xem nội dung từ mạng phi tập trung Autonomi trực tiếp trong trình duyệt của bạn", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/zh_CN/messages.json b/src/_locales/zh_CN/messages.json new file mode 100644 index 0000000..b54fd99 --- /dev/null +++ b/src/_locales/zh_CN/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "直接在浏览器中从 Autonomi 去中心化网络下载和查看内容", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/_locales/zh_TW/messages.json b/src/_locales/zh_TW/messages.json new file mode 100644 index 0000000..71758a5 --- /dev/null +++ b/src/_locales/zh_TW/messages.json @@ -0,0 +1,6 @@ +{ + "extDescription": { + "message": "直接在瀏覽器中從 Autonomi 去中心化網路下載並檢視內容", + "description": "Extension description shown in the browser and on the store listing. 'Autonomi' stays untranslated." + } +} diff --git a/src/content/i18n.ts b/src/content/i18n.ts new file mode 100644 index 0000000..fd33489 --- /dev/null +++ b/src/content/i18n.ts @@ -0,0 +1,26 @@ +/** + * Content-script i18n. The content script injects into arbitrary pages and + * can't fetch packaged locale JSON without widening web_accessible_resources + * (a store-review surface), so its small string subset is bundled at build + * time. content-locales.json is regenerated from the `content` section of each + * locale file by build.mjs — the per-locale files stay the single source of + * truth. + * + * The locale here follows the browser UI language (navigator.language). The + * in-popup language override governs the extension's own pages; content-script + * link labels follow the browser — see CONTRIBUTING-i18n.md. + */ +import { normalizeLocale } from '../i18n'; +import CONTENT_LOCALES from '../i18n/content-locales.json'; + +type ContentDict = Record; +const all = CONTENT_LOCALES as Record; +const en: ContentDict = all.en ?? {}; +const dict: ContentDict = all[normalizeLocale(navigator.language)] ?? en; + +/** Translate a content-script key, with {name} interpolation and en fallback. */ +export function tc(key: string, params?: Record): string { + const raw = dict[key] ?? en[key] ?? key; + if (!params) return raw; + return raw.replace(/\{(\w+)\}/g, (m, k) => (k in params ? String(params[k]) : m)); +} diff --git a/src/content/renderer.ts b/src/content/renderer.ts index 2f656e1..8974663 100644 --- a/src/content/renderer.ts +++ b/src/content/renderer.ts @@ -23,6 +23,7 @@ import type { import type { AntElement } from '../shared/types'; import { DOWNLOAD_PORT } from '../shared/constants'; import { parseAntUri } from './scanner'; +import { tc } from './i18n'; // Bundled as a data URL (esbuild dataurl loader) so it works on any page // without web_accessible_resources. import antLogo from '../../assets/icons/icon-48.png'; @@ -83,7 +84,7 @@ function injectStyles(): void { min-height: 32px; } .ant-error::after { - content: 'Failed to load from Autonomi'; + content: ${JSON.stringify(tc('failed_to_load'))}; position: absolute; top: 50%; left: 50%; @@ -197,7 +198,7 @@ function bindLink(el: AntElement): void { // preserving the author's original text as the accessible label. const origText = (a.textContent || '').trim(); if (origText) a.setAttribute('aria-label', origText); - a.setAttribute('title', 'Download from the Autonomi network'); + a.setAttribute('title', tc('title_download')); a.classList.add('ant-dl'); a.replaceChildren(); @@ -207,7 +208,7 @@ function bindLink(el: AntElement): void { img.alt = ''; const label = document.createElement('span'); label.className = 'ant-dl-label'; - label.textContent = 'Download'; + label.textContent = tc('download'); const spinner = document.createElement('span'); spinner.className = 'ant-dl-spinner'; a.append(img, label, spinner); @@ -219,8 +220,8 @@ function bindLink(el: AntElement): void { a.removeAttribute('data-ant-spinner'); a.style.removeProperty('--ant-progress'); a.setAttribute('data-ant-open', '1'); - label.textContent = 'Open'; - a.setAttribute('title', 'Open the downloaded file'); + label.textContent = tc('open'); + a.setAttribute('title', tc('title_open')); }; // Ask the worker whether this address was already downloaded (and the file @@ -248,7 +249,7 @@ function bindLink(el: AntElement): void { // Show a circular spinner until the first chunk's % arrives; the animator // then swaps it for the determinate fill and eases upward from there. a.setAttribute('data-ant-spinner', '1'); - label.textContent = 'Fetching…'; + label.textContent = tc('fetching'); // Filename precedence: the standard HTML download attribute wins, then // the ?name= from this anchor's own href, else the background falls back @@ -308,9 +309,9 @@ function bindLink(el: AntElement): void { if (settled || completed) return; settled = true; console.error('[ant-webex] download failed:', detail ?? '(no detail)'); - label.textContent = 'Download failed'; + label.textContent = tc('download_failed'); reset(); - setTimeout(() => { label.textContent = 'Download'; }, 3_000); + setTimeout(() => { label.textContent = tc('download'); }, 3_000); }; // rAF loop: ease displayedPct up to (never past) the confirmed level at the @@ -327,7 +328,7 @@ function bindLink(el: AntElement): void { } const shown = Math.max(0, Math.min(100, Math.floor(displayedPct))); a.style.setProperty('--ant-progress', `${shown}%`); - label.textContent = `Downloading… ${shown}%`; + label.textContent = tc('downloading_pct', { pct: shown }); if (completed && displayedPct >= 99.5) { finish(); return; } rafId = requestAnimationFrame(animate); }; @@ -414,7 +415,7 @@ function fetchInline(el: AntElement): void { t.classList.add(ERROR_CLASS); t.setAttribute( 'title', - `Failed to load from Autonomi: ${resp.result.error}`, + `${tc('failed_to_load')}: ${resp.result.error}`, ); }); } diff --git a/src/i18n/content-locales.json b/src/i18n/content-locales.json new file mode 100644 index 0000000..4a20972 --- /dev/null +++ b/src/i18n/content-locales.json @@ -0,0 +1,182 @@ +{ + "ar": { + "download": "تنزيل", + "open": "فتح", + "fetching": "جارٍ الجلب…", + "downloading_pct": "جارٍ التنزيل… {pct}%", + "download_failed": "فشل التنزيل", + "title_download": "التنزيل من شبكة Autonomi", + "title_open": "فتح الملف الذي تم تنزيله", + "failed_to_load": "فشل التحميل من Autonomi" + }, + "bg": { + "download": "Изтегли", + "open": "Отвори", + "fetching": "Извличане…", + "downloading_pct": "Изтегляне… {pct}%", + "download_failed": "Неуспешно изтегляне", + "title_download": "Изтегли от мрежата Autonomi", + "title_open": "Отвори изтегления файл", + "failed_to_load": "Неуспешно зареждане от Autonomi" + }, + "de": { + "download": "Herunterladen", + "open": "Öffnen", + "fetching": "Wird abgerufen…", + "downloading_pct": "Herunterladen… {pct}%", + "download_failed": "Download fehlgeschlagen", + "title_download": "Aus dem Autonomi-Netzwerk herunterladen", + "title_open": "Heruntergeladene Datei öffnen", + "failed_to_load": "Laden von Autonomi fehlgeschlagen" + }, + "en": { + "download": "Download", + "open": "Open", + "fetching": "Fetching…", + "downloading_pct": "Downloading… {pct}%", + "download_failed": "Download failed", + "title_download": "Download from the Autonomi network", + "title_open": "Open the downloaded file", + "failed_to_load": "Failed to load from Autonomi" + }, + "es": { + "download": "Descargar", + "open": "Abrir", + "fetching": "Obteniendo…", + "downloading_pct": "Descargando… {pct}%", + "download_failed": "La descarga falló", + "title_download": "Descargar de la red Autonomi", + "title_open": "Abrir el archivo descargado", + "failed_to_load": "Error al cargar desde Autonomi" + }, + "fr": { + "download": "Télécharger", + "open": "Ouvrir", + "fetching": "Récupération…", + "downloading_pct": "Téléchargement… {pct}%", + "download_failed": "Échec du téléchargement", + "title_download": "Télécharger depuis le réseau Autonomi", + "title_open": "Ouvrir le fichier téléchargé", + "failed_to_load": "Échec du chargement depuis Autonomi" + }, + "he": { + "download": "הורד", + "open": "פתח", + "fetching": "מביא…", + "downloading_pct": "מוריד… {pct}%", + "download_failed": "ההורדה נכשלה", + "title_download": "הורד מרשת Autonomi", + "title_open": "פתח את הקובץ שהורד", + "failed_to_load": "הטעינה מ-Autonomi נכשלה" + }, + "id": { + "download": "Unduh", + "open": "Buka", + "fetching": "Mengambil…", + "downloading_pct": "Mengunduh… {pct}%", + "download_failed": "Unduhan gagal", + "title_download": "Unduh dari jaringan Autonomi", + "title_open": "Buka berkas yang diunduh", + "failed_to_load": "Gagal memuat dari Autonomi" + }, + "ja": { + "download": "ダウンロード", + "open": "開く", + "fetching": "取得中…", + "downloading_pct": "ダウンロード中… {pct}%", + "download_failed": "ダウンロードに失敗しました", + "title_download": "Autonomi ネットワークからダウンロード", + "title_open": "ダウンロードしたファイルを開く", + "failed_to_load": "Autonomi からの読み込みに失敗しました" + }, + "ko": { + "download": "다운로드", + "open": "열기", + "fetching": "가져오는 중…", + "downloading_pct": "다운로드 중… {pct}%", + "download_failed": "다운로드 실패", + "title_download": "Autonomi 네트워크에서 다운로드", + "title_open": "다운로드한 파일 열기", + "failed_to_load": "Autonomi에서 로드하지 못했습니다" + }, + "nl": { + "download": "Downloaden", + "open": "Openen", + "fetching": "Ophalen…", + "downloading_pct": "Downloaden… {pct}%", + "download_failed": "Downloaden mislukt", + "title_download": "Downloaden van het Autonomi-netwerk", + "title_open": "Het gedownloade bestand openen", + "failed_to_load": "Laden van Autonomi mislukt" + }, + "pt-BR": { + "download": "Baixar", + "open": "Abrir", + "fetching": "Buscando…", + "downloading_pct": "Baixando… {pct}%", + "download_failed": "O download falhou", + "title_download": "Baixar da rede Autonomi", + "title_open": "Abrir o arquivo baixado", + "failed_to_load": "Falha ao carregar do Autonomi" + }, + "ru": { + "download": "Скачать", + "open": "Открыть", + "fetching": "Получение…", + "downloading_pct": "Скачивание… {pct}%", + "download_failed": "Ошибка скачивания", + "title_download": "Скачать из сети Autonomi", + "title_open": "Открыть скачанный файл", + "failed_to_load": "Не удалось загрузить из Autonomi" + }, + "tr": { + "download": "İndir", + "open": "Aç", + "fetching": "Alınıyor…", + "downloading_pct": "İndiriliyor… %{pct}", + "download_failed": "İndirme başarısız", + "title_download": "Autonomi ağından indir", + "title_open": "İndirilen dosyayı aç", + "failed_to_load": "Autonomi'den yüklenemedi" + }, + "uk": { + "download": "Завантажити", + "open": "Відкрити", + "fetching": "Отримання…", + "downloading_pct": "Скачування… {pct}%", + "download_failed": "Помилка завантаження", + "title_download": "Завантажити з мережі Autonomi", + "title_open": "Відкрити завантажений файл", + "failed_to_load": "Не вдалося завантажити з Autonomi" + }, + "vi": { + "download": "Tải xuống", + "open": "Mở", + "fetching": "Đang tìm nạp…", + "downloading_pct": "Đang tải xuống… {pct}%", + "download_failed": "Tải xuống thất bại", + "title_download": "Tải xuống từ mạng Autonomi", + "title_open": "Mở tệp đã tải xuống", + "failed_to_load": "Không tải được từ Autonomi" + }, + "zh-CN": { + "download": "下载", + "open": "打开", + "fetching": "获取中…", + "downloading_pct": "下载中… {pct}%", + "download_failed": "下载失败", + "title_download": "从 Autonomi 网络下载", + "title_open": "打开已下载的文件", + "failed_to_load": "从 Autonomi 加载失败" + }, + "zh-TW": { + "download": "下載", + "open": "開啟", + "fetching": "取得中…", + "downloading_pct": "下載中… {pct}%", + "download_failed": "下載失敗", + "title_download": "從 Autonomi 網路下載", + "title_open": "開啟已下載的檔案", + "failed_to_load": "無法從 Autonomi 載入" + } +} diff --git a/src/i18n/index.ts b/src/i18n/index.ts new file mode 100644 index 0000000..dd957bb --- /dev/null +++ b/src/i18n/index.ts @@ -0,0 +1,193 @@ +/** + * Minimal i18n runtime for the extension's own pages (popup + onboarding). + * + * The extension is dependency-free, so this is a ~100-line hand-rolled runtime + * rather than a framework. Locale catalogs are fetched from the packaged + * assets via chrome.runtime.getURL(): popup and onboarding run in extension + * pages, which can read packaged resources without web_accessible_resources. + * The content script can't (it injects into arbitrary pages), so it uses a + * separate bundled subset — see content/i18n.ts. + * + * Conventions mirror the sibling ant-ui desktop app so translations and the + * contributor guide port across: dotted keys grouped by area, {name} + * placeholders, and _one/_many plural suffixes chosen by the caller. See + * CONTRIBUTING-i18n.md. + */ + +/** Every locale the extension ships. Order matches ant-ui's SUPPORTED_LOCALES. */ +export const SUPPORTED_LOCALES = [ + 'en', 'ja', 'ko', 'nl', 'fr', 'bg', 'es', 'ar', 'he', 'ru', + 'uk', 'zh-CN', 'zh-TW', 'pt-BR', 'tr', 'vi', 'id', 'de', +] as const; +export type SupportedLocale = (typeof SUPPORTED_LOCALES)[number]; +const DEFAULT_LOCALE: SupportedLocale = 'en'; + +/** Locales whose script flows right-to-left; applied as . */ +export const RTL_LOCALES: ReadonlySet = new Set(['ar', 'he']); +export function isRtlLocale(value: string): boolean { + return RTL_LOCALES.has(value as SupportedLocale); +} + +/** Each locale's name in its own script — shown in the Settings picker so the + * user reads the language name regardless of the active UI locale. */ +export const NATIVE_LOCALE_NAMES: Record = { + en: 'English', + ja: '日本語', + ko: '한국어', + nl: 'Nederlands', + fr: 'Français', + bg: 'Български', + es: 'Español', + ar: 'العربية', + he: 'עברית', + ru: 'Русский', + uk: 'Українська', + 'zh-CN': '简体中文', + 'zh-TW': '繁體中文', + 'pt-BR': 'Português (Brasil)', + tr: 'Türkçe', + vi: 'Tiếng Việt', + id: 'Bahasa Indonesia', + de: 'Deutsch', +}; + +/** chrome.storage.local key holding the user's explicit locale override. */ +export const LOCALE_STORAGE_KEY = 'uiLocale'; + +function isSupported(value: string): value is SupportedLocale { + return (SUPPORTED_LOCALES as readonly string[]).includes(value); +} + +/** + * Map a raw BCP 47 tag to a supported locale. Tries the region-qualified tag + * first (so zh-CN/zh-TW/pt-BR keep the region that carries the meaning), then + * falls back to the bare language (fr-CA → fr), then to English. Ported from + * ant-ui's useLocale.ts. + */ +export function normalizeLocale(raw: string | null | undefined): SupportedLocale { + if (!raw) return DEFAULT_LOCALE; + const parts = raw.split('-'); + if (parts.length >= 2) { + const tagged = `${parts[0].toLowerCase()}-${parts[1].toUpperCase()}`; + if (isSupported(tagged)) return tagged; + } + const base = parts[0].toLowerCase(); + return isSupported(base) ? base : DEFAULT_LOCALE; +} + +type Catalog = Record; +let catalog: Catalog = {}; +let fallbackCatalog: Catalog = {}; +let activeLocale: SupportedLocale = DEFAULT_LOCALE; + +function localeUrl(loc: SupportedLocale): string { + return chrome.runtime.getURL(`i18n/locales/${loc}.json`); +} + +async function loadCatalog(loc: SupportedLocale): Promise { + try { + const r = await fetch(localeUrl(loc)); + if (!r.ok) return {}; + return (await r.json()) as Catalog; + } catch { + return {}; + } +} + +/** Resolve the locale to use: persisted override → browser UI language → en. */ +export async function resolveLocale(): Promise { + try { + const stored = await chrome.storage.local.get(LOCALE_STORAGE_KEY); + const override = stored?.[LOCALE_STORAGE_KEY]; + if (typeof override === 'string' && isSupported(override)) return override; + } catch { + /* storage unavailable — fall through to the browser language */ + } + return normalizeLocale(navigator.language); +} + +/** + * Resolve the locale, load its catalog plus English as the fallback layer, and + * set / . Call once before rendering the page. + */ +export async function initI18n(): Promise { + activeLocale = await resolveLocale(); + catalog = await loadCatalog(activeLocale); + fallbackCatalog = activeLocale === 'en' ? catalog : await loadCatalog('en'); + const el = document.documentElement; + el.lang = activeLocale; + el.dir = isRtlLocale(activeLocale) ? 'rtl' : 'ltr'; +} + +export function getLocale(): SupportedLocale { + return activeLocale; +} + +/** Persist an explicit locale override; null clears it → follow the browser. */ +export async function setLocale(next: SupportedLocale | null): Promise { + if (next === null) await chrome.storage.local.remove(LOCALE_STORAGE_KEY); + else await chrome.storage.local.set({ [LOCALE_STORAGE_KEY]: next }); +} + +function lookup(cat: Catalog, key: string): unknown { + let node: unknown = cat; + for (const part of key.split('.')) { + if (node == null || typeof node !== 'object') return undefined; + node = (node as Record)[part]; + } + return node; +} + +function interpolate(s: string, params?: Record): string { + if (!params) return s; + return s.replace(/\{(\w+)\}/g, (m, k) => (k in params ? String(params[k]) : m)); +} + +/** + * Translate a dotted key. Falls back active-locale → English → the key itself, + * so a missing translation degrades to English (or, worst case, a visible key + * that flags the gap). `params.count` selects the `_one`/`_many` plural suffix + * when such keys exist. + */ +export function t(key: string, params?: Record): string { + let resolvedKey = key; + if (params && typeof params.count === 'number') { + const suffix = params.count === 1 ? '_one' : '_many'; + if ( + typeof lookup(catalog, key + suffix) === 'string' || + typeof lookup(fallbackCatalog, key + suffix) === 'string' + ) { + resolvedKey = key + suffix; + } + } + let value = lookup(catalog, resolvedKey); + if (typeof value !== 'string') value = lookup(fallbackCatalog, resolvedKey); + if (typeof value !== 'string') return key; + return interpolate(value, params); +} + +/** + * Fill every element carrying a data-i18n* attribute from the catalog: + * data-i18n → textContent + * data-i18n-title → title attribute + * data-i18n-placeholder → placeholder attribute + * data-i18n-aria-label → aria-label attribute + * For interpolation-free static strings; dynamic strings are set via t() in + * code. Safe against untrusted content — only ever sets textContent/attributes, + * never innerHTML. + */ +export function applyStaticTranslations(root: ParentNode = document): void { + root.querySelectorAll('[data-i18n]').forEach((el) => { + el.textContent = t(el.dataset.i18n!); + }); + const attrMap: Array<[string, string]> = [ + ['data-i18n-title', 'title'], + ['data-i18n-placeholder', 'placeholder'], + ['data-i18n-aria-label', 'aria-label'], + ]; + for (const [dataAttr, domAttr] of attrMap) { + root.querySelectorAll(`[${dataAttr}]`).forEach((el) => { + el.setAttribute(domAttr, t(el.getAttribute(dataAttr)!)); + }); + } +} diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json new file mode 100644 index 0000000..908a846 --- /dev/null +++ b/src/i18n/locales/ar.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "تنزيل", + "save": "حفظ", + "connected": "متصل", + "checking": "جارٍ التحقق…", + "downloading": "جارٍ التنزيل…", + "settings": "الإعدادات", + "downloads": "عمليات التنزيل", + "unknown": "غير معروف" + }, + "status": { + "not_detected": "لم يتم اكتشاف الخدمة الخلفية", + "not_running": "الخدمة الخلفية لا تعمل" + }, + "popup": { + "version_too_old": "إصدار antd هذا قديم جدًا. تحتاج الإضافة إلى {min} أو أحدث.", + "update_antd": "تحديث antd", + "prerelease_warning": "هذه نسخة antd تجريبية ({version}). تدعم الإضافة الإصدارات المستقرة فقط.", + "install_stable": "تثبيت الإصدار المستقر", + "update_available": "يتوفر تحديث: {version}", + "get_latest": "احصل على الأحدث", + "resources_heading": "الموارد في هذه الصفحة", + "no_resources": "لم يتم اكتشاف أي مراجع autonomi://.", + "clear_finished": "مسح المكتملة", + "no_downloads": "لا توجد تنزيلات بعد.", + "disconnected_help": "تحتاج الإضافة إلى خدمة Autonomi ‏(antd) لجلب المحتوى من الشبكة.", + "detect_daemon": "اكتشاف الخدمة", + "detecting": "جارٍ الاكتشاف…", + "download_daemon": "تنزيل الخدمة", + "then_detect_prefix": "ثم انقر على اكتشاف الخدمة أعلاه، أو", + "open_setup_guide": "افتح دليل الإعداد الكامل", + "setup_guide": "دليل الإعداد" + }, + "guide": { + "summary": "هل ثبّتّ antd بالفعل؟ ابحث عنه وشغّله", + "reach_antd": "إذا أعددت antd من قبل، فقد يكون متوقفًا فحسب — أو يعمل بدون الخيار الذي تحتاجه الإضافة. تصل الإضافة إلى antd على {url} وتحتاج إلى تشغيله باستخدام الخيار --cors.", + "step1_terminal": "1 · افتح نافذة Terminal", + "step2_start": "2 · شغّل الخدمة", + "terminal_on": "على {os}: {instr}.", + "terminal_generic": "افتح تطبيق Terminal.", + "terminal": { + "windows": "اضغط Win، واكتب “PowerShell”، ثم Enter", + "macos": "اضغط Cmd+Space، واكتب “Terminal”، ثم Enter", + "linux": "اضغط Ctrl+Alt+T (أو افتح تطبيق Terminal الخاص بك)" + }, + "cmd_not_found": "أبقِ تلك النافذة مفتوحة أثناء التصفح. إذا رأيت “command not found”، فإن antd غير موجود في PATH لديك — شغّله باستخدام المسار الكامل الموضح أدناه (مع إضافة --cors أيضًا).", + "where_to_find": "أين تجده", + "label_program": "البرنامج", + "label_running_check": "التحقق من التشغيل", + "path_varies": "يختلف حسب النظام — راجع دليل الإعداد", + "path_varies_short": "يختلف حسب النظام", + "portfile_hint": "— يظهر هذا الملف بمجرد أن يبدأ antd.", + "connects_automatically": "بمجرد تشغيله، تتصل هذه الصفحة تلقائيًا — أو انقر على اكتشاف الخدمة في نافذة شريط الأدوات المنبثقة." + }, + "install": { + "title_install": "تثبيت antd", + "title_update": "تحديث antd", + "step_run": "شغّل المُثبّت الذي تم تنزيله للتو ({file}).", + "step2_install": "يبدأ antd ويضبطه للتشغيل عند تسجيل الدخول.", + "step2_update": "يستبدل antd الحالي لديك ويعيد تشغيله.", + "step_detected": "تُحدَّث هذه اللوحة تلقائيًا بمجرد اكتشاف antd.", + "waiting": "في انتظار antd…", + "other_platforms": "أنظمة أخرى أو التثبيت اليدوي:", + "releases_link": "إصدارات antd", + "see_releases": "(انظر صفحة الإصدارات)" + }, + "downloads": { + "progress_pct": "جارٍ التنزيل… {pct}% ({received} / {total})", + "progress_indeterminate": "جارٍ التنزيل… {received}", + "open_folder": "فتح المجلد", + "failed": "فشل" + }, + "settings": { + "daemon_url": "عنوان URL للخدمة", + "auto_fetch": "الجلب التلقائي للموارد المضمّنة", + "check_updates": "التحقق من تحديثات antd", + "saving": "جارٍ الحفظ…", + "saved": "تم الحفظ!", + "language": "اللغة", + "language_system": "الإعداد الافتراضي للنظام" + }, + "onboarding": { + "welcome_title": "مرحبًا بك في Autonomi", + "welcome_lede": "أنت على وشك أن تكون جاهزًا لتصفح المحتوى من شبكة Autonomi. خطوة إعداد سريعة واحدة وستدخل.", + "status_checking": "جارٍ التحقق من خدمة الشبكة…", + "step1_title": "تنزيل خدمة الشبكة", + "step1_body": "يوجد محتوى Autonomi على شبكة لامركزية. يعمل برنامج محلي صغير يُسمى antd على جهاز الكمبيوتر لديك ويجلب ذلك المحتوى للإضافة — لا يمكن لمتصفحك الوصول إلى الشبكة بمفرده. يعمل بهدوء في الخلفية ويستمع فقط على جهازك أنت.", + "download_for": "تنزيل لـ {platform}", + "your_platform": "نظامك", + "all_downloads": "جميع التنزيلات على GitHub", + "step2_title": "تشغيل المُثبّت", + "step2_body": "افتح الملف الذي نزّلته للتو واتبع التعليمات. يُثبّت antd ويشغّله ويضبطه للتشغيل تلقائيًا في كل مرة تسجّل فيها الدخول — لذا تقوم بذلك مرة واحدة فقط.", + "step3_title": "تحقق من اتصال الإضافة", + "step3_body": "تكتشف هذه الصفحة الخدمة تلقائيًا. بمجرد تشغيلها، يتحول الشريط أعلاه إلى اللون الأخضر وتصبح متصلاً بالشبكة. يمكنك أيضًا النقر على أيقونة Autonomi في شريط أدوات متصفحك في أي وقت لرؤية حالتك.", + "done_title": "🎉 أنت متصل الآن!", + "done_body": "يمكن للإضافة الآن تحميل محتوى Autonomi. قم بزيارة صفحة تحتوي على مراجع autonomi://، أو افتح نافذة شريط الأدوات المنبثقة لرؤية ما تم اكتشافه.", + "os_undetected": "تعذّر علينا اكتشاف نظام التشغيل لديك — اختر النسخة المناسبة على GitHub.", + "downloading_asset": "جارٍ تنزيل {asset}…", + "download_failed_fallback": "فشل التنزيل — يتم فتح صفحة إصدارات GitHub بدلاً من ذلك.", + "banner_connected": "متصل بشبكة Autonomi", + "banner_idle": "لم يتم اكتشاف خدمة الشبكة — اتبع الخطوات أدناه. تتصل هذه الصفحة تلقائيًا بمجرد تشغيلها.", + "banner_preview": "وضع المعاينة — ثبّت الإضافة لاكتشاف الخدمة." + }, + "content": { + "download": "تنزيل", + "open": "فتح", + "fetching": "جارٍ الجلب…", + "downloading_pct": "جارٍ التنزيل… {pct}%", + "download_failed": "فشل التنزيل", + "title_download": "التنزيل من شبكة Autonomi", + "title_open": "فتح الملف الذي تم تنزيله", + "failed_to_load": "فشل التحميل من Autonomi" + } +} diff --git a/src/i18n/locales/bg.json b/src/i18n/locales/bg.json new file mode 100644 index 0000000..2f67690 --- /dev/null +++ b/src/i18n/locales/bg.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Изтегли", + "save": "Запис", + "connected": "Свързано", + "checking": "Проверяване…", + "downloading": "Изтегляне…", + "settings": "Настройки", + "downloads": "Изтегляния", + "unknown": "неизвестно" + }, + "status": { + "not_detected": "Демонът не е открит", + "not_running": "Демонът не е стартиран" + }, + "popup": { + "version_too_old": "Тази версия на antd е твърде стара. Разширението изисква {min} или по-нова.", + "update_antd": "Актуализирай antd", + "prerelease_warning": "Това е предварителна компилация на antd ({version}). Разширението поддържа само стабилни издания.", + "install_stable": "Инсталирай стабилното издание", + "update_available": "Налична актуализация: {version}", + "get_latest": "Вземи най-новата версия", + "resources_heading": "Ресурси на тази страница", + "no_resources": "Не са открити препратки autonomi://.", + "clear_finished": "Изчисти завършените", + "no_downloads": "Все още няма изтегляния.", + "disconnected_help": "Разширението се нуждае от демона на Autonomi (antd), за да извлича съдържание от мрежата.", + "detect_daemon": "Открий демона", + "detecting": "Откриване…", + "download_daemon": "Изтегли демона", + "then_detect_prefix": "След това щракнете върху „Открий демона“ по-горе или", + "open_setup_guide": "отворете пълното ръководство за настройка", + "setup_guide": "Ръководство за настройка" + }, + "guide": { + "summary": "Вече сте инсталирали antd? Намерете го и го стартирайте", + "reach_antd": "Ако вече сте настройвали antd преди, той може просто да е спрян — или да работи без опцията, от която се нуждае разширението. Разширението достига antd на адрес {url} и изисква той да е стартиран с опцията --cors.", + "step1_terminal": "1 · Отворете терминал", + "step2_start": "2 · Стартирайте демона", + "terminal_on": "В {os}: {instr}.", + "terminal_generic": "Отворете вашето терминално приложение.", + "terminal": { + "windows": "натиснете Win, въведете „PowerShell“, след което Enter", + "macos": "натиснете Cmd+Space, въведете „Terminal“, след което Enter", + "linux": "натиснете Ctrl+Alt+T (или отворете вашето терминално приложение)" + }, + "cmd_not_found": "Дръжте този прозорец отворен, докато сърфирате. Ако видите “command not found”, antd не е във вашия PATH — стартирайте го, използвайки пълния път, показан по-долу (като все така добавяте --cors).", + "where_to_find": "Къде да го намерите", + "label_program": "Програма", + "label_running_check": "Проверка за работа", + "path_varies": "различава се според платформата — вижте ръководството за настройка", + "path_varies_short": "различава се според платформата", + "portfile_hint": "— този файл се появява, след като antd се стартира.", + "connects_automatically": "След като работи, тази страница се свързва автоматично — или щракнете върху „Открий демона“ в изскачащия прозорец на лентата с инструменти." + }, + "install": { + "title_install": "Инсталирай antd", + "title_update": "Актуализирай antd", + "step_run": "Стартирайте инсталатора, който току-що се изтегли ({file}).", + "step2_install": "Той стартира antd и го настройва да се стартира при влизане.", + "step2_update": "Той заменя текущия antd и го рестартира.", + "step_detected": "Този панел се актуализира автоматично, щом antd бъде открит.", + "waiting": "Изчакване на antd…", + "other_platforms": "Други платформи или ръчна инсталация:", + "releases_link": "Издания на antd", + "see_releases": "(вижте страницата с издания)" + }, + "downloads": { + "progress_pct": "Изтегляне… {pct}% ({received} / {total})", + "progress_indeterminate": "Изтегляне… {received}", + "open_folder": "Отвори папката", + "failed": "Неуспешно" + }, + "settings": { + "daemon_url": "URL на демона", + "auto_fetch": "Автоматично извличане на вградени ресурси", + "check_updates": "Проверявай за актуализации на antd", + "saving": "Записване…", + "saved": "Записано!", + "language": "Език", + "language_system": "Системен по подразбиране" + }, + "onboarding": { + "welcome_title": "Добре дошли в Autonomi", + "welcome_lede": "Почти сте готови да разглеждате съдържание от мрежата Autonomi. Още една бърза стъпка за настройка и сте готови.", + "status_checking": "Проверка за мрежовия демон…", + "step1_title": "Изтеглете мрежовия демон", + "step1_body": "Съдържанието на Autonomi се намира в децентрализирана мрежа. Малка локална програма, наречена antd, работи на вашия компютър и извлича това съдържание за разширението — вашият браузър не може да достигне мрежата сам. Тя работи тихо във фонов режим и слуша само на вашата собствена машина.", + "download_for": "Изтегли за {platform}", + "your_platform": "вашата платформа", + "all_downloads": "Всички изтегляния в GitHub", + "step2_title": "Стартирайте инсталатора", + "step2_body": "Отворете файла, който току-що изтеглихте, и следвайте подканите. Той инсталира antd, стартира го и го настройва да се стартира автоматично всеки път, когато влезете — така правите това само веднъж.", + "step3_title": "Проверете разширението за връзка", + "step3_body": "Тази страница открива демона автоматично. Щом той работи, банерът по-горе става зелен и вие сте свързани с мрежата. Можете също по всяко време да щракнете върху иконата на Autonomi в лентата с инструменти на браузъра, за да видите състоянието си.", + "done_title": "🎉 Свързани сте!", + "done_body": "Сега разширението може да зарежда съдържание на Autonomi. Посетете страница с препратки autonomi:// или отворете изскачащия прозорец на лентата с инструменти, за да видите какво е открито.", + "os_undetected": "Не успяхме да открием вашата операционна система — изберете правилната компилация в GitHub.", + "downloading_asset": "Изтегляне на {asset}…", + "download_failed_fallback": "Неуспешно изтегляне — вместо това се отваря страницата с издания в GitHub.", + "banner_connected": "Свързано с мрежата Autonomi", + "banner_idle": "Мрежовият демон не е открит — следвайте стъпките по-долу. Тази страница се свързва автоматично, щом той се стартира.", + "banner_preview": "Режим на преглед — инсталирайте разширението, за да откриете демона." + }, + "content": { + "download": "Изтегли", + "open": "Отвори", + "fetching": "Извличане…", + "downloading_pct": "Изтегляне… {pct}%", + "download_failed": "Неуспешно изтегляне", + "title_download": "Изтегли от мрежата Autonomi", + "title_open": "Отвори изтегления файл", + "failed_to_load": "Неуспешно зареждане от Autonomi" + } +} diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json new file mode 100644 index 0000000..76bb376 --- /dev/null +++ b/src/i18n/locales/de.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Herunterladen", + "save": "Speichern", + "connected": "Verbunden", + "checking": "Wird geprüft…", + "downloading": "Herunterladen…", + "settings": "Einstellungen", + "downloads": "Downloads", + "unknown": "unbekannt" + }, + "status": { + "not_detected": "Daemon nicht erkannt", + "not_running": "Daemon läuft nicht" + }, + "popup": { + "version_too_old": "Diese antd-Version ist zu alt. Die Erweiterung benötigt {min} oder neuer.", + "update_antd": "antd aktualisieren", + "prerelease_warning": "Dies ist ein Vorabversions-Build von antd ({version}). Die Erweiterung unterstützt nur stabile Versionen.", + "install_stable": "Stabile Version installieren", + "update_available": "Update verfügbar: {version}", + "get_latest": "Neueste Version herunterladen", + "resources_heading": "Ressourcen auf dieser Seite", + "no_resources": "Keine autonomi://-Verweise erkannt.", + "clear_finished": "Abgeschlossene entfernen", + "no_downloads": "Noch keine Downloads.", + "disconnected_help": "Die Erweiterung benötigt den Autonomi-Daemon (antd), um Inhalte aus dem Netzwerk abzurufen.", + "detect_daemon": "Daemon erkennen", + "detecting": "Wird erkannt…", + "download_daemon": "Daemon herunterladen", + "then_detect_prefix": "Klicken Sie dann oben auf „Daemon erkennen“ oder", + "open_setup_guide": "die vollständige Einrichtungsanleitung öffnen", + "setup_guide": "Einrichtungsanleitung" + }, + "guide": { + "summary": "antd bereits installiert? Finden und starten", + "reach_antd": "Falls Sie antd bereits eingerichtet haben, ist es möglicherweise einfach gestoppt – oder läuft ohne die Option, die die Erweiterung benötigt. Die Erweiterung erreicht antd unter {url} und benötigt es mit der Option --cors gestartet.", + "step1_terminal": "1 · Ein Terminal öffnen", + "step2_start": "2 · Den Daemon starten", + "terminal_on": "Unter {os}: {instr}.", + "terminal_generic": "Öffnen Sie Ihre Terminal-App.", + "terminal": { + "windows": "Win drücken, „PowerShell“ eingeben, dann Enter", + "macos": "Cmd+Space drücken, „Terminal“ eingeben, dann Enter", + "linux": "Ctrl+Alt+T drücken (oder Terminal-App öffnen)" + }, + "cmd_not_found": "Lassen Sie dieses Fenster geöffnet, während Sie surfen. Wenn “command not found” angezeigt wird, befindet sich antd nicht in Ihrem PATH – führen Sie es über den unten angezeigten vollständigen Pfad aus (weiterhin mit --cors).", + "where_to_find": "Wo Sie es finden", + "label_program": "Programm", + "label_running_check": "Statusprüfung", + "path_varies": "variiert je nach Plattform – siehe Einrichtungsanleitung", + "path_varies_short": "variiert je nach Plattform", + "portfile_hint": "– diese Datei erscheint, sobald antd gestartet ist.", + "connects_automatically": "Sobald es läuft, verbindet sich diese Seite automatisch – oder klicken Sie im Symbolleisten-Popup auf „Daemon erkennen“." + }, + "install": { + "title_install": "antd installieren", + "title_update": "antd aktualisieren", + "step_run": "Führen Sie das soeben heruntergeladene Installationsprogramm aus ({file}).", + "step2_install": "Es startet antd und richtet es so ein, dass es bei der Anmeldung startet.", + "step2_update": "Es ersetzt Ihr aktuelles antd und startet es neu.", + "step_detected": "Dieses Feld wird automatisch aktualisiert, sobald antd erkannt wird.", + "waiting": "Warten auf antd…", + "other_platforms": "Andere Plattformen oder manuelle Installation:", + "releases_link": "antd-Releases", + "see_releases": "(siehe Releases-Seite)" + }, + "downloads": { + "progress_pct": "Herunterladen… {pct}% ({received} / {total})", + "progress_indeterminate": "Herunterladen… {received}", + "open_folder": "Ordner öffnen", + "failed": "Fehlgeschlagen" + }, + "settings": { + "daemon_url": "Daemon-URL", + "auto_fetch": "Inline-Ressourcen automatisch abrufen", + "check_updates": "Nach antd-Updates suchen", + "saving": "Wird gespeichert…", + "saved": "Gespeichert!", + "language": "Sprache", + "language_system": "Systemstandard" + }, + "onboarding": { + "welcome_title": "Willkommen bei Autonomi", + "welcome_lede": "Sie sind fast bereit, Inhalte aus dem Autonomi-Netzwerk zu durchsuchen. Nur ein kurzer Einrichtungsschritt und Sie sind dabei.", + "status_checking": "Suche nach dem Netzwerk-Daemon…", + "step1_title": "Netzwerk-Daemon herunterladen", + "step1_body": "Autonomi-Inhalte befinden sich in einem dezentralen Netzwerk. Ein kleines lokales Programm namens antd läuft auf Ihrem Computer und ruft diese Inhalte für die Erweiterung ab – Ihr Browser kann das Netzwerk nicht allein erreichen. Es läuft unauffällig im Hintergrund und ist nur auf Ihrem eigenen Rechner erreichbar.", + "download_for": "Für {platform} herunterladen", + "your_platform": "Ihre Plattform", + "all_downloads": "Alle Downloads auf GitHub", + "step2_title": "Installationsprogramm ausführen", + "step2_body": "Öffnen Sie die soeben heruntergeladene Datei und folgen Sie den Anweisungen. Es installiert antd, startet es und richtet es so ein, dass es bei jeder Anmeldung automatisch startet – so müssen Sie dies nur einmal tun.", + "step3_title": "Erweiterung auf eine Verbindung prüfen", + "step3_body": "Diese Seite erkennt den Daemon automatisch. Sobald er läuft, wird das Banner oben grün und Sie sind mit dem Netzwerk verbunden. Sie können jederzeit auch auf das Autonomi-Symbol in Ihrer Browser-Symbolleiste klicken, um Ihren Status zu sehen.", + "done_title": "🎉 Sie sind verbunden!", + "done_body": "Die Erweiterung kann jetzt Autonomi-Inhalte laden. Besuchen Sie eine Seite mit autonomi://-Verweisen oder öffnen Sie das Symbolleisten-Popup, um zu sehen, was erkannt wurde.", + "os_undetected": "Wir konnten Ihr Betriebssystem nicht erkennen – wählen Sie den passenden Build auf GitHub.", + "downloading_asset": "{asset} wird heruntergeladen…", + "download_failed_fallback": "Download fehlgeschlagen – stattdessen wird die GitHub-Releases-Seite geöffnet.", + "banner_connected": "Mit dem Autonomi-Netzwerk verbunden", + "banner_idle": "Netzwerk-Daemon nicht erkannt – folgen Sie den Schritten unten. Diese Seite verbindet sich automatisch, sobald er läuft.", + "banner_preview": "Vorschaumodus – installieren Sie die Erweiterung, um den Daemon zu erkennen." + }, + "content": { + "download": "Herunterladen", + "open": "Öffnen", + "fetching": "Wird abgerufen…", + "downloading_pct": "Herunterladen… {pct}%", + "download_failed": "Download fehlgeschlagen", + "title_download": "Aus dem Autonomi-Netzwerk herunterladen", + "title_open": "Heruntergeladene Datei öffnen", + "failed_to_load": "Laden von Autonomi fehlgeschlagen" + } +} diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json new file mode 100644 index 0000000..042f2e1 --- /dev/null +++ b/src/i18n/locales/en.json @@ -0,0 +1,115 @@ +{ + "common": { + "download": "Download", + "save": "Save", + "connected": "Connected", + "checking": "Checking…", + "downloading": "Downloading…", + "settings": "Settings", + "downloads": "Downloads", + "unknown": "unknown" + }, + "status": { + "not_detected": "Daemon not detected", + "not_running": "Daemon not running" + }, + "popup": { + "version_too_old": "This antd version is too old. The extension needs {min} or newer.", + "update_antd": "Update antd", + "prerelease_warning": "This is a pre-release antd build ({version}). The extension supports stable releases only.", + "install_stable": "Install the stable release", + "update_available": "Update available: {version}", + "get_latest": "Get the latest", + "resources_heading": "Resources on this page", + "no_resources": "No autonomi:// references detected.", + "clear_finished": "Clear finished", + "no_downloads": "No downloads yet.", + "disconnected_help": "The extension needs the Autonomi daemon (antd) to fetch content from the network.", + "detect_daemon": "Detect daemon", + "detecting": "Detecting…", + "download_daemon": "Download daemon", + "then_detect_prefix": "Then click Detect daemon above, or", + "open_setup_guide": "open the full setup guide", + "setup_guide": "Setup guide" + }, + "guide": { + "summary": "Already installed antd? Find & run it", + "reach_antd": "If you set up antd before, it may simply be stopped — or running without the option the extension needs. The extension reaches antd at {url} and needs it started with the --cors option.", + "step1_terminal": "1 · Open a terminal", + "step2_start": "2 · Start the daemon", + "terminal_on": "On {os}: {instr}.", + "terminal_generic": "Open your terminal app.", + "terminal": { + "windows": "press Win, type “PowerShell”, then Enter", + "macos": "press Cmd+Space, type “Terminal”, then Enter", + "linux": "press Ctrl+Alt+T (or open your terminal app)" + }, + "cmd_not_found": "Keep that window open while you browse. If you see “command not found”, antd isn't on your PATH — run it using the full path shown below (still adding --cors).", + "where_to_find": "Where to find it", + "label_program": "Program", + "label_running_check": "Running check", + "path_varies": "varies by platform — see the setup guide", + "path_varies_short": "varies by platform", + "portfile_hint": "— this file appears once antd has started.", + "connects_automatically": "Once it's running, this page connects automatically — or click Detect daemon in the toolbar popup." + }, + "install": { + "title_install": "Install antd", + "title_update": "Update antd", + "step_run": "Run the installer that just downloaded ({file}).", + "step2_install": "It starts antd and sets it to launch on login.", + "step2_update": "It replaces your current antd and restarts it.", + "step_detected": "This panel updates automatically once antd is detected.", + "waiting": "Waiting for antd…", + "other_platforms": "Other platforms or manual install:", + "releases_link": "antd releases", + "see_releases": "(see releases page)" + }, + "downloads": { + "progress_pct": "Downloading… {pct}% ({received} / {total})", + "progress_indeterminate": "Downloading… {received}", + "open_folder": "Open folder", + "failed": "Failed" + }, + "settings": { + "daemon_url": "Daemon URL", + "auto_fetch": "Auto-fetch inline resources", + "check_updates": "Check for antd updates", + "saving": "Saving…", + "saved": "Saved!", + "language": "Language", + "language_system": "System default" + }, + "onboarding": { + "welcome_title": "Welcome to Autonomi", + "welcome_lede": "You're almost ready to browse content from the Autonomi network. One quick setup step and you're in.", + "status_checking": "Checking for the network daemon…", + "step1_title": "Download the network daemon", + "step1_body": "Autonomi content lives on a decentralized network. A small local program called antd runs on your computer and fetches that content for the extension — your browser can't reach the network on its own. It runs quietly in the background and only listens on your own machine.", + "download_for": "Download for {platform}", + "your_platform": "your platform", + "all_downloads": "All downloads on GitHub", + "step2_title": "Run the installer", + "step2_body": "Open the file you just downloaded and follow the prompts. It installs antd, starts it, and sets it to launch automatically each time you sign in — so you only do this once.", + "step3_title": "Check the extension for a connection", + "step3_body": "This page detects the daemon automatically. Once it's running, the banner above turns green and you're connected to the network. You can also click the Autonomi icon in your browser toolbar any time to see your status.", + "done_title": "🎉 You're connected!", + "done_body": "The extension can now load Autonomi content. Visit a page with autonomi:// references, or open the toolbar popup to see what's detected.", + "os_undetected": "We couldn't detect your operating system — pick the right build on GitHub.", + "downloading_asset": "Downloading {asset}…", + "download_failed_fallback": "Download failed — opening the GitHub releases page instead.", + "banner_connected": "Connected to the Autonomi network", + "banner_idle": "Network daemon not detected — follow the steps below. This page connects automatically once it's running.", + "banner_preview": "Preview mode — install the extension to detect the daemon." + }, + "content": { + "download": "Download", + "open": "Open", + "fetching": "Fetching…", + "downloading_pct": "Downloading… {pct}%", + "download_failed": "Download failed", + "title_download": "Download from the Autonomi network", + "title_open": "Open the downloaded file", + "failed_to_load": "Failed to load from Autonomi" + } +} diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json new file mode 100644 index 0000000..b82067f --- /dev/null +++ b/src/i18n/locales/es.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Descargar", + "save": "Guardar", + "connected": "Conectado", + "checking": "Comprobando…", + "downloading": "Descargando…", + "settings": "Ajustes", + "downloads": "Descargas", + "unknown": "desconocido" + }, + "status": { + "not_detected": "Daemon no detectado", + "not_running": "El daemon no está en ejecución" + }, + "popup": { + "version_too_old": "Esta versión de antd es demasiado antigua. La extensión necesita {min} o una versión más reciente.", + "update_antd": "Actualizar antd", + "prerelease_warning": "Esta es una compilación preliminar de antd ({version}). La extensión solo admite versiones estables.", + "install_stable": "Instalar la versión estable", + "update_available": "Actualización disponible: {version}", + "get_latest": "Obtener la última versión", + "resources_heading": "Recursos en esta página", + "no_resources": "No se detectaron referencias autonomi://.", + "clear_finished": "Borrar finalizadas", + "no_downloads": "Aún no hay descargas.", + "disconnected_help": "La extensión necesita el daemon de Autonomi (antd) para obtener contenido de la red.", + "detect_daemon": "Detectar daemon", + "detecting": "Detectando…", + "download_daemon": "Descargar daemon", + "then_detect_prefix": "Luego haz clic en Detectar daemon arriba, o", + "open_setup_guide": "abre la guía de configuración completa", + "setup_guide": "Guía de configuración" + }, + "guide": { + "summary": "¿Ya instalaste antd? Encuéntralo y ejecútalo", + "reach_antd": "Si configuraste antd antes, puede que simplemente esté detenido, o ejecutándose sin la opción que la extensión necesita. La extensión accede a antd en {url} y necesita que se inicie con la opción --cors.", + "step1_terminal": "1 · Abre una terminal", + "step2_start": "2 · Inicia el daemon", + "terminal_on": "En {os}: {instr}.", + "terminal_generic": "Abre tu aplicación de terminal.", + "terminal": { + "windows": "presiona Win, escribe “PowerShell” y luego Enter", + "macos": "presiona Cmd+Space, escribe “Terminal” y luego Enter", + "linux": "presiona Ctrl+Alt+T (o abre tu aplicación de terminal)" + }, + "cmd_not_found": "Mantén esa ventana abierta mientras navegas. Si ves “command not found”, antd no está en tu PATH; ejecútalo usando la ruta completa que se muestra abajo (agregando igualmente --cors).", + "where_to_find": "Dónde encontrarlo", + "label_program": "Programa", + "label_running_check": "Comprobación de ejecución", + "path_varies": "varía según la plataforma; consulta la guía de configuración", + "path_varies_short": "varía según la plataforma", + "portfile_hint": "— este archivo aparece una vez que antd se ha iniciado.", + "connects_automatically": "Una vez que esté en ejecución, esta página se conecta automáticamente, o haz clic en Detectar daemon en el menú emergente de la barra de herramientas." + }, + "install": { + "title_install": "Instalar antd", + "title_update": "Actualizar antd", + "step_run": "Ejecuta el instalador que acabas de descargar ({file}).", + "step2_install": "Inicia antd y lo configura para que se ejecute al iniciar sesión.", + "step2_update": "Reemplaza tu antd actual y lo reinicia.", + "step_detected": "Este panel se actualiza automáticamente una vez que se detecta antd.", + "waiting": "Esperando a antd…", + "other_platforms": "Otras plataformas o instalación manual:", + "releases_link": "Versiones de antd", + "see_releases": "(consulta la página de versiones)" + }, + "downloads": { + "progress_pct": "Descargando… {pct}% ({received} / {total})", + "progress_indeterminate": "Descargando… {received}", + "open_folder": "Abrir carpeta", + "failed": "Error" + }, + "settings": { + "daemon_url": "URL del daemon", + "auto_fetch": "Obtener recursos incrustados automáticamente", + "check_updates": "Buscar actualizaciones de antd", + "saving": "Guardando…", + "saved": "¡Guardado!", + "language": "Idioma", + "language_system": "Predeterminado del sistema" + }, + "onboarding": { + "welcome_title": "Te damos la bienvenida a Autonomi", + "welcome_lede": "Ya casi estás listo para explorar contenido de la red Autonomi. Un rápido paso de configuración y estarás dentro.", + "status_checking": "Buscando el daemon de la red…", + "step1_title": "Descarga el daemon de la red", + "step1_body": "El contenido de Autonomi vive en una red descentralizada. Un pequeño programa local llamado antd se ejecuta en tu computadora y obtiene ese contenido para la extensión: tu navegador no puede acceder a la red por sí solo. Se ejecuta silenciosamente en segundo plano y solo escucha en tu propia máquina.", + "download_for": "Descargar para {platform}", + "your_platform": "tu plataforma", + "all_downloads": "Todas las descargas en GitHub", + "step2_title": "Ejecuta el instalador", + "step2_body": "Abre el archivo que acabas de descargar y sigue las indicaciones. Instala antd, lo inicia y lo configura para que se ejecute automáticamente cada vez que inicias sesión, así que solo tienes que hacer esto una vez.", + "step3_title": "Comprueba la conexión en la extensión", + "step3_body": "Esta página detecta el daemon automáticamente. Una vez que esté en ejecución, el banner de arriba se pone verde y estarás conectado a la red. También puedes hacer clic en el icono de Autonomi en la barra de herramientas de tu navegador en cualquier momento para ver tu estado.", + "done_title": "🎉 ¡Estás conectado!", + "done_body": "La extensión ya puede cargar contenido de Autonomi. Visita una página con referencias autonomi://, o abre el menú emergente de la barra de herramientas para ver lo que se ha detectado.", + "os_undetected": "No pudimos detectar tu sistema operativo; elige la versión correcta en GitHub.", + "downloading_asset": "Descargando {asset}…", + "download_failed_fallback": "La descarga falló; abriendo la página de versiones de GitHub en su lugar.", + "banner_connected": "Conectado a la red Autonomi", + "banner_idle": "Daemon de la red no detectado; sigue los pasos a continuación. Esta página se conecta automáticamente una vez que esté en ejecución.", + "banner_preview": "Modo de vista previa: instala la extensión para detectar el daemon." + }, + "content": { + "download": "Descargar", + "open": "Abrir", + "fetching": "Obteniendo…", + "downloading_pct": "Descargando… {pct}%", + "download_failed": "La descarga falló", + "title_download": "Descargar de la red Autonomi", + "title_open": "Abrir el archivo descargado", + "failed_to_load": "Error al cargar desde Autonomi" + } +} diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json new file mode 100644 index 0000000..072cd57 --- /dev/null +++ b/src/i18n/locales/fr.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Télécharger", + "save": "Enregistrer", + "connected": "Connecté", + "checking": "Vérification…", + "downloading": "Téléchargement…", + "settings": "Paramètres", + "downloads": "Téléchargements", + "unknown": "inconnu" + }, + "status": { + "not_detected": "Démon non détecté", + "not_running": "Le démon n'est pas en cours d'exécution" + }, + "popup": { + "version_too_old": "Cette version d'antd est trop ancienne. L'extension nécessite {min} ou une version plus récente.", + "update_antd": "Mettre à jour antd", + "prerelease_warning": "Ceci est une préversion d'antd ({version}). L'extension ne prend en charge que les versions stables.", + "install_stable": "Installer la version stable", + "update_available": "Mise à jour disponible : {version}", + "get_latest": "Obtenir la dernière version", + "resources_heading": "Ressources sur cette page", + "no_resources": "Aucune référence autonomi:// détectée.", + "clear_finished": "Effacer les éléments terminés", + "no_downloads": "Aucun téléchargement pour le moment.", + "disconnected_help": "L'extension a besoin du démon Autonomi (antd) pour récupérer du contenu depuis le réseau.", + "detect_daemon": "Détecter le démon", + "detecting": "Détection…", + "download_daemon": "Télécharger le démon", + "then_detect_prefix": "Puis cliquez sur Détecter le démon ci-dessus, ou", + "open_setup_guide": "ouvrez le guide de configuration complet", + "setup_guide": "Guide de configuration" + }, + "guide": { + "summary": "antd déjà installé ? Trouvez-le et exécutez-le", + "reach_antd": "Si vous avez déjà configuré antd, il est peut-être simplement arrêté — ou en cours d'exécution sans l'option dont l'extension a besoin. L'extension accède à antd à l'adresse {url} et nécessite qu'il soit démarré avec l'option --cors.", + "step1_terminal": "1 · Ouvrez un terminal", + "step2_start": "2 · Démarrez le démon", + "terminal_on": "Sur {os} : {instr}.", + "terminal_generic": "Ouvrez votre application de terminal.", + "terminal": { + "windows": "appuyez sur Win, tapez « PowerShell », puis Enter", + "macos": "appuyez sur Cmd+Space, tapez « Terminal », puis Enter", + "linux": "appuyez sur Ctrl+Alt+T (ou ouvrez votre application de terminal)" + }, + "cmd_not_found": "Gardez cette fenêtre ouverte pendant que vous naviguez. Si vous voyez « command not found », antd n'est pas dans votre PATH — exécutez-le à l'aide du chemin complet indiqué ci-dessous (en ajoutant toujours --cors).", + "where_to_find": "Où le trouver", + "label_program": "Programme", + "label_running_check": "Vérification de l'exécution", + "path_varies": "varie selon la plateforme — voir le guide de configuration", + "path_varies_short": "varie selon la plateforme", + "portfile_hint": "— ce fichier apparaît une fois qu'antd a démarré.", + "connects_automatically": "Une fois qu'il est en cours d'exécution, cette page se connecte automatiquement — ou cliquez sur Détecter le démon dans la fenêtre contextuelle de la barre d'outils." + }, + "install": { + "title_install": "Installer antd", + "title_update": "Mettre à jour antd", + "step_run": "Exécutez le programme d'installation qui vient d'être téléchargé ({file}).", + "step2_install": "Il démarre antd et le configure pour se lancer à la connexion.", + "step2_update": "Il remplace votre antd actuel et le redémarre.", + "step_detected": "Ce panneau se met à jour automatiquement une fois qu'antd est détecté.", + "waiting": "En attente d'antd…", + "other_platforms": "Autres plateformes ou installation manuelle :", + "releases_link": "Versions d'antd", + "see_releases": "(voir la page des versions)" + }, + "downloads": { + "progress_pct": "Téléchargement… {pct}% ({received} / {total})", + "progress_indeterminate": "Téléchargement… {received}", + "open_folder": "Ouvrir le dossier", + "failed": "Échec" + }, + "settings": { + "daemon_url": "URL du démon", + "auto_fetch": "Récupérer automatiquement les ressources intégrées", + "check_updates": "Rechercher les mises à jour d'antd", + "saving": "Enregistrement…", + "saved": "Enregistré !", + "language": "Langue", + "language_system": "Valeur par défaut du système" + }, + "onboarding": { + "welcome_title": "Bienvenue sur Autonomi", + "welcome_lede": "Vous êtes presque prêt à parcourir le contenu du réseau Autonomi. Une petite étape de configuration et vous y êtes.", + "status_checking": "Recherche du démon réseau…", + "step1_title": "Téléchargez le démon réseau", + "step1_body": "Le contenu d'Autonomi réside sur un réseau décentralisé. Un petit programme local appelé antd s'exécute sur votre ordinateur et récupère ce contenu pour l'extension — votre navigateur ne peut pas atteindre le réseau par lui-même. Il s'exécute discrètement en arrière-plan et n'écoute que sur votre propre machine.", + "download_for": "Télécharger pour {platform}", + "your_platform": "votre plateforme", + "all_downloads": "Tous les téléchargements sur GitHub", + "step2_title": "Exécutez le programme d'installation", + "step2_body": "Ouvrez le fichier que vous venez de télécharger et suivez les instructions. Il installe antd, le démarre et le configure pour qu'il se lance automatiquement à chaque connexion — vous ne faites donc cela qu'une seule fois.", + "step3_title": "Vérifiez la connexion dans l'extension", + "step3_body": "Cette page détecte le démon automatiquement. Une fois qu'il est en cours d'exécution, la bannière ci-dessus devient verte et vous êtes connecté au réseau. Vous pouvez également cliquer sur l'icône Autonomi dans la barre d'outils de votre navigateur à tout moment pour voir votre statut.", + "done_title": "🎉 Vous êtes connecté !", + "done_body": "L'extension peut désormais charger du contenu Autonomi. Visitez une page contenant des références autonomi://, ou ouvrez la fenêtre contextuelle de la barre d'outils pour voir ce qui a été détecté.", + "os_undetected": "Nous n'avons pas pu détecter votre système d'exploitation — choisissez la bonne version sur GitHub.", + "downloading_asset": "Téléchargement de {asset}…", + "download_failed_fallback": "Échec du téléchargement — ouverture de la page des versions GitHub à la place.", + "banner_connected": "Connecté au réseau Autonomi", + "banner_idle": "Démon réseau non détecté — suivez les étapes ci-dessous. Cette page se connecte automatiquement une fois qu'il est en cours d'exécution.", + "banner_preview": "Mode aperçu — installez l'extension pour détecter le démon." + }, + "content": { + "download": "Télécharger", + "open": "Ouvrir", + "fetching": "Récupération…", + "downloading_pct": "Téléchargement… {pct}%", + "download_failed": "Échec du téléchargement", + "title_download": "Télécharger depuis le réseau Autonomi", + "title_open": "Ouvrir le fichier téléchargé", + "failed_to_load": "Échec du chargement depuis Autonomi" + } +} diff --git a/src/i18n/locales/he.json b/src/i18n/locales/he.json new file mode 100644 index 0000000..66f45d1 --- /dev/null +++ b/src/i18n/locales/he.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "הורד", + "save": "שמור", + "connected": "מחובר", + "checking": "בודק…", + "downloading": "מוריד…", + "settings": "הגדרות", + "downloads": "הורדות", + "unknown": "לא ידוע" + }, + "status": { + "not_detected": "הדמון לא זוהה", + "not_running": "הדמון אינו פועל" + }, + "popup": { + "version_too_old": "גרסת antd זו ישנה מדי. התוסף זקוק ל-{min} או חדשה יותר.", + "update_antd": "עדכן את antd", + "prerelease_warning": "זוהי גרסת antd מוקדמת ({version}). התוסף תומך בגרסאות יציבות בלבד.", + "install_stable": "התקן את הגרסה היציבה", + "update_available": "עדכון זמין: {version}", + "get_latest": "קבל את הגרסה האחרונה", + "resources_heading": "משאבים בעמוד זה", + "no_resources": "לא זוהו הפניות autonomi://.", + "clear_finished": "נקה שהושלמו", + "no_downloads": "אין הורדות עדיין.", + "disconnected_help": "התוסף זקוק לדמון של Autonomi ‏(antd) כדי להביא תוכן מהרשת.", + "detect_daemon": "זהה דמון", + "detecting": "מזהה…", + "download_daemon": "הורד דמון", + "then_detect_prefix": "לאחר מכן לחץ על ‘זהה דמון’ למעלה, או", + "open_setup_guide": "פתח את מדריך ההתקנה המלא", + "setup_guide": "מדריך התקנה" + }, + "guide": { + "summary": "כבר התקנת את antd? מצא אותו והפעל אותו", + "reach_antd": "אם הגדרת את antd בעבר, ייתכן שהוא פשוט מופסק — או פועל ללא האפשרות שהתוסף זקוק לה. התוסף מגיע ל-antd בכתובת {url} וזקוק להפעלתו עם האפשרות --cors.", + "step1_terminal": "1 · פתח את Terminal", + "step2_start": "2 · הפעל את הדמון", + "terminal_on": "ב-{os}: {instr}.", + "terminal_generic": "פתח את אפליקציית Terminal שלך.", + "terminal": { + "windows": "לחץ Win, הקלד “PowerShell”, ואז Enter", + "macos": "לחץ Cmd+Space, הקלד “Terminal”, ואז Enter", + "linux": "לחץ Ctrl+Alt+T (או פתח את אפליקציית Terminal שלך)" + }, + "cmd_not_found": "השאר את החלון פתוח בזמן הגלישה. אם מופיע “command not found”, ‏antd אינו נמצא ב-PATH שלך — הפעל אותו באמצעות הנתיב המלא המוצג למטה (עדיין עם הוספת --cors).", + "where_to_find": "היכן למצוא אותו", + "label_program": "תוכנית", + "label_running_check": "בדיקת פעילות", + "path_varies": "משתנה לפי הפלטפורמה — ראה את מדריך ההתקנה", + "path_varies_short": "משתנה לפי הפלטפורמה", + "portfile_hint": "— קובץ זה מופיע לאחר ש-antd הופעל.", + "connects_automatically": "לאחר שהוא פועל, עמוד זה מתחבר אוטומטית — או לחץ על ‘זהה דמון’ בחלון הקופץ של סרגל הכלים." + }, + "install": { + "title_install": "התקן את antd", + "title_update": "עדכן את antd", + "step_run": "הפעל את תוכנת ההתקנה שהורדה זה עתה ({file}).", + "step2_install": "היא מפעילה את antd ומגדירה אותו לעלות בעת הכניסה למערכת.", + "step2_update": "היא מחליפה את antd הנוכחי שלך ומפעילה אותו מחדש.", + "step_detected": "פאנל זה מתעדכן אוטומטית לאחר ש-antd מזוהה.", + "waiting": "ממתין ל-antd…", + "other_platforms": "פלטפורמות אחרות או התקנה ידנית:", + "releases_link": "גרסאות antd", + "see_releases": "(ראה את עמוד הגרסאות)" + }, + "downloads": { + "progress_pct": "מוריד… {pct}% ({received} / {total})", + "progress_indeterminate": "מוריד… {received}", + "open_folder": "פתח תיקייה", + "failed": "נכשל" + }, + "settings": { + "daemon_url": "כתובת URL של הדמון", + "auto_fetch": "הבאה אוטומטית של משאבים מוטבעים", + "check_updates": "בדוק אם יש עדכונים ל-antd", + "saving": "שומר…", + "saved": "נשמר!", + "language": "שפה", + "language_system": "ברירת המחדל של המערכת" + }, + "onboarding": { + "welcome_title": "ברוך הבא ל-Autonomi", + "welcome_lede": "אתה כמעט מוכן לגלוש בתוכן מרשת Autonomi. שלב הגדרה מהיר אחד ואתה בפנים.", + "status_checking": "בודק אם דמון הרשת קיים…", + "step1_title": "הורד את דמון הרשת", + "step1_body": "תוכן Autonomi נמצא ברשת מבוזרת. תוכנית מקומית קטנה בשם antd פועלת במחשב שלך ומביאה את התוכן הזה עבור התוסף — הדפדפן שלך אינו יכול להגיע לרשת בכוחות עצמו. היא פועלת בשקט ברקע ומאזינה רק במחשב שלך.", + "download_for": "הורד עבור {platform}", + "your_platform": "הפלטפורמה שלך", + "all_downloads": "כל ההורדות ב-GitHub", + "step2_title": "הפעל את תוכנת ההתקנה", + "step2_body": "פתח את הקובץ שהורדת זה עתה ופעל לפי ההנחיות. היא מתקינה את antd, מפעילה אותו, ומגדירה אותו לעלות אוטומטית בכל פעם שאתה נכנס — כך שתעשה זאת רק פעם אחת.", + "step3_title": "בדוק בתוסף אם קיים חיבור", + "step3_body": "עמוד זה מזהה את הדמון אוטומטית. לאחר שהוא פועל, הכרזה שלמעלה הופכת לירוקה ואתה מחובר לרשת. תוכל גם ללחוץ על סמל Autonomi בסרגל הכלים של הדפדפן בכל עת כדי לראות את הסטטוס שלך.", + "done_title": "🎉 אתה מחובר!", + "done_body": "התוסף יכול כעת לטעון תוכן Autonomi. בקר בעמוד עם הפניות autonomi://, או פתח את החלון הקופץ של סרגל הכלים כדי לראות מה זוהה.", + "os_undetected": "לא הצלחנו לזהות את מערכת ההפעלה שלך — בחר את הגרסה המתאימה ב-GitHub.", + "downloading_asset": "מוריד את {asset}…", + "download_failed_fallback": "ההורדה נכשלה — פותח במקום זאת את עמוד הגרסאות של GitHub.", + "banner_connected": "מחובר לרשת Autonomi", + "banner_idle": "דמון הרשת לא זוהה — פעל לפי השלבים שלמטה. עמוד זה מתחבר אוטומטית לאחר שהוא פועל.", + "banner_preview": "מצב תצוגה מקדימה — התקן את התוסף כדי לזהות את הדמון." + }, + "content": { + "download": "הורד", + "open": "פתח", + "fetching": "מביא…", + "downloading_pct": "מוריד… {pct}%", + "download_failed": "ההורדה נכשלה", + "title_download": "הורד מרשת Autonomi", + "title_open": "פתח את הקובץ שהורד", + "failed_to_load": "הטעינה מ-Autonomi נכשלה" + } +} diff --git a/src/i18n/locales/id.json b/src/i18n/locales/id.json new file mode 100644 index 0000000..f2e52aa --- /dev/null +++ b/src/i18n/locales/id.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Unduh", + "save": "Simpan", + "connected": "Terhubung", + "checking": "Memeriksa…", + "downloading": "Mengunduh…", + "settings": "Pengaturan", + "downloads": "Unduhan", + "unknown": "tidak diketahui" + }, + "status": { + "not_detected": "Daemon tidak terdeteksi", + "not_running": "Daemon tidak berjalan" + }, + "popup": { + "version_too_old": "Versi antd ini terlalu lama. Ekstensi memerlukan {min} atau yang lebih baru.", + "update_antd": "Perbarui antd", + "prerelease_warning": "Ini adalah build antd pra-rilis ({version}). Ekstensi hanya mendukung rilis stabil.", + "install_stable": "Instal rilis stabil", + "update_available": "Pembaruan tersedia: {version}", + "get_latest": "Dapatkan yang terbaru", + "resources_heading": "Sumber daya di halaman ini", + "no_resources": "Tidak ada referensi autonomi:// yang terdeteksi.", + "clear_finished": "Bersihkan yang selesai", + "no_downloads": "Belum ada unduhan.", + "disconnected_help": "Ekstensi memerlukan daemon Autonomi (antd) untuk mengambil konten dari jaringan.", + "detect_daemon": "Deteksi daemon", + "detecting": "Mendeteksi…", + "download_daemon": "Unduh daemon", + "then_detect_prefix": "Lalu klik Deteksi daemon di atas, atau", + "open_setup_guide": "buka panduan penyiapan lengkap", + "setup_guide": "Panduan penyiapan" + }, + "guide": { + "summary": "Sudah menginstal antd? Temukan & jalankan", + "reach_antd": "Jika Anda menyiapkan antd sebelumnya, mungkin saja ia hanya berhenti — atau berjalan tanpa opsi yang dibutuhkan ekstensi. Ekstensi menjangkau antd di {url} dan memerlukannya dijalankan dengan opsi --cors.", + "step1_terminal": "1 · Buka terminal", + "step2_start": "2 · Jalankan daemon", + "terminal_on": "Di {os}: {instr}.", + "terminal_generic": "Buka aplikasi terminal Anda.", + "terminal": { + "windows": "tekan Win, ketik “PowerShell”, lalu Enter", + "macos": "tekan Cmd+Space, ketik “Terminal”, lalu Enter", + "linux": "tekan Ctrl+Alt+T (atau buka aplikasi terminal Anda)" + }, + "cmd_not_found": "Biarkan jendela itu tetap terbuka saat Anda menjelajah. Jika Anda melihat “command not found”, antd tidak ada di PATH Anda — jalankan menggunakan jalur lengkap yang ditampilkan di bawah (tetap menambahkan --cors).", + "where_to_find": "Tempat menemukannya", + "label_program": "Program", + "label_running_check": "Pemeriksaan berjalan", + "path_varies": "bervariasi menurut platform — lihat panduan penyiapan", + "path_varies_short": "bervariasi menurut platform", + "portfile_hint": "— berkas ini muncul setelah antd dimulai.", + "connects_automatically": "Setelah berjalan, halaman ini terhubung secara otomatis — atau klik Deteksi daemon di pop-up bilah alat." + }, + "install": { + "title_install": "Instal antd", + "title_update": "Perbarui antd", + "step_run": "Jalankan penginstal yang baru saja diunduh ({file}).", + "step2_install": "Ia memulai antd dan mengaturnya untuk diluncurkan saat masuk.", + "step2_update": "Ia menggantikan antd Anda saat ini dan memulainya ulang.", + "step_detected": "Panel ini diperbarui secara otomatis setelah antd terdeteksi.", + "waiting": "Menunggu antd…", + "other_platforms": "Platform lain atau instalasi manual:", + "releases_link": "Rilis antd", + "see_releases": "(lihat halaman rilis)" + }, + "downloads": { + "progress_pct": "Mengunduh… {pct}% ({received} / {total})", + "progress_indeterminate": "Mengunduh… {received}", + "open_folder": "Buka folder", + "failed": "Gagal" + }, + "settings": { + "daemon_url": "URL daemon", + "auto_fetch": "Ambil otomatis sumber daya sebaris", + "check_updates": "Periksa pembaruan antd", + "saving": "Menyimpan…", + "saved": "Tersimpan!", + "language": "Bahasa", + "language_system": "Default sistem" + }, + "onboarding": { + "welcome_title": "Selamat datang di Autonomi", + "welcome_lede": "Anda hampir siap menjelajahi konten dari jaringan Autonomi. Satu langkah penyiapan cepat dan Anda siap.", + "status_checking": "Memeriksa daemon jaringan…", + "step1_title": "Unduh daemon jaringan", + "step1_body": "Konten Autonomi berada di jaringan terdesentralisasi. Sebuah program lokal kecil bernama antd berjalan di komputer Anda dan mengambil konten itu untuk ekstensi — browser Anda tidak dapat menjangkau jaringan sendiri. Ia berjalan diam-diam di latar belakang dan hanya mendengarkan di mesin Anda sendiri.", + "download_for": "Unduh untuk {platform}", + "your_platform": "platform Anda", + "all_downloads": "Semua unduhan di GitHub", + "step2_title": "Jalankan penginstal", + "step2_body": "Buka berkas yang baru saja Anda unduh dan ikuti petunjuknya. Ia menginstal antd, memulainya, dan mengaturnya untuk diluncurkan secara otomatis setiap kali Anda masuk — jadi Anda hanya melakukannya sekali.", + "step3_title": "Periksa koneksi pada ekstensi", + "step3_body": "Halaman ini mendeteksi daemon secara otomatis. Setelah berjalan, spanduk di atas berubah menjadi hijau dan Anda terhubung ke jaringan. Anda juga dapat mengklik ikon Autonomi di bilah alat browser Anda kapan saja untuk melihat status Anda.", + "done_title": "🎉 Anda terhubung!", + "done_body": "Ekstensi kini dapat memuat konten Autonomi. Kunjungi halaman dengan referensi autonomi://, atau buka pop-up bilah alat untuk melihat apa yang terdeteksi.", + "os_undetected": "Kami tidak dapat mendeteksi sistem operasi Anda — pilih build yang tepat di GitHub.", + "downloading_asset": "Mengunduh {asset}…", + "download_failed_fallback": "Unduhan gagal — membuka halaman rilis GitHub sebagai gantinya.", + "banner_connected": "Terhubung ke jaringan Autonomi", + "banner_idle": "Daemon jaringan tidak terdeteksi — ikuti langkah-langkah di bawah. Halaman ini terhubung secara otomatis setelah berjalan.", + "banner_preview": "Mode pratinjau — instal ekstensi untuk mendeteksi daemon." + }, + "content": { + "download": "Unduh", + "open": "Buka", + "fetching": "Mengambil…", + "downloading_pct": "Mengunduh… {pct}%", + "download_failed": "Unduhan gagal", + "title_download": "Unduh dari jaringan Autonomi", + "title_open": "Buka berkas yang diunduh", + "failed_to_load": "Gagal memuat dari Autonomi" + } +} diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json new file mode 100644 index 0000000..0f2bfa6 --- /dev/null +++ b/src/i18n/locales/ja.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "ダウンロード", + "save": "保存", + "connected": "接続済み", + "checking": "確認中…", + "downloading": "ダウンロード中…", + "settings": "設定", + "downloads": "ダウンロード", + "unknown": "不明" + }, + "status": { + "not_detected": "デーモンが検出されません", + "not_running": "デーモンが実行されていません" + }, + "popup": { + "version_too_old": "この antd のバージョンは古すぎます。この拡張機能には {min} 以降が必要です。", + "update_antd": "antd を更新", + "prerelease_warning": "これはプレリリース版の antd ビルド({version})です。この拡張機能は安定版リリースのみをサポートしています。", + "install_stable": "安定版リリースをインストール", + "update_available": "更新が利用可能です:{version}", + "get_latest": "最新版を入手", + "resources_heading": "このページのリソース", + "no_resources": "autonomi:// の参照は検出されませんでした。", + "clear_finished": "完了したものをクリア", + "no_downloads": "まだダウンロードはありません。", + "disconnected_help": "この拡張機能がネットワークからコンテンツを取得するには、Autonomi デーモン(antd)が必要です。", + "detect_daemon": "デーモンを検出", + "detecting": "検出中…", + "download_daemon": "デーモンをダウンロード", + "then_detect_prefix": "その後、上の「デーモンを検出」をクリックするか、", + "open_setup_guide": "完全なセットアップガイドを開く", + "setup_guide": "セットアップガイド" + }, + "guide": { + "summary": "すでに antd をインストール済みですか? 見つけて実行する", + "reach_antd": "以前に antd をセットアップした場合は、単に停止しているか、拡張機能に必要なオプションなしで実行されているだけかもしれません。この拡張機能は {url} で antd に接続するため、--cors オプションを付けて起動する必要があります。", + "step1_terminal": "1 · ターミナルを開く", + "step2_start": "2 · デーモンを起動する", + "terminal_on": "{os} の場合:{instr}。", + "terminal_generic": "ターミナルアプリを開きます。", + "terminal": { + "windows": "Win キーを押し、「PowerShell」と入力して Enter キーを押す", + "macos": "Cmd+Space を押し、「Terminal」と入力して Enter キーを押す", + "linux": "Ctrl+Alt+T を押す(またはターミナルアプリを開く)" + }, + "cmd_not_found": "ブラウジング中はそのウィンドウを開いたままにしてください。\"command not found\" と表示される場合は、antd が PATH に含まれていません。下に表示されるフルパスを使って実行してください(その際も --cors を付けます)。", + "where_to_find": "見つける場所", + "label_program": "プログラム", + "label_running_check": "実行確認", + "path_varies": "プラットフォームによって異なります — セットアップガイドを参照してください", + "path_varies_short": "プラットフォームによって異なります", + "portfile_hint": "— このファイルは antd が起動すると表示されます。", + "connects_automatically": "起動すると、このページは自動的に接続します — または、ツールバーのポップアップで「デーモンを検出」をクリックしてください。" + }, + "install": { + "title_install": "antd をインストール", + "title_update": "antd を更新", + "step_run": "ダウンロードしたインストーラー({file})を実行します。", + "step2_install": "antd が起動し、ログイン時に自動的に起動するよう設定されます。", + "step2_update": "現在の antd を置き換えて再起動します。", + "step_detected": "antd が検出されると、このパネルは自動的に更新されます。", + "waiting": "antd を待機中…", + "other_platforms": "その他のプラットフォーム、または手動インストール:", + "releases_link": "antd のリリース", + "see_releases": "(リリースページを参照)" + }, + "downloads": { + "progress_pct": "ダウンロード中… {pct}%({received} / {total})", + "progress_indeterminate": "ダウンロード中… {received}", + "open_folder": "フォルダーを開く", + "failed": "失敗" + }, + "settings": { + "daemon_url": "デーモンの URL", + "auto_fetch": "インラインリソースを自動取得", + "check_updates": "antd の更新を確認", + "saving": "保存中…", + "saved": "保存しました!", + "language": "言語", + "language_system": "システムのデフォルト" + }, + "onboarding": { + "welcome_title": "Autonomi へようこそ", + "welcome_lede": "Autonomi ネットワークのコンテンツを閲覧する準備はもうすぐ整います。簡単なセットアップを 1 ステップ行えば完了です。", + "status_checking": "ネットワークデーモンを確認中…", + "step1_title": "ネットワークデーモンをダウンロード", + "step1_body": "Autonomi のコンテンツは分散型ネットワーク上に存在します。antd という小さなローカルプログラムがコンピューター上で実行され、拡張機能のためにそのコンテンツを取得します — ブラウザ単体ではネットワークにアクセスできません。antd はバックグラウンドで静かに動作し、お使いのマシン上でのみ待ち受けます。", + "download_for": "{platform} 用をダウンロード", + "your_platform": "お使いのプラットフォーム", + "all_downloads": "GitHub のすべてのダウンロード", + "step2_title": "インストーラーを実行", + "step2_body": "ダウンロードしたファイルを開き、画面の指示に従ってください。antd をインストールして起動し、サインインするたびに自動的に起動するよう設定します — この操作は一度だけで済みます。", + "step3_title": "拡張機能で接続を確認", + "step3_body": "このページはデーモンを自動的に検出します。起動すると上部のバナーが緑色になり、ネットワークに接続されます。ブラウザのツールバーにある Autonomi アイコンをいつでもクリックして、ステータスを確認することもできます。", + "done_title": "🎉 接続されました!", + "done_body": "拡張機能で Autonomi のコンテンツを読み込めるようになりました。autonomi:// の参照を含むページにアクセスするか、ツールバーのポップアップを開いて検出されたものを確認してください。", + "os_undetected": "オペレーティングシステムを検出できませんでした — GitHub で適切なビルドを選んでください。", + "downloading_asset": "{asset} をダウンロード中…", + "download_failed_fallback": "ダウンロードに失敗しました — 代わりに GitHub のリリースページを開きます。", + "banner_connected": "Autonomi ネットワークに接続しました", + "banner_idle": "ネットワークデーモンが検出されません — 以下の手順に従ってください。起動すると、このページは自動的に接続します。", + "banner_preview": "プレビューモード — デーモンを検出するには拡張機能をインストールしてください。" + }, + "content": { + "download": "ダウンロード", + "open": "開く", + "fetching": "取得中…", + "downloading_pct": "ダウンロード中… {pct}%", + "download_failed": "ダウンロードに失敗しました", + "title_download": "Autonomi ネットワークからダウンロード", + "title_open": "ダウンロードしたファイルを開く", + "failed_to_load": "Autonomi からの読み込みに失敗しました" + } +} diff --git a/src/i18n/locales/ko.json b/src/i18n/locales/ko.json new file mode 100644 index 0000000..9372532 --- /dev/null +++ b/src/i18n/locales/ko.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "다운로드", + "save": "저장", + "connected": "연결됨", + "checking": "확인 중…", + "downloading": "다운로드 중…", + "settings": "설정", + "downloads": "다운로드", + "unknown": "알 수 없음" + }, + "status": { + "not_detected": "데몬이 감지되지 않음", + "not_running": "데몬이 실행되고 있지 않음" + }, + "popup": { + "version_too_old": "이 antd 버전이 너무 오래되었습니다. 확장 프로그램에는 {min} 이상이 필요합니다.", + "update_antd": "antd 업데이트", + "prerelease_warning": "이것은 antd 사전 릴리스 빌드({version})입니다. 확장 프로그램은 안정 릴리스만 지원합니다.", + "install_stable": "안정 릴리스 설치", + "update_available": "업데이트 사용 가능: {version}", + "get_latest": "최신 버전 받기", + "resources_heading": "이 페이지의 리소스", + "no_resources": "autonomi:// 참조가 감지되지 않았습니다.", + "clear_finished": "완료된 항목 지우기", + "no_downloads": "아직 다운로드가 없습니다.", + "disconnected_help": "확장 프로그램이 네트워크에서 콘텐츠를 가져오려면 Autonomi 데몬(antd)이 필요합니다.", + "detect_daemon": "데몬 감지", + "detecting": "감지 중…", + "download_daemon": "데몬 다운로드", + "then_detect_prefix": "그런 다음 위의 데몬 감지를 클릭하거나,", + "open_setup_guide": "전체 설정 가이드 열기", + "setup_guide": "설정 가이드" + }, + "guide": { + "summary": "이미 antd를 설치하셨나요? 찾아서 실행하기", + "reach_antd": "이전에 antd를 설정한 적이 있다면 단순히 중지되었거나 확장 프로그램에 필요한 옵션 없이 실행되고 있을 수 있습니다. 확장 프로그램은 {url}에서 antd에 연결하며, --cors 옵션과 함께 시작해야 합니다.", + "step1_terminal": "1 · 터미널 열기", + "step2_start": "2 · 데몬 시작하기", + "terminal_on": "{os}에서: {instr}.", + "terminal_generic": "터미널 앱을 여세요.", + "terminal": { + "windows": "Win 키를 누르고 'PowerShell'을 입력한 다음 Enter 키를 누르세요", + "macos": "Cmd+Space를 누르고 'Terminal'을 입력한 다음 Enter 키를 누르세요", + "linux": "Ctrl+Alt+T를 누르세요 (또는 터미널 앱을 여세요)" + }, + "cmd_not_found": "브라우징하는 동안 그 창을 열어 두세요. \"command not found\"가 표시되면 antd가 PATH에 없는 것입니다 — 아래에 표시된 전체 경로를 사용하여 실행하세요(이때도 --cors를 추가합니다).", + "where_to_find": "찾을 위치", + "label_program": "프로그램", + "label_running_check": "실행 확인", + "path_varies": "플랫폼에 따라 다름 — 설정 가이드를 참조하세요", + "path_varies_short": "플랫폼에 따라 다름", + "portfile_hint": "— 이 파일은 antd가 시작되면 나타납니다.", + "connects_automatically": "실행되면 이 페이지가 자동으로 연결됩니다 — 또는 도구 모음 팝업에서 데몬 감지를 클릭하세요." + }, + "install": { + "title_install": "antd 설치", + "title_update": "antd 업데이트", + "step_run": "방금 다운로드한 설치 프로그램({file})을 실행하세요.", + "step2_install": "antd를 시작하고 로그인 시 실행되도록 설정합니다.", + "step2_update": "현재 antd를 교체하고 다시 시작합니다.", + "step_detected": "antd가 감지되면 이 패널이 자동으로 업데이트됩니다.", + "waiting": "antd를 기다리는 중…", + "other_platforms": "다른 플랫폼 또는 수동 설치:", + "releases_link": "antd 릴리스", + "see_releases": "(릴리스 페이지 참조)" + }, + "downloads": { + "progress_pct": "다운로드 중… {pct}% ({received} / {total})", + "progress_indeterminate": "다운로드 중… {received}", + "open_folder": "폴더 열기", + "failed": "실패" + }, + "settings": { + "daemon_url": "데몬 URL", + "auto_fetch": "인라인 리소스 자동 가져오기", + "check_updates": "antd 업데이트 확인", + "saving": "저장 중…", + "saved": "저장되었습니다!", + "language": "언어", + "language_system": "시스템 기본값" + }, + "onboarding": { + "welcome_title": "Autonomi에 오신 것을 환영합니다", + "welcome_lede": "Autonomi 네트워크의 콘텐츠를 탐색할 준비가 거의 되었습니다. 간단한 설정 한 단계만 거치면 시작할 수 있습니다.", + "status_checking": "네트워크 데몬을 확인하는 중…", + "step1_title": "네트워크 데몬 다운로드", + "step1_body": "Autonomi 콘텐츠는 분산 네트워크에 있습니다. antd라는 작은 로컬 프로그램이 컴퓨터에서 실행되어 확장 프로그램을 위해 해당 콘텐츠를 가져옵니다 — 브라우저는 자체적으로 네트워크에 연결할 수 없습니다. antd는 백그라운드에서 조용히 실행되며 사용자 컴퓨터에서만 수신 대기합니다.", + "download_for": "{platform}용 다운로드", + "your_platform": "사용 중인 플랫폼", + "all_downloads": "GitHub의 모든 다운로드", + "step2_title": "설치 프로그램 실행", + "step2_body": "방금 다운로드한 파일을 열고 안내에 따르세요. antd를 설치하고 시작하며, 로그인할 때마다 자동으로 실행되도록 설정합니다 — 따라서 이 작업은 한 번만 하면 됩니다.", + "step3_title": "확장 프로그램에서 연결 확인", + "step3_body": "이 페이지는 데몬을 자동으로 감지합니다. 실행되면 위의 배너가 녹색으로 바뀌고 네트워크에 연결됩니다. 브라우저 도구 모음의 Autonomi 아이콘을 언제든지 클릭하여 상태를 확인할 수도 있습니다.", + "done_title": "🎉 연결되었습니다!", + "done_body": "이제 확장 프로그램에서 Autonomi 콘텐츠를 로드할 수 있습니다. autonomi:// 참조가 있는 페이지를 방문하거나 도구 모음 팝업을 열어 감지된 항목을 확인하세요.", + "os_undetected": "운영 체제를 감지할 수 없습니다 — GitHub에서 올바른 빌드를 선택하세요.", + "downloading_asset": "{asset} 다운로드 중…", + "download_failed_fallback": "다운로드에 실패했습니다 — 대신 GitHub 릴리스 페이지를 엽니다.", + "banner_connected": "Autonomi 네트워크에 연결됨", + "banner_idle": "네트워크 데몬이 감지되지 않음 — 아래 단계를 따르세요. 실행되면 이 페이지가 자동으로 연결됩니다.", + "banner_preview": "미리보기 모드 — 데몬을 감지하려면 확장 프로그램을 설치하세요." + }, + "content": { + "download": "다운로드", + "open": "열기", + "fetching": "가져오는 중…", + "downloading_pct": "다운로드 중… {pct}%", + "download_failed": "다운로드 실패", + "title_download": "Autonomi 네트워크에서 다운로드", + "title_open": "다운로드한 파일 열기", + "failed_to_load": "Autonomi에서 로드하지 못했습니다" + } +} diff --git a/src/i18n/locales/nl.json b/src/i18n/locales/nl.json new file mode 100644 index 0000000..5512b31 --- /dev/null +++ b/src/i18n/locales/nl.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Downloaden", + "save": "Opslaan", + "connected": "Verbonden", + "checking": "Controleren…", + "downloading": "Downloaden…", + "settings": "Instellingen", + "downloads": "Downloads", + "unknown": "onbekend" + }, + "status": { + "not_detected": "Daemon niet gedetecteerd", + "not_running": "Daemon draait niet" + }, + "popup": { + "version_too_old": "Deze antd-versie is te oud. De extensie heeft {min} of nieuwer nodig.", + "update_antd": "antd bijwerken", + "prerelease_warning": "Dit is een pre-release build van antd ({version}). De extensie ondersteunt alleen stabiele releases.", + "install_stable": "De stabiele release installeren", + "update_available": "Update beschikbaar: {version}", + "get_latest": "De nieuwste versie ophalen", + "resources_heading": "Bronnen op deze pagina", + "no_resources": "Geen autonomi://-verwijzingen gedetecteerd.", + "clear_finished": "Voltooide wissen", + "no_downloads": "Nog geen downloads.", + "disconnected_help": "De extensie heeft de Autonomi-daemon (antd) nodig om inhoud van het netwerk op te halen.", + "detect_daemon": "Daemon detecteren", + "detecting": "Detecteren…", + "download_daemon": "Daemon downloaden", + "then_detect_prefix": "Klik daarna hierboven op Daemon detecteren, of", + "open_setup_guide": "open de volledige installatiehandleiding", + "setup_guide": "Installatiehandleiding" + }, + "guide": { + "summary": "antd al geïnstalleerd? Zoek en start het", + "reach_antd": "Als u antd eerder hebt ingesteld, is het mogelijk gewoon gestopt – of draait het zonder de optie die de extensie nodig heeft. De extensie bereikt antd op {url} en heeft het nodig gestart met de optie --cors.", + "step1_terminal": "1 · Een terminal openen", + "step2_start": "2 · De daemon starten", + "terminal_on": "Op {os}: {instr}.", + "terminal_generic": "Open uw terminal-app.", + "terminal": { + "windows": "druk op Win, typ “PowerShell” en druk op Enter", + "macos": "druk op Cmd+Space, typ “Terminal” en druk op Enter", + "linux": "druk op Ctrl+Alt+T (of open uw terminal-app)" + }, + "cmd_not_found": "Houd dat venster open terwijl u surft. Als u “command not found” ziet, staat antd niet in uw PATH – voer het uit met het volledige pad dat hieronder wordt getoond (voeg nog steeds --cors toe).", + "where_to_find": "Waar u het kunt vinden", + "label_program": "Programma", + "label_running_check": "Statuscontrole", + "path_varies": "verschilt per platform – zie de installatiehandleiding", + "path_varies_short": "verschilt per platform", + "portfile_hint": "– dit bestand verschijnt zodra antd is gestart.", + "connects_automatically": "Zodra het draait, maakt deze pagina automatisch verbinding – of klik op Daemon detecteren in de werkbalk-pop-up." + }, + "install": { + "title_install": "antd installeren", + "title_update": "antd bijwerken", + "step_run": "Voer het installatieprogramma uit dat zojuist is gedownload ({file}).", + "step2_install": "Het start antd en stelt het in om bij het aanmelden te starten.", + "step2_update": "Het vervangt uw huidige antd en start het opnieuw.", + "step_detected": "Dit paneel wordt automatisch bijgewerkt zodra antd is gedetecteerd.", + "waiting": "Wachten op antd…", + "other_platforms": "Andere platforms of handmatige installatie:", + "releases_link": "antd-releases", + "see_releases": "(zie de releases-pagina)" + }, + "downloads": { + "progress_pct": "Downloaden… {pct}% ({received} / {total})", + "progress_indeterminate": "Downloaden… {received}", + "open_folder": "Map openen", + "failed": "Mislukt" + }, + "settings": { + "daemon_url": "Daemon-URL", + "auto_fetch": "Inline-bronnen automatisch ophalen", + "check_updates": "Controleren op antd-updates", + "saving": "Opslaan…", + "saved": "Opgeslagen!", + "language": "Taal", + "language_system": "Systeemstandaard" + }, + "onboarding": { + "welcome_title": "Welkom bij Autonomi", + "welcome_lede": "U bent bijna klaar om inhoud van het Autonomi-netwerk te bekijken. Nog één snelle installatiestap en u kunt aan de slag.", + "status_checking": "Zoeken naar de netwerk-daemon…", + "step1_title": "De netwerk-daemon downloaden", + "step1_body": "Autonomi-inhoud bevindt zich op een gedecentraliseerd netwerk. Een klein lokaal programma genaamd antd draait op uw computer en haalt die inhoud op voor de extensie – uw browser kan het netwerk niet zelf bereiken. Het draait rustig op de achtergrond en luistert alleen op uw eigen machine.", + "download_for": "Downloaden voor {platform}", + "your_platform": "uw platform", + "all_downloads": "Alle downloads op GitHub", + "step2_title": "Het installatieprogramma uitvoeren", + "step2_body": "Open het bestand dat u zojuist hebt gedownload en volg de aanwijzingen. Het installeert antd, start het en stelt het in om automatisch te starten telkens wanneer u zich aanmeldt – zodat u dit maar één keer hoeft te doen.", + "step3_title": "Controleer de extensie op een verbinding", + "step3_body": "Deze pagina detecteert de daemon automatisch. Zodra deze draait, wordt de banner hierboven groen en bent u verbonden met het netwerk. U kunt ook op elk moment op het Autonomi-pictogram in uw browserwerkbalk klikken om uw status te bekijken.", + "done_title": "🎉 U bent verbonden!", + "done_body": "De extensie kan nu Autonomi-inhoud laden. Bezoek een pagina met autonomi://-verwijzingen of open de werkbalk-pop-up om te zien wat er is gedetecteerd.", + "os_undetected": "We konden uw besturingssysteem niet detecteren – kies de juiste build op GitHub.", + "downloading_asset": "{asset} downloaden…", + "download_failed_fallback": "Downloaden mislukt – in plaats daarvan wordt de GitHub-releases-pagina geopend.", + "banner_connected": "Verbonden met het Autonomi-netwerk", + "banner_idle": "Netwerk-daemon niet gedetecteerd – volg de onderstaande stappen. Deze pagina maakt automatisch verbinding zodra deze draait.", + "banner_preview": "Voorbeeldmodus – installeer de extensie om de daemon te detecteren." + }, + "content": { + "download": "Downloaden", + "open": "Openen", + "fetching": "Ophalen…", + "downloading_pct": "Downloaden… {pct}%", + "download_failed": "Downloaden mislukt", + "title_download": "Downloaden van het Autonomi-netwerk", + "title_open": "Het gedownloade bestand openen", + "failed_to_load": "Laden van Autonomi mislukt" + } +} diff --git a/src/i18n/locales/pt-BR.json b/src/i18n/locales/pt-BR.json new file mode 100644 index 0000000..793b045 --- /dev/null +++ b/src/i18n/locales/pt-BR.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Baixar", + "save": "Salvar", + "connected": "Conectado", + "checking": "Verificando…", + "downloading": "Baixando…", + "settings": "Configurações", + "downloads": "Downloads", + "unknown": "desconhecido" + }, + "status": { + "not_detected": "Daemon não detectado", + "not_running": "O daemon não está em execução" + }, + "popup": { + "version_too_old": "Esta versão do antd é muito antiga. A extensão precisa da {min} ou de uma mais recente.", + "update_antd": "Atualizar o antd", + "prerelease_warning": "Esta é uma versão de pré-lançamento do antd ({version}). A extensão oferece suporte apenas a versões estáveis.", + "install_stable": "Instalar a versão estável", + "update_available": "Atualização disponível: {version}", + "get_latest": "Obter a versão mais recente", + "resources_heading": "Recursos nesta página", + "no_resources": "Nenhuma referência autonomi:// detectada.", + "clear_finished": "Limpar concluídos", + "no_downloads": "Nenhum download ainda.", + "disconnected_help": "A extensão precisa do daemon do Autonomi (antd) para buscar conteúdo da rede.", + "detect_daemon": "Detectar daemon", + "detecting": "Detectando…", + "download_daemon": "Baixar daemon", + "then_detect_prefix": "Depois clique em Detectar daemon acima, ou", + "open_setup_guide": "abra o guia de configuração completo", + "setup_guide": "Guia de configuração" + }, + "guide": { + "summary": "Já instalou o antd? Encontre e execute", + "reach_antd": "Se você configurou o antd antes, talvez ele esteja simplesmente parado — ou em execução sem a opção de que a extensão precisa. A extensão acessa o antd em {url} e precisa que ele seja iniciado com a opção --cors.", + "step1_terminal": "1 · Abra um terminal", + "step2_start": "2 · Inicie o daemon", + "terminal_on": "No {os}: {instr}.", + "terminal_generic": "Abra seu aplicativo de terminal.", + "terminal": { + "windows": "pressione Win, digite “PowerShell” e depois Enter", + "macos": "pressione Cmd+Space, digite “Terminal” e depois Enter", + "linux": "pressione Ctrl+Alt+T (ou abra seu aplicativo de terminal)" + }, + "cmd_not_found": "Mantenha essa janela aberta enquanto navega. Se você vir “command not found”, o antd não está no seu PATH — execute-o usando o caminho completo mostrado abaixo (ainda adicionando --cors).", + "where_to_find": "Onde encontrá-lo", + "label_program": "Programa", + "label_running_check": "Verificação de execução", + "path_varies": "varia conforme a plataforma — consulte o guia de configuração", + "path_varies_short": "varia conforme a plataforma", + "portfile_hint": "— este arquivo aparece assim que o antd é iniciado.", + "connects_automatically": "Assim que estiver em execução, esta página se conecta automaticamente — ou clique em Detectar daemon no menu pop-up da barra de ferramentas." + }, + "install": { + "title_install": "Instalar o antd", + "title_update": "Atualizar o antd", + "step_run": "Execute o instalador que você acabou de baixar ({file}).", + "step2_install": "Ele inicia o antd e o configura para iniciar no login.", + "step2_update": "Ele substitui seu antd atual e o reinicia.", + "step_detected": "Este painel é atualizado automaticamente assim que o antd é detectado.", + "waiting": "Aguardando o antd…", + "other_platforms": "Outras plataformas ou instalação manual:", + "releases_link": "Versões do antd", + "see_releases": "(consulte a página de versões)" + }, + "downloads": { + "progress_pct": "Baixando… {pct}% ({received} / {total})", + "progress_indeterminate": "Baixando… {received}", + "open_folder": "Abrir pasta", + "failed": "Falhou" + }, + "settings": { + "daemon_url": "URL do daemon", + "auto_fetch": "Buscar recursos incorporados automaticamente", + "check_updates": "Verificar atualizações do antd", + "saving": "Salvando…", + "saved": "Salvo!", + "language": "Idioma", + "language_system": "Padrão do sistema" + }, + "onboarding": { + "welcome_title": "Boas-vindas ao Autonomi", + "welcome_lede": "Você está quase pronto para navegar pelo conteúdo da rede Autonomi. Um passo rápido de configuração e você já entra.", + "status_checking": "Procurando o daemon da rede…", + "step1_title": "Baixe o daemon da rede", + "step1_body": "O conteúdo do Autonomi vive em uma rede descentralizada. Um pequeno programa local chamado antd é executado no seu computador e busca esse conteúdo para a extensão — seu navegador não consegue acessar a rede sozinho. Ele é executado discretamente em segundo plano e só escuta na sua própria máquina.", + "download_for": "Baixar para {platform}", + "your_platform": "sua plataforma", + "all_downloads": "Todos os downloads no GitHub", + "step2_title": "Execute o instalador", + "step2_body": "Abra o arquivo que você acabou de baixar e siga as instruções. Ele instala o antd, o inicia e o configura para iniciar automaticamente toda vez que você fizer login — então você só faz isso uma vez.", + "step3_title": "Verifique a conexão na extensão", + "step3_body": "Esta página detecta o daemon automaticamente. Assim que estiver em execução, o banner acima fica verde e você está conectado à rede. Você também pode clicar no ícone do Autonomi na barra de ferramentas do navegador a qualquer momento para ver seu status.", + "done_title": "🎉 Você está conectado!", + "done_body": "A extensão agora pode carregar conteúdo do Autonomi. Visite uma página com referências autonomi://, ou abra o menu pop-up da barra de ferramentas para ver o que foi detectado.", + "os_undetected": "Não conseguimos detectar seu sistema operacional — escolha a versão correta no GitHub.", + "downloading_asset": "Baixando {asset}…", + "download_failed_fallback": "O download falhou — abrindo a página de versões do GitHub em vez disso.", + "banner_connected": "Conectado à rede Autonomi", + "banner_idle": "Daemon da rede não detectado — siga os passos abaixo. Esta página se conecta automaticamente assim que estiver em execução.", + "banner_preview": "Modo de visualização — instale a extensão para detectar o daemon." + }, + "content": { + "download": "Baixar", + "open": "Abrir", + "fetching": "Buscando…", + "downloading_pct": "Baixando… {pct}%", + "download_failed": "O download falhou", + "title_download": "Baixar da rede Autonomi", + "title_open": "Abrir o arquivo baixado", + "failed_to_load": "Falha ao carregar do Autonomi" + } +} diff --git a/src/i18n/locales/ru.json b/src/i18n/locales/ru.json new file mode 100644 index 0000000..321b543 --- /dev/null +++ b/src/i18n/locales/ru.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Скачать", + "save": "Сохранить", + "connected": "Подключено", + "checking": "Проверка…", + "downloading": "Скачивание…", + "settings": "Настройки", + "downloads": "Скачивания из сети", + "unknown": "неизвестно" + }, + "status": { + "not_detected": "Демон не обнаружен", + "not_running": "Демон не запущен" + }, + "popup": { + "version_too_old": "Эта версия antd слишком старая. Расширению требуется {min} или новее.", + "update_antd": "Обновить antd", + "prerelease_warning": "Это предварительная сборка antd ({version}). Расширение поддерживает только стабильные выпуски.", + "install_stable": "Установить стабильный выпуск", + "update_available": "Доступно обновление: {version}", + "get_latest": "Получить последнюю версию", + "resources_heading": "Ресурсы на этой странице", + "no_resources": "Ссылки autonomi:// не обнаружены.", + "clear_finished": "Очистить завершённые", + "no_downloads": "Пока нет скачиваний.", + "disconnected_help": "Расширению нужен демон Autonomi (antd), чтобы получать контент из сети.", + "detect_daemon": "Обнаружить демон", + "detecting": "Обнаружение…", + "download_daemon": "Скачать демон", + "then_detect_prefix": "Затем нажмите «Обнаружить демон» выше или", + "open_setup_guide": "откройте полное руководство по настройке", + "setup_guide": "Руководство по настройке" + }, + "guide": { + "summary": "Уже установили antd? Найдите и запустите его", + "reach_antd": "Если вы уже настраивали antd, возможно, он просто остановлен — или запущен без нужной расширению опции. Расширение обращается к antd по адресу {url} и требует, чтобы он был запущен с опцией --cors.", + "step1_terminal": "1 · Откройте терминал", + "step2_start": "2 · Запустите демон", + "terminal_on": "В {os}: {instr}.", + "terminal_generic": "Откройте приложение терминала.", + "terminal": { + "windows": "нажмите Win, введите «PowerShell», затем Enter", + "macos": "нажмите Cmd+Space, введите «Terminal», затем Enter", + "linux": "нажмите Ctrl+Alt+T (или откройте приложение терминала)" + }, + "cmd_not_found": "Держите это окно открытым, пока просматриваете страницы. Если вы видите “command not found”, antd отсутствует в вашем PATH — запустите его, указав полный путь, показанный ниже (по-прежнему добавляя --cors).", + "where_to_find": "Где его найти", + "label_program": "Программа", + "label_running_check": "Проверка запуска", + "path_varies": "зависит от платформы — см. руководство по настройке", + "path_varies_short": "зависит от платформы", + "portfile_hint": "— этот файл появляется после запуска antd.", + "connects_automatically": "После запуска эта страница подключается автоматически — или нажмите «Обнаружить демон» во всплывающем окне на панели инструментов." + }, + "install": { + "title_install": "Установить antd", + "title_update": "Обновить antd", + "step_run": "Запустите только что скачанный установщик ({file}).", + "step2_install": "Он запускает antd и настраивает его на запуск при входе в систему.", + "step2_update": "Он заменяет текущий antd и перезапускает его.", + "step_detected": "Эта панель обновляется автоматически, как только antd будет обнаружен.", + "waiting": "Ожидание antd…", + "other_platforms": "Другие платформы или установка вручную:", + "releases_link": "Выпуски antd", + "see_releases": "(см. страницу выпусков)" + }, + "downloads": { + "progress_pct": "Скачивание… {pct}% ({received} / {total})", + "progress_indeterminate": "Скачивание… {received}", + "open_folder": "Открыть папку", + "failed": "Ошибка" + }, + "settings": { + "daemon_url": "URL демона", + "auto_fetch": "Автоматически загружать встроенные ресурсы", + "check_updates": "Проверять обновления antd", + "saving": "Сохранение…", + "saved": "Сохранено!", + "language": "Язык", + "language_system": "Системный по умолчанию" + }, + "onboarding": { + "welcome_title": "Добро пожаловать в Autonomi", + "welcome_lede": "Вы почти готовы просматривать контент из сети Autonomi. Ещё один быстрый шаг настройки — и всё готово.", + "status_checking": "Проверка наличия сетевого демона…", + "step1_title": "Скачайте сетевой демон", + "step1_body": "Контент Autonomi размещён в децентрализованной сети. Небольшая локальная программа под названием antd работает на вашем компьютере и получает этот контент для расширения — ваш браузер не может подключиться к сети самостоятельно. Она работает незаметно в фоновом режиме и слушает только на вашем компьютере.", + "download_for": "Скачать для {platform}", + "your_platform": "вашей платформы", + "all_downloads": "Все загрузки на GitHub", + "step2_title": "Запустите установщик", + "step2_body": "Откройте только что скачанный файл и следуйте инструкциям. Он устанавливает antd, запускает его и настраивает автоматический запуск при каждом входе в систему — так что это нужно сделать лишь один раз.", + "step3_title": "Проверьте подключение в расширении", + "step3_body": "Эта страница обнаруживает демон автоматически. Как только он запущен, баннер выше становится зелёным, и вы подключены к сети. Вы также можете в любой момент нажать значок Autonomi на панели инструментов браузера, чтобы увидеть свой статус.", + "done_title": "🎉 Вы подключены!", + "done_body": "Теперь расширение может загружать контент Autonomi. Откройте страницу со ссылками autonomi:// или откройте всплывающее окно на панели инструментов, чтобы увидеть, что обнаружено.", + "os_undetected": "Нам не удалось определить вашу операционную систему — выберите подходящую сборку на GitHub.", + "downloading_asset": "Скачивание {asset}…", + "download_failed_fallback": "Ошибка скачивания — вместо этого открывается страница выпусков GitHub.", + "banner_connected": "Подключено к сети Autonomi", + "banner_idle": "Сетевой демон не обнаружен — выполните шаги ниже. Эта страница подключится автоматически, как только он будет запущен.", + "banner_preview": "Режим предпросмотра — установите расширение, чтобы обнаружить демон." + }, + "content": { + "download": "Скачать", + "open": "Открыть", + "fetching": "Получение…", + "downloading_pct": "Скачивание… {pct}%", + "download_failed": "Ошибка скачивания", + "title_download": "Скачать из сети Autonomi", + "title_open": "Открыть скачанный файл", + "failed_to_load": "Не удалось загрузить из Autonomi" + } +} diff --git a/src/i18n/locales/tr.json b/src/i18n/locales/tr.json new file mode 100644 index 0000000..e57c48b --- /dev/null +++ b/src/i18n/locales/tr.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "İndir", + "save": "Kaydet", + "connected": "Bağlı", + "checking": "Denetleniyor…", + "downloading": "İndiriliyor…", + "settings": "Ayarlar", + "downloads": "İndirmeler", + "unknown": "bilinmiyor" + }, + "status": { + "not_detected": "Daemon algılanmadı", + "not_running": "Daemon çalışmıyor" + }, + "popup": { + "version_too_old": "Bu antd sürümü çok eski. Uzantı {min} veya daha yeni bir sürüm gerektiriyor.", + "update_antd": "antd'yi güncelle", + "prerelease_warning": "Bu, ön sürüm bir antd yapısıdır ({version}). Uzantı yalnızca kararlı sürümleri destekler.", + "install_stable": "Kararlı sürümü yükle", + "update_available": "Güncelleme mevcut: {version}", + "get_latest": "En son sürümü al", + "resources_heading": "Bu sayfadaki kaynaklar", + "no_resources": "autonomi:// referansı algılanmadı.", + "clear_finished": "Tamamlananları temizle", + "no_downloads": "Henüz indirme yok.", + "disconnected_help": "Uzantı, ağdan içerik almak için Autonomi daemon'ına (antd) ihtiyaç duyar.", + "detect_daemon": "Daemon'ı algıla", + "detecting": "Algılanıyor…", + "download_daemon": "Daemon'ı indir", + "then_detect_prefix": "Ardından yukarıdaki Daemon'ı algıla düğmesine tıklayın veya", + "open_setup_guide": "tam kurulum kılavuzunu açın", + "setup_guide": "Kurulum kılavuzu" + }, + "guide": { + "summary": "antd zaten yüklü mü? Bulun ve çalıştırın", + "reach_antd": "antd'yi daha önce kurduysanız, yalnızca durdurulmuş olabilir — veya uzantının ihtiyaç duyduğu seçenek olmadan çalışıyor olabilir. Uzantı antd'ye {url} adresinden erişir ve onun --cors seçeneğiyle başlatılmasını gerektirir.", + "step1_terminal": "1 · Bir terminal açın", + "step2_start": "2 · Daemon'ı başlatın", + "terminal_on": "{os} üzerinde: {instr}.", + "terminal_generic": "Terminal uygulamanızı açın.", + "terminal": { + "windows": "Win tuşuna basın, “PowerShell” yazın, ardından Enter'a basın", + "macos": "Cmd+Space'e basın, “Terminal” yazın, ardından Enter'a basın", + "linux": "Ctrl+Alt+T tuşlarına basın (veya terminal uygulamanızı açın)" + }, + "cmd_not_found": "Gezinirken o pencereyi açık tutun. “command not found” görürseniz, antd PATH üzerinde değildir — aşağıda gösterilen tam yolu kullanarak çalıştırın (yine de --cors ekleyerek).", + "where_to_find": "Nerede bulunur", + "label_program": "Program", + "label_running_check": "Çalışma denetimi", + "path_varies": "platforma göre değişir — kurulum kılavuzuna bakın", + "path_varies_short": "platforma göre değişir", + "portfile_hint": "— bu dosya, antd başladıktan sonra görünür.", + "connects_automatically": "Çalışmaya başladığında bu sayfa otomatik olarak bağlanır — veya araç çubuğu açılır penceresindeki Daemon'ı algıla düğmesine tıklayın." + }, + "install": { + "title_install": "antd'yi yükle", + "title_update": "antd'yi güncelle", + "step_run": "Az önce indirilen yükleyiciyi çalıştırın ({file}).", + "step2_install": "antd'yi başlatır ve oturum açıldığında başlatılacak şekilde ayarlar.", + "step2_update": "Mevcut antd'nizin yerine geçer ve yeniden başlatır.", + "step_detected": "Bu panel, antd algılandığında otomatik olarak güncellenir.", + "waiting": "antd bekleniyor…", + "other_platforms": "Diğer platformlar veya elle kurulum:", + "releases_link": "antd sürümleri", + "see_releases": "(sürümler sayfasına bakın)" + }, + "downloads": { + "progress_pct": "İndiriliyor… %{pct} ({received} / {total})", + "progress_indeterminate": "İndiriliyor… {received}", + "open_folder": "Klasörü aç", + "failed": "Başarısız" + }, + "settings": { + "daemon_url": "Daemon URL'si", + "auto_fetch": "Satır içi kaynakları otomatik al", + "check_updates": "antd güncellemelerini denetle", + "saving": "Kaydediliyor…", + "saved": "Kaydedildi!", + "language": "Dil", + "language_system": "Sistem varsayılanı" + }, + "onboarding": { + "welcome_title": "Autonomi'ye hoş geldiniz", + "welcome_lede": "Autonomi ağındaki içeriğe göz atmaya neredeyse hazırsınız. Tek bir hızlı kurulum adımı ve içerdesiniz.", + "status_checking": "Ağ daemon'ı denetleniyor…", + "step1_title": "Ağ daemon'ını indirin", + "step1_body": "Autonomi içeriği merkeziyetsiz bir ağda bulunur. antd adlı küçük bir yerel program bilgisayarınızda çalışır ve bu içeriği uzantı için alır — tarayıcınız ağa kendi başına erişemez. Arka planda sessizce çalışır ve yalnızca kendi makinenizde dinler.", + "download_for": "{platform} için indir", + "your_platform": "platformunuz", + "all_downloads": "GitHub'daki tüm indirmeler", + "step2_title": "Yükleyiciyi çalıştırın", + "step2_body": "Az önce indirdiğiniz dosyayı açın ve yönergeleri izleyin. antd'yi yükler, başlatır ve her oturum açtığınızda otomatik olarak başlatılacak şekilde ayarlar — böylece bunu yalnızca bir kez yaparsınız.", + "step3_title": "Uzantıda bağlantı olup olmadığını denetleyin", + "step3_body": "Bu sayfa daemon'ı otomatik olarak algılar. Çalışmaya başladığında yukarıdaki banner yeşile döner ve ağa bağlanmış olursunuz. Durumunuzu görmek için tarayıcı araç çubuğunuzdaki Autonomi simgesine istediğiniz zaman tıklayabilirsiniz.", + "done_title": "🎉 Bağlandınız!", + "done_body": "Uzantı artık Autonomi içeriğini yükleyebilir. autonomi:// referansları içeren bir sayfayı ziyaret edin veya algılananları görmek için araç çubuğu açılır penceresini açın.", + "os_undetected": "İşletim sisteminizi algılayamadık — GitHub'dan doğru yapıyı seçin.", + "downloading_asset": "{asset} indiriliyor…", + "download_failed_fallback": "İndirme başarısız oldu — bunun yerine GitHub sürümler sayfası açılıyor.", + "banner_connected": "Autonomi ağına bağlanıldı", + "banner_idle": "Ağ daemon'ı algılanmadı — aşağıdaki adımları izleyin. Çalışmaya başladığında bu sayfa otomatik olarak bağlanır.", + "banner_preview": "Önizleme modu — daemon'ı algılamak için uzantıyı yükleyin." + }, + "content": { + "download": "İndir", + "open": "Aç", + "fetching": "Alınıyor…", + "downloading_pct": "İndiriliyor… %{pct}", + "download_failed": "İndirme başarısız", + "title_download": "Autonomi ağından indir", + "title_open": "İndirilen dosyayı aç", + "failed_to_load": "Autonomi'den yüklenemedi" + } +} diff --git a/src/i18n/locales/uk.json b/src/i18n/locales/uk.json new file mode 100644 index 0000000..a27c0ac --- /dev/null +++ b/src/i18n/locales/uk.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Завантажити", + "save": "Зберегти", + "connected": "Підключено", + "checking": "Перевірка…", + "downloading": "Скачування…", + "settings": "Налаштування", + "downloads": "Скачування", + "unknown": "невідомо" + }, + "status": { + "not_detected": "Демон не виявлено", + "not_running": "Демон не запущено" + }, + "popup": { + "version_too_old": "Ця версія antd застара. Розширенню потрібна {min} або новіша.", + "update_antd": "Оновити antd", + "prerelease_warning": "Це попередня збірка antd ({version}). Розширення підтримує лише стабільні випуски.", + "install_stable": "Встановити стабільний випуск", + "update_available": "Доступне оновлення: {version}", + "get_latest": "Отримати останню версію", + "resources_heading": "Ресурси на цій сторінці", + "no_resources": "Посилання autonomi:// не виявлено.", + "clear_finished": "Очистити завершені", + "no_downloads": "Скачувань поки немає.", + "disconnected_help": "Розширенню потрібен демон Autonomi (antd), щоб отримувати контент із мережі.", + "detect_daemon": "Виявити демон", + "detecting": "Виявлення…", + "download_daemon": "Завантажити демон", + "then_detect_prefix": "Потім натисніть «Виявити демон» вище або", + "open_setup_guide": "відкрийте повний посібник із налаштування", + "setup_guide": "Посібник із налаштування" + }, + "guide": { + "summary": "Уже встановили antd? Знайдіть і запустіть його", + "reach_antd": "Якщо ви вже налаштовували antd раніше, можливо, він просто зупинений — або запущений без потрібної розширенню опції. Розширення звертається до antd за адресою {url} і потребує, щоб він був запущений з опцією --cors.", + "step1_terminal": "1 · Відкрийте термінал", + "step2_start": "2 · Запустіть демон", + "terminal_on": "У {os}: {instr}.", + "terminal_generic": "Відкрийте застосунок термінала.", + "terminal": { + "windows": "натисніть Win, введіть «PowerShell», потім Enter", + "macos": "натисніть Cmd+Space, введіть «Terminal», потім Enter", + "linux": "натисніть Ctrl+Alt+T (або відкрийте застосунок термінала)" + }, + "cmd_not_found": "Тримайте це вікно відкритим, поки переглядаєте сторінки. Якщо ви бачите “command not found”, antd відсутній у вашому PATH — запустіть його, вказавши повний шлях, показаний нижче (так само додаючи --cors).", + "where_to_find": "Де його знайти", + "label_program": "Програма", + "label_running_check": "Перевірка запуску", + "path_varies": "залежить від платформи — див. посібник із налаштування", + "path_varies_short": "залежить від платформи", + "portfile_hint": "— цей файл з'являється після запуску antd.", + "connects_automatically": "Після запуску ця сторінка підключається автоматично — або натисніть «Виявити демон» у спливаючому вікні на панелі інструментів." + }, + "install": { + "title_install": "Встановити antd", + "title_update": "Оновити antd", + "step_run": "Запустіть щойно завантажений інсталятор ({file}).", + "step2_install": "Він запускає antd і налаштовує його на запуск під час входу в систему.", + "step2_update": "Він замінює ваш поточний antd і перезапускає його.", + "step_detected": "Ця панель оновлюється автоматично, щойно antd буде виявлено.", + "waiting": "Очікування antd…", + "other_platforms": "Інші платформи або встановлення вручну:", + "releases_link": "Випуски antd", + "see_releases": "(див. сторінку випусків)" + }, + "downloads": { + "progress_pct": "Скачування… {pct}% ({received} / {total})", + "progress_indeterminate": "Скачування… {received}", + "open_folder": "Відкрити папку", + "failed": "Помилка" + }, + "settings": { + "daemon_url": "URL демона", + "auto_fetch": "Автоматично завантажувати вбудовані ресурси", + "check_updates": "Перевіряти оновлення antd", + "saving": "Збереження…", + "saved": "Збережено!", + "language": "Мова", + "language_system": "Системна за замовчуванням" + }, + "onboarding": { + "welcome_title": "Ласкаво просимо до Autonomi", + "welcome_lede": "Ви майже готові переглядати контент із мережі Autonomi. Ще один швидкий крок налаштування — і все готово.", + "status_checking": "Перевірка наявності мережевого демона…", + "step1_title": "Завантажте мережевий демон", + "step1_body": "Контент Autonomi розміщений у децентралізованій мережі. Невелика локальна програма під назвою antd працює на вашому комп'ютері й отримує цей контент для розширення — ваш браузер не може підключитися до мережі самостійно. Вона працює непомітно у фоновому режимі й слухає лише на вашому комп'ютері.", + "download_for": "Завантажити для {platform}", + "your_platform": "вашої платформи", + "all_downloads": "Усі завантаження на GitHub", + "step2_title": "Запустіть інсталятор", + "step2_body": "Відкрийте щойно завантажений файл і дотримуйтесь підказок. Він встановлює antd, запускає його й налаштовує автоматичний запуск під час кожного входу в систему — тож це потрібно зробити лише один раз.", + "step3_title": "Перевірте підключення в розширенні", + "step3_body": "Ця сторінка виявляє демон автоматично. Щойно він запущений, банер вище стає зеленим, і ви підключені до мережі. Ви також можете будь-коли натиснути значок Autonomi на панелі інструментів браузера, щоб побачити свій статус.", + "done_title": "🎉 Ви підключені!", + "done_body": "Тепер розширення може завантажувати контент Autonomi. Відкрийте сторінку з посиланнями autonomi:// або відкрийте спливаюче вікно на панелі інструментів, щоб побачити, що виявлено.", + "os_undetected": "Нам не вдалося визначити вашу операційну систему — виберіть відповідну збірку на GitHub.", + "downloading_asset": "Скачування {asset}…", + "download_failed_fallback": "Помилка завантаження — натомість відкривається сторінка випусків GitHub.", + "banner_connected": "Підключено до мережі Autonomi", + "banner_idle": "Мережевий демон не виявлено — виконайте кроки нижче. Ця сторінка підключиться автоматично, щойно він буде запущений.", + "banner_preview": "Режим попереднього перегляду — встановіть розширення, щоб виявити демон." + }, + "content": { + "download": "Завантажити", + "open": "Відкрити", + "fetching": "Отримання…", + "downloading_pct": "Скачування… {pct}%", + "download_failed": "Помилка завантаження", + "title_download": "Завантажити з мережі Autonomi", + "title_open": "Відкрити завантажений файл", + "failed_to_load": "Не вдалося завантажити з Autonomi" + } +} diff --git a/src/i18n/locales/vi.json b/src/i18n/locales/vi.json new file mode 100644 index 0000000..bd19b7b --- /dev/null +++ b/src/i18n/locales/vi.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "Tải xuống", + "save": "Lưu", + "connected": "Đã kết nối", + "checking": "Đang kiểm tra…", + "downloading": "Đang tải xuống…", + "settings": "Cài đặt", + "downloads": "Tải xuống", + "unknown": "không xác định" + }, + "status": { + "not_detected": "Không phát hiện thấy daemon", + "not_running": "Daemon không chạy" + }, + "popup": { + "version_too_old": "Phiên bản antd này quá cũ. Tiện ích cần {min} hoặc mới hơn.", + "update_antd": "Cập nhật antd", + "prerelease_warning": "Đây là bản dựng antd tiền phát hành ({version}). Tiện ích chỉ hỗ trợ các bản phát hành ổn định.", + "install_stable": "Cài đặt bản phát hành ổn định", + "update_available": "Có bản cập nhật: {version}", + "get_latest": "Nhận bản mới nhất", + "resources_heading": "Tài nguyên trên trang này", + "no_resources": "Không phát hiện tham chiếu autonomi:// nào.", + "clear_finished": "Xóa các mục đã hoàn tất", + "no_downloads": "Chưa có mục tải xuống nào.", + "disconnected_help": "Tiện ích cần daemon Autonomi (antd) để tải nội dung từ mạng.", + "detect_daemon": "Phát hiện daemon", + "detecting": "Đang phát hiện…", + "download_daemon": "Tải xuống daemon", + "then_detect_prefix": "Sau đó nhấp vào Phát hiện daemon ở trên, hoặc", + "open_setup_guide": "mở hướng dẫn thiết lập đầy đủ", + "setup_guide": "Hướng dẫn thiết lập" + }, + "guide": { + "summary": "Đã cài đặt antd? Tìm và chạy nó", + "reach_antd": "Nếu bạn đã thiết lập antd trước đó, có thể nó chỉ đơn giản là đã dừng — hoặc đang chạy mà không có tùy chọn mà tiện ích cần. Tiện ích kết nối tới antd tại {url} và cần nó được khởi động với tùy chọn --cors.", + "step1_terminal": "1 · Mở một terminal", + "step2_start": "2 · Khởi động daemon", + "terminal_on": "Trên {os}: {instr}.", + "terminal_generic": "Mở ứng dụng terminal của bạn.", + "terminal": { + "windows": "nhấn Win, gõ “PowerShell”, rồi nhấn Enter", + "macos": "nhấn Cmd+Space, gõ “Terminal”, rồi nhấn Enter", + "linux": "nhấn Ctrl+Alt+T (hoặc mở ứng dụng terminal của bạn)" + }, + "cmd_not_found": "Giữ cửa sổ đó mở trong khi bạn duyệt web. Nếu bạn thấy “command not found”, antd không có trong PATH của bạn — hãy chạy nó bằng đường dẫn đầy đủ hiển thị bên dưới (vẫn thêm --cors).", + "where_to_find": "Nơi tìm thấy nó", + "label_program": "Chương trình", + "label_running_check": "Kiểm tra đang chạy", + "path_varies": "tùy theo nền tảng — xem hướng dẫn thiết lập", + "path_varies_short": "tùy theo nền tảng", + "portfile_hint": "— tệp này xuất hiện sau khi antd đã khởi động.", + "connects_automatically": "Sau khi nó chạy, trang này sẽ tự động kết nối — hoặc nhấp vào Phát hiện daemon trong cửa sổ bật lên trên thanh công cụ." + }, + "install": { + "title_install": "Cài đặt antd", + "title_update": "Cập nhật antd", + "step_run": "Chạy trình cài đặt vừa tải xuống ({file}).", + "step2_install": "Nó khởi động antd và đặt để khởi chạy khi đăng nhập.", + "step2_update": "Nó thay thế antd hiện tại của bạn và khởi động lại nó.", + "step_detected": "Bảng điều khiển này tự động cập nhật sau khi phát hiện thấy antd.", + "waiting": "Đang chờ antd…", + "other_platforms": "Nền tảng khác hoặc cài đặt thủ công:", + "releases_link": "Các bản phát hành antd", + "see_releases": "(xem trang phát hành)" + }, + "downloads": { + "progress_pct": "Đang tải xuống… {pct}% ({received} / {total})", + "progress_indeterminate": "Đang tải xuống… {received}", + "open_folder": "Mở thư mục", + "failed": "Thất bại" + }, + "settings": { + "daemon_url": "URL của daemon", + "auto_fetch": "Tự động tải tài nguyên nội tuyến", + "check_updates": "Kiểm tra cập nhật antd", + "saving": "Đang lưu…", + "saved": "Đã lưu!", + "language": "Ngôn ngữ", + "language_system": "Mặc định của hệ thống" + }, + "onboarding": { + "welcome_title": "Chào mừng đến với Autonomi", + "welcome_lede": "Bạn gần như đã sẵn sàng duyệt nội dung từ mạng Autonomi. Chỉ một bước thiết lập nhanh và bạn đã vào.", + "status_checking": "Đang kiểm tra daemon mạng…", + "step1_title": "Tải xuống daemon mạng", + "step1_body": "Nội dung Autonomi nằm trên một mạng phi tập trung. Một chương trình cục bộ nhỏ tên là antd chạy trên máy tính của bạn và tải nội dung đó cho tiện ích — trình duyệt của bạn không thể tự truy cập mạng. Nó chạy âm thầm trong nền và chỉ lắng nghe trên máy của riêng bạn.", + "download_for": "Tải xuống cho {platform}", + "your_platform": "nền tảng của bạn", + "all_downloads": "Tất cả bản tải xuống trên GitHub", + "step2_title": "Chạy trình cài đặt", + "step2_body": "Mở tệp bạn vừa tải xuống và làm theo hướng dẫn. Nó cài đặt antd, khởi động nó và đặt để tự động khởi chạy mỗi lần bạn đăng nhập — vì vậy bạn chỉ làm điều này một lần.", + "step3_title": "Kiểm tra kết nối trong tiện ích", + "step3_body": "Trang này tự động phát hiện daemon. Sau khi nó chạy, biểu ngữ ở trên chuyển sang màu xanh lá và bạn đã kết nối với mạng. Bạn cũng có thể nhấp vào biểu tượng Autonomi trên thanh công cụ trình duyệt bất cứ lúc nào để xem trạng thái của bạn.", + "done_title": "🎉 Bạn đã kết nối!", + "done_body": "Tiện ích giờ đây có thể tải nội dung Autonomi. Hãy truy cập một trang có tham chiếu autonomi://, hoặc mở cửa sổ bật lên trên thanh công cụ để xem những gì được phát hiện.", + "os_undetected": "Chúng tôi không thể phát hiện hệ điều hành của bạn — hãy chọn bản dựng phù hợp trên GitHub.", + "downloading_asset": "Đang tải xuống {asset}…", + "download_failed_fallback": "Tải xuống thất bại — đang mở trang phát hành GitHub thay thế.", + "banner_connected": "Đã kết nối với mạng Autonomi", + "banner_idle": "Không phát hiện thấy daemon mạng — hãy làm theo các bước bên dưới. Trang này sẽ tự động kết nối sau khi nó chạy.", + "banner_preview": "Chế độ xem trước — cài đặt tiện ích để phát hiện daemon." + }, + "content": { + "download": "Tải xuống", + "open": "Mở", + "fetching": "Đang tìm nạp…", + "downloading_pct": "Đang tải xuống… {pct}%", + "download_failed": "Tải xuống thất bại", + "title_download": "Tải xuống từ mạng Autonomi", + "title_open": "Mở tệp đã tải xuống", + "failed_to_load": "Không tải được từ Autonomi" + } +} diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json new file mode 100644 index 0000000..b528ca9 --- /dev/null +++ b/src/i18n/locales/zh-CN.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "下载", + "save": "保存", + "connected": "已连接", + "checking": "检查中…", + "downloading": "下载中…", + "settings": "设置", + "downloads": "下载", + "unknown": "未知" + }, + "status": { + "not_detected": "未检测到守护进程", + "not_running": "守护进程未运行" + }, + "popup": { + "version_too_old": "此 antd 版本过旧。扩展需要 {min} 或更高版本。", + "update_antd": "更新 antd", + "prerelease_warning": "这是 antd 的预发布版本({version})。扩展仅支持稳定版本。", + "install_stable": "安装稳定版本", + "update_available": "有可用更新:{version}", + "get_latest": "获取最新版本", + "resources_heading": "此页面上的资源", + "no_resources": "未检测到 autonomi:// 引用。", + "clear_finished": "清除已完成", + "no_downloads": "暂无下载。", + "disconnected_help": "扩展需要 Autonomi 守护进程(antd)才能从网络获取内容。", + "detect_daemon": "检测守护进程", + "detecting": "检测中…", + "download_daemon": "下载守护进程", + "then_detect_prefix": "然后点击上方的“检测守护进程”,或", + "open_setup_guide": "打开完整的设置指南", + "setup_guide": "设置指南" + }, + "guide": { + "summary": "已经安装了 antd?查找并运行它", + "reach_antd": "如果您之前设置过 antd,它可能只是被停止了——或者在运行时缺少扩展所需的选项。扩展通过 {url} 访问 antd,并需要以 --cors 选项启动它。", + "step1_terminal": "1 · 打开终端", + "step2_start": "2 · 启动守护进程", + "terminal_on": "在 {os} 上:{instr}。", + "terminal_generic": "打开您的终端应用。", + "terminal": { + "windows": "按 Win 键,输入“PowerShell”,然后按 Enter", + "macos": "按 Cmd+Space,输入“Terminal”,然后按 Enter", + "linux": "按 Ctrl+Alt+T(或打开您的终端应用)" + }, + "cmd_not_found": "浏览时请保持该窗口打开。如果您看到“command not found”,说明 antd 不在您的 PATH 中——请使用下方显示的完整路径运行它(仍需添加 --cors)。", + "where_to_find": "在哪里找到它", + "label_program": "程序", + "label_running_check": "运行检查", + "path_varies": "因平台而异——请参阅设置指南", + "path_varies_short": "因平台而异", + "portfile_hint": "—— antd 启动后此文件才会出现。", + "connects_automatically": "一旦运行,此页面将自动连接——或点击工具栏弹窗中的“检测守护进程”。" + }, + "install": { + "title_install": "安装 antd", + "title_update": "更新 antd", + "step_run": "运行刚刚下载的安装程序({file})。", + "step2_install": "它会启动 antd 并将其设置为登录时启动。", + "step2_update": "它会替换您当前的 antd 并重新启动它。", + "step_detected": "检测到 antd 后,此面板会自动更新。", + "waiting": "正在等待 antd…", + "other_platforms": "其他平台或手动安装:", + "releases_link": "antd 发布版本", + "see_releases": "(请参阅发布页面)" + }, + "downloads": { + "progress_pct": "下载中… {pct}%({received} / {total})", + "progress_indeterminate": "下载中… {received}", + "open_folder": "打开文件夹", + "failed": "失败" + }, + "settings": { + "daemon_url": "守护进程 URL", + "auto_fetch": "自动获取内嵌资源", + "check_updates": "检查 antd 更新", + "saving": "保存中…", + "saved": "已保存!", + "language": "语言", + "language_system": "系统默认" + }, + "onboarding": { + "welcome_title": "欢迎使用 Autonomi", + "welcome_lede": "您即将可以浏览 Autonomi 网络中的内容。只需一个快速设置步骤即可开始。", + "status_checking": "正在检查网络守护进程…", + "step1_title": "下载网络守护进程", + "step1_body": "Autonomi 内容存储在去中心化网络上。一个名为 antd 的本地小程序在您的计算机上运行,为扩展获取这些内容——您的浏览器无法自行访问该网络。它在后台安静地运行,并且只监听您自己的计算机。", + "download_for": "下载适用于 {platform} 的版本", + "your_platform": "您的平台", + "all_downloads": "GitHub 上的所有下载", + "step2_title": "运行安装程序", + "step2_body": "打开您刚刚下载的文件并按照提示操作。它会安装 antd、启动它,并将其设置为每次登录时自动启动——因此您只需执行一次。", + "step3_title": "检查扩展的连接", + "step3_body": "此页面会自动检测守护进程。一旦它运行起来,上方的横幅就会变绿,您便已连接到网络。您也可以随时点击浏览器工具栏中的 Autonomi 图标查看您的状态。", + "done_title": "🎉 您已连接!", + "done_body": "扩展现在可以加载 Autonomi 内容了。访问带有 autonomi:// 引用的页面,或打开工具栏弹窗查看检测到的内容。", + "os_undetected": "我们无法检测到您的操作系统——请在 GitHub 上选择正确的版本。", + "downloading_asset": "正在下载 {asset}…", + "download_failed_fallback": "下载失败——改为打开 GitHub 发布页面。", + "banner_connected": "已连接到 Autonomi 网络", + "banner_idle": "未检测到网络守护进程——请按照以下步骤操作。此页面将在其运行后自动连接。", + "banner_preview": "预览模式——安装扩展以检测守护进程。" + }, + "content": { + "download": "下载", + "open": "打开", + "fetching": "获取中…", + "downloading_pct": "下载中… {pct}%", + "download_failed": "下载失败", + "title_download": "从 Autonomi 网络下载", + "title_open": "打开已下载的文件", + "failed_to_load": "从 Autonomi 加载失败" + } +} diff --git a/src/i18n/locales/zh-TW.json b/src/i18n/locales/zh-TW.json new file mode 100644 index 0000000..b97410a --- /dev/null +++ b/src/i18n/locales/zh-TW.json @@ -0,0 +1,116 @@ +{ + "_translator_notes": "Machine-translated baseline. Native-speaker polish via PR welcome.", + "common": { + "download": "下載", + "save": "儲存", + "connected": "已連線", + "checking": "檢查中…", + "downloading": "下載中…", + "settings": "設定", + "downloads": "下載", + "unknown": "未知" + }, + "status": { + "not_detected": "未偵測到守護行程", + "not_running": "守護行程未執行" + }, + "popup": { + "version_too_old": "此 antd 版本過舊。擴充功能需要 {min} 或更新的版本。", + "update_antd": "更新 antd", + "prerelease_warning": "這是 antd 的預先發布版本({version})。擴充功能僅支援穩定版本。", + "install_stable": "安裝穩定版本", + "update_available": "有可用更新:{version}", + "get_latest": "取得最新版本", + "resources_heading": "此頁面上的資源", + "no_resources": "未偵測到 autonomi:// 參照。", + "clear_finished": "清除已完成", + "no_downloads": "尚無下載。", + "disconnected_help": "擴充功能需要 Autonomi 守護行程(antd)才能從網路取得內容。", + "detect_daemon": "偵測守護行程", + "detecting": "偵測中…", + "download_daemon": "下載守護行程", + "then_detect_prefix": "然後點按上方的「偵測守護行程」,或", + "open_setup_guide": "開啟完整的設定指南", + "setup_guide": "設定指南" + }, + "guide": { + "summary": "已經安裝了 antd?尋找並執行它", + "reach_antd": "如果您之前設定過 antd,它可能只是被停止了——或在執行時缺少擴充功能所需的選項。擴充功能透過 {url} 存取 antd,並需要以 --cors 選項啟動它。", + "step1_terminal": "1 · 開啟終端機", + "step2_start": "2 · 啟動守護行程", + "terminal_on": "在 {os} 上:{instr}。", + "terminal_generic": "開啟您的終端機應用程式。", + "terminal": { + "windows": "按 Win 鍵,輸入「PowerShell」,然後按 Enter", + "macos": "按 Cmd+Space,輸入「Terminal」,然後按 Enter", + "linux": "按 Ctrl+Alt+T(或開啟您的終端機應用程式)" + }, + "cmd_not_found": "瀏覽時請保持該視窗開啟。如果您看到“command not found”,表示 antd 不在您的 PATH 中——請使用下方顯示的完整路徑執行它(仍需加上 --cors)。", + "where_to_find": "在哪裡找到它", + "label_program": "程式", + "label_running_check": "執行檢查", + "path_varies": "因平台而異——請參閱設定指南", + "path_varies_short": "因平台而異", + "portfile_hint": "—— antd 啟動後此檔案才會出現。", + "connects_automatically": "一旦執行,此頁面將自動連線——或點按工具列彈出視窗中的「偵測守護行程」。" + }, + "install": { + "title_install": "安裝 antd", + "title_update": "更新 antd", + "step_run": "執行剛剛下載的安裝程式({file})。", + "step2_install": "它會啟動 antd 並將其設定為登入時啟動。", + "step2_update": "它會取代您目前的 antd 並重新啟動它。", + "step_detected": "偵測到 antd 後,此面板會自動更新。", + "waiting": "正在等待 antd…", + "other_platforms": "其他平台或手動安裝:", + "releases_link": "antd 發布版本", + "see_releases": "(請參閱發布頁面)" + }, + "downloads": { + "progress_pct": "下載中… {pct}%({received} / {total})", + "progress_indeterminate": "下載中… {received}", + "open_folder": "開啟資料夾", + "failed": "失敗" + }, + "settings": { + "daemon_url": "守護行程 URL", + "auto_fetch": "自動取得內嵌資源", + "check_updates": "檢查 antd 更新", + "saving": "儲存中…", + "saved": "已儲存!", + "language": "語言", + "language_system": "系統預設" + }, + "onboarding": { + "welcome_title": "歡迎使用 Autonomi", + "welcome_lede": "您即將可以瀏覽 Autonomi 網路中的內容。只需一個快速設定步驟即可開始。", + "status_checking": "正在檢查網路守護行程…", + "step1_title": "下載網路守護行程", + "step1_body": "Autonomi 內容存放於去中心化網路上。一個名為 antd 的本機小程式在您的電腦上執行,為擴充功能取得這些內容——您的瀏覽器無法自行存取該網路。它在背景安靜地執行,並且只監聽您自己的電腦。", + "download_for": "下載適用於 {platform} 的版本", + "your_platform": "您的平台", + "all_downloads": "GitHub 上的所有下載", + "step2_title": "執行安裝程式", + "step2_body": "開啟您剛剛下載的檔案並依照提示操作。它會安裝 antd、啟動它,並將其設定為每次登入時自動啟動——因此您只需執行一次。", + "step3_title": "檢查擴充功能的連線", + "step3_body": "此頁面會自動偵測守護行程。一旦它開始執行,上方的橫幅就會變綠,您便已連線到網路。您也可以隨時點按瀏覽器工具列中的 Autonomi 圖示查看您的狀態。", + "done_title": "🎉 您已連線!", + "done_body": "擴充功能現在可以載入 Autonomi 內容了。造訪帶有 autonomi:// 參照的頁面,或開啟工具列彈出視窗查看偵測到的內容。", + "os_undetected": "我們無法偵測到您的作業系統——請在 GitHub 上選擇正確的版本。", + "downloading_asset": "正在下載 {asset}…", + "download_failed_fallback": "下載失敗——改為開啟 GitHub 發布頁面。", + "banner_connected": "已連線到 Autonomi 網路", + "banner_idle": "未偵測到網路守護行程——請依照以下步驟操作。此頁面將在其執行後自動連線。", + "banner_preview": "預覽模式——安裝擴充功能以偵測守護行程。" + }, + "content": { + "download": "下載", + "open": "開啟", + "fetching": "取得中…", + "downloading_pct": "下載中… {pct}%", + "download_failed": "下載失敗", + "title_download": "從 Autonomi 網路下載", + "title_open": "開啟已下載的檔案", + "failed_to_load": "無法從 Autonomi 載入" + } +} diff --git a/src/manifest.json b/src/manifest.json index 2155e61..0172378 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,8 @@ "manifest_version": 3, "name": "Autonomi", "version": "0.1.2", - "description": "Download and view content from the Autonomi decentralized network directly in your browser", + "default_locale": "en", + "description": "__MSG_extDescription__", "permissions": [ "storage", "downloads", diff --git a/src/onboarding/index.html b/src/onboarding/index.html index 1085eff..775f12f 100644 --- a/src/onboarding/index.html +++ b/src/onboarding/index.html @@ -15,17 +15,17 @@

Autonomi

-

Welcome to Autonomi

-

+

Welcome to Autonomi

+

You're almost ready to browse content from the Autonomi network. One quick setup step and you're in.

- +
- Checking for the network daemon… + Checking for the network daemon…
@@ -33,16 +33,16 @@

Welcome to Autonomi

  • 1
    -

    Download the network daemon

    -

    +

    Download the network daemon

    +

    Autonomi content lives on a decentralized network. A small local program - called antd runs on your computer and fetches that content for + called antd runs on your computer and fetches that content for the extension — your browser can't reach the network on its own. It runs quietly in the background and only listens on your own machine.

    - - All downloads on GitHub + + All downloads on GitHub

    @@ -51,47 +51,43 @@

    Download the network daemon

  • 2
    -

    Run the installer

    -

    +

    Run the installer

    +

    Open the file you just downloaded and follow the prompts. It installs - antd, starts it, and sets it to launch automatically each time + antd, starts it, and sets it to launch automatically each time you sign in — so you only do this once.

    - Already installed antd? Find & run it + Already installed antd? Find & run it
    -

    - If you set up antd before, it may simply be stopped — or running without - the option the extension needs. The extension reaches antd at - http://localhost:8082 and needs it started - with the --cors option. -

    + +

    -

    1 · Open a terminal

    +

    1 · Open a terminal

    -

    2 · Start the daemon

    +

    2 · Start the daemon

    antd --cors
    -

    - Keep that window open while you browse. If you see - “command not found”, antd isn't on your PATH — run it using the - full path shown below (still adding --cors). +

    + Keep that window open while you browse. If you see “command not found”, + antd isn't on your PATH — run it using the full path shown below (still + adding --cors).

    -

    Where to find it

    +

    Where to find it

      -
    • Program
    • +
    • Program
    • - Running check - — this file appears once antd has started. + Running check + — this file appears once antd has started.
    -

    +

    Once it's running, this page connects automatically — or click - Detect daemon in the toolbar popup. + Detect daemon in the toolbar popup.

    @@ -101,8 +97,8 @@

    Where to find it

  • 3
    -

    Check the extension for a connection

    -

    +

    Check the extension for a connection

    +

    This page detects the daemon automatically. Once it's running, the banner above turns green and you're connected to the network. You can also click the Autonomi icon in your browser toolbar any time to see your status. @@ -112,11 +108,10 @@

    Check the extension for a connection

    diff --git a/src/onboarding/index.ts b/src/onboarding/index.ts index 725d35b..682c370 100644 --- a/src/onboarding/index.ts +++ b/src/onboarding/index.ts @@ -17,13 +17,13 @@ import { installerDownloadUrl, OS_LABELS, } from '../shared/constants'; +import { applyStaticTranslations, initI18n, t } from '../i18n'; // ── DOM refs ──────────────────────────────────────────────────────── const statusBanner = document.getElementById('status-banner')!; const statusText = document.getElementById('status-text')!; const btnDownload = document.getElementById('btn-download') as HTMLButtonElement; -const osLabel = document.getElementById('os-label')!; const releasesLink = document.getElementById('releases-link') as HTMLAnchorElement; const downloadHint = document.getElementById('download-hint')!; const step1 = document.getElementById('step-1')!; @@ -48,42 +48,43 @@ const inExtension = // ── Download step ─────────────────────────────────────────────────── -releasesLink.href = ANTD_RELEASES_URL; - -if (os) { - osLabel.textContent = OS_LABELS[os]; - // Surface the exact download URL on hover (the button isn't a link, so it has - // no native status-bar URL). - btnDownload.title = installerDownloadUrl(os); -} else { - // Unknown platform — point at the releases page instead of a specific asset. - osLabel.textContent = 'your platform'; - btnDownload.title = ANTD_RELEASES_URL; - downloadHint.textContent = - "We couldn't detect your operating system — pick the right build on GitHub."; -} - -btnDownload.addEventListener('click', async () => { - if (!os) { - window.open(ANTD_RELEASES_URL, '_blank'); - return; - } - // Outside the extension (file:// preview) the downloads API is absent — - // fall back to a plain navigation so the button still does something. - if (!inExtension || typeof chrome.downloads === 'undefined') { - window.open(installerDownloadUrl(os), '_blank'); - return; +function setupDownloadStep() { + releasesLink.href = ANTD_RELEASES_URL; + + if (os) { + btnDownload.textContent = t('onboarding.download_for', { platform: OS_LABELS[os] }); + // Surface the exact download URL on hover (the button isn't a link, so it + // has no native status-bar URL). + btnDownload.title = installerDownloadUrl(os); + } else { + // Unknown platform — point at the releases page instead of a specific asset. + btnDownload.textContent = t('onboarding.download_for', { platform: t('onboarding.your_platform') }); + btnDownload.title = ANTD_RELEASES_URL; + downloadHint.textContent = t('onboarding.os_undetected'); } - try { - await chrome.downloads.download({ url: installerDownloadUrl(os), saveAs: true }); - downloadHint.textContent = `Downloading ${ANTD_INSTALLER_ASSETS[os]}…`; - step1.classList.add('complete'); - } catch { - // Asset missing / download blocked — fall back to the releases page. - downloadHint.textContent = 'Download failed — opening the GitHub releases page instead.'; - window.open(ANTD_RELEASES_URL, '_blank'); - } -}); + + btnDownload.addEventListener('click', async () => { + if (!os) { + window.open(ANTD_RELEASES_URL, '_blank'); + return; + } + // Outside the extension (file:// preview) the downloads API is absent — + // fall back to a plain navigation so the button still does something. + if (!inExtension || typeof chrome.downloads === 'undefined') { + window.open(installerDownloadUrl(os), '_blank'); + return; + } + try { + await chrome.downloads.download({ url: installerDownloadUrl(os), saveAs: true }); + downloadHint.textContent = t('onboarding.downloading_asset', { asset: ANTD_INSTALLER_ASSETS[os] }); + step1.classList.add('complete'); + } catch { + // Asset missing / download blocked — fall back to the releases page. + downloadHint.textContent = t('onboarding.download_failed_fallback'); + window.open(ANTD_RELEASES_URL, '_blank'); + } + }); +} // ── Live connection status ────────────────────────────────────────── @@ -99,7 +100,7 @@ function setBanner(state: 'checking' | 'idle' | 'connected', text: string) { function onConnected() { if (connected) return; connected = true; - setBanner('connected', 'Connected to the Autonomi network'); + setBanner('connected', t('onboarding.banner_connected')); // Already working — collapse the setup walkthrough and just confirm success. welcomeSection.classList.add('hidden'); stepsList.classList.add('hidden'); @@ -110,25 +111,24 @@ function onConnected() { // Fill the "already installed? find & run it" guide with OS-specific paths. function setupRunGuide() { - const url = document.getElementById('guide-url'); + const reach = document.getElementById('guide-reach'); const term = document.getElementById('guide-terminal'); const install = document.getElementById('guide-install'); const port = document.getElementById('guide-portfile'); const cmd = document.getElementById('guide-cmd'); - if (url) url.textContent = ANTD_DEFAULT_URL; + if (reach) reach.textContent = t('guide.reach_antd', { url: ANTD_DEFAULT_URL }); if (cmd) cmd.textContent = ANTD_RUN_COMMAND; if (!os) { - if (term) term.textContent = 'Open your terminal application.'; - if (install) install.textContent = 'varies by platform — see the GitHub releases'; - if (port) port.textContent = 'varies by platform'; + if (term) term.textContent = t('guide.terminal_generic'); + if (install) install.textContent = t('guide.path_varies'); + if (port) port.textContent = t('guide.path_varies_short'); return; } const g = ANTD_RUN_GUIDE[os]; - if (term) term.textContent = `On ${OS_LABELS[os]}: ${g.terminal}.`; + if (term) term.textContent = t('guide.terminal_on', { os: OS_LABELS[os], instr: t(`guide.terminal.${os}`) }); if (install) install.textContent = g.installPath; if (port) port.textContent = g.portFile; } -setupRunGuide(); async function checkOnce() { // Probe (in case the daemon just started), then read the resulting status. @@ -139,10 +139,7 @@ async function checkOnce() { } else if (!connected) { // Probed and found nothing — make it clear we're waiting on the install, // not stuck. Polling continues in the background. - setBanner( - 'idle', - 'Network daemon not detected — follow the steps below. This page connects automatically once it’s running.', - ); + setBanner('idle', t('onboarding.banner_idle')); } } @@ -158,12 +155,23 @@ function stopPoll() { } } -// Initial check (daemon may already be running), then poll until connected. -// Outside the extension there's no background worker to query — show a neutral -// preview state instead of throwing. -if (inExtension) { - checkOnce(); - startPoll(); -} else { - setBanner('idle', 'Preview mode — install the extension to detect the daemon.'); +// ── Init ──────────────────────────────────────────────────────────── + +async function init() { + await initI18n(); + applyStaticTranslations(); + setupDownloadStep(); + setupRunGuide(); + + // Initial check (daemon may already be running), then poll until connected. + // Outside the extension there's no background worker to query — show a neutral + // preview state instead of throwing. + if (inExtension) { + checkOnce(); + startPoll(); + } else { + setBanner('idle', t('onboarding.banner_preview')); + } } + +init(); diff --git a/src/popup/index.html b/src/popup/index.html index c7b999d..90e33ff 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -15,7 +15,7 @@
    - Checking… + Checking…
    @@ -29,36 +29,35 @@ + pick an asset by hand. The message text is set from the catalog in + index.ts (it interpolates the version/min-version). -->
    - +
    -

    No autonomi:// references detected.

    +

    No autonomi:// references detected.

      - - + +
      -

      No downloads yet.

      +

      No downloads yet.

        @@ -66,51 +65,48 @@