interplane.Get Omega
Read in your language

aien-translate

aien-dev/aien-translate

Brought by drakestapleton

branch main Branches Tags History

aien-translate / tests / fixtures / reply_missing_close_ja.json

36 lines · 7855 bytes Raw Blame History
1{
2 "note": "Real reply from aien-serve-http (qwen3-30b-a3b-instruct-2507, greedy) recorded 2026-10-18 while translating README.md",
3 "items": [
4 "aien-translate",
5 "Translate your website into 31 languages with your own AI model. No API key, no cloud service, and your visitors' text never leaves your server.",
6 "aien-translate is a translation server for [translate.js](https://github.com/xnx3/translate). It translates with AIEN's own inference runtime. It also works with any server that offers the same OpenAI-style chat API.",
7 "Translate your website in 3 steps",
8 "**1. Start the server.** You need Rust and a running model server (AIEN's `aien-serve-http`, or any OpenAI-style chat server).",
9 "**2. Add translate.js to your page.** Download `translate.js` from [its repository](https://github.com/xnx3/translate) and host it with your site. Then add these lines just before `</body>`, with your server's address:",
10 "**3. Open your page.** A language menu appears, and choosing a language translates the page in place. To pick a language from your own code, call `translate.changeLanguage('japanese')`.",
11 "Check that it works",
12 "The first command reports the model in use. The second returns the translation in `\"text\"`, for example `[\"こんにちは世界\"]`.",
13 "What it protects",
14 "Every translation is checked before a visitor sees it:",
15 "Links, email addresses, code in backticks, and placeholders such as `{name}` or `%s` must come through unchanged.",
16 "Product names on the keep list (AIEN, Omega, Allen, and others) are never translated. Use `--keep-file` to supply your own list.",
17 "A translation that is empty, or far longer than the original, is thrown away.",
18 "If any check fails, the visitor sees the original text instead of a broken translation.",
19 "How it works",
20 "translate.js sends the page's text to `/translate.json`. The server sends it to the model in batches, one request at a time, because the GPU may be shared.",
21 "Every translation is saved (SQLite), so the same text is never translated twice. Repeat visits are instant.",
22 "translate.js cuts web addresses apart at `//`. The server keeps those pieces in place so links are rebuilt correctly.",
23 "If the model's answer for a batch can't be matched to the inputs, the batch is split and retried, down to single items.",
24 "Options",
25 "Endpoints: `/translate.json`, `/language.json`, `/connectTest.json`, `/init.json` and `/health`. `/ip.json` (location lookup) is not offered.",
26 "Languages",
27 "English, Simplified and Traditional Chinese, Japanese, Korean, Spanish, French, German, Portuguese, Italian, Russian, Ukrainian, Polish, Dutch, Swedish, Danish, Norwegian, Finnish, Czech, Romanian, Hungarian, Greek, Turkish, Arabic, Persian, Hindi, Bengali, Thai, Vietnamese, Indonesian and Malay. The list is in `src/langs.rs`.",
28 "Tests",
29 "`cargo test` runs unit tests, plus end-to-end tests against a fake model (no GPU needed).",
30 "`demo/` has a page that uses the real translate.js. Serve the folder and run `python demo/check.py URL` (needs Playwright) to see the translated page.",
31 "Translations of this page",
32 "The other-language versions of this page were made by aien-translate itself, with `scripts/translate_readme.py`. They are machine translations, and the English version is the original."
33 ],
34 "finish_reason": "stop",
35 "content": "[\"aien-translate\",\"31の言語にあなたのウェブサイトを独自のAIモデルで翻訳。APIキーもクラウドサービスも不要で、訪問者のテキストはあなたのサーバーから出ません。\",\"aien-translate は [translate.js](https://github.com/xnx3/translate) の翻訳サーバーです。AIEN独自の推論ランタイムで翻訳を行います。また、同じ OpenAI 風のチャット API を提供する任意のサーバーとも動作します。\",\"3ステップでウェブサイトを翻訳\",\"**1. サーバーを起動する。** Rust と動作中のモデルサーバー(AIENの `aien-serve-http`、または任意の OpenAI 風チャットサーバー)が必要です。\",\"**2. ページに translate.js を追加する。** [そのリポジトリ](https://github.com/xnx3/translate) から `translate.js` をダウンロードし、あなたのサイトと一緒にホスティングしてください。その後、`</body>` の直前に以下の行を追加します。サーバーのアドレスを指定してください。\",\"**3. ページを開く。** 言語メニューが表示され、言語を選択するとページが即座に翻訳されます。コードから言語を選択するには、`translate.changeLanguage('japanese')` を呼び出してください。\",\"動作確認を行う\",\"最初のコマンドは使用中のモデルを報告します。2番目のコマンドは `\\\"text\\\"` に翻訳結果を返します。たとえば `[\\\"こんにちは世界\\\"]` のように。\",\"保護されるもの\",\"すべての翻訳は訪問者が見ることになる前にチェックされます:\",\"リンク、メールアドレス、バックティック内のコード、および `{name}` や `%s` のようなプレースホルダーは、変更されずにそのまま通過する必要があります。\",\"キーリストに登録された製品名(AIEN、Omega、Allen など)は翻訳されません。独自のリストを指定するには `--keep-file` を使用してください。\",\"翻訳が空、または元のテキストより大幅に長い場合は破棄されます。\",\"いずれかのチェックに失敗した場合、訪問者は壊れた翻訳ではなく、元のテキストを表示します。\",\"仕組み\",\"translate.js はページのテキストを `/translate.json` に送信します。サーバーは、GPUが共有されている可能性があるため、バッチごとに1回ずつモデルに送信します。\",\"すべての翻訳は(SQLiteで)保存されるため、同じテキストは2度翻訳されません。再訪問は即座に完了します。\",\"translate.js はウェブアドレスを `//` で分割します。サーバーはその部分を保持するため、リンクが正しく再構築されます。\",\"モデルの回答が入力に一致しない場合、バッチは単一の項目まで分割され、再試行されます。\",\"オプション\",\"エンドポイント:`/translate.json`、`/language.json`、`/connectTest.json`、`/init.json`、`/health`。`/ip.json`(位置情報の照会)は提供されていません。\",\"言語\",\"英語、簡体中国語、繁体中国語、日本語、韓国語、スペイン語、フランス語、ドイツ語、ポルトガル語、イタリア語、ロシア語、ウクライナ語、ポーランド語、オランダ語、スウェーデン語、デンマーク語、ノルウェー語、フィンランド語、チェコ語、ルーマニア語、ハンガリー語、ギリシャ語、トルコ語、アラビア語、ペルシア語、ヒンディー語、ベンガル語、タイ語、ベトナム語、インドネシア語、マレー語。リストは `src/langs.rs` にあります。\",\"テスト\",\"`cargo test` はユニットテストと、仮想モデル(GPU不要)を用いたエンドツーエンドテストを実行します。\",\"`demo/` には本物の translate.js を使用するページがあります。フォルダをサーブし、`python demo/check.py URL` を実行(Playwrightが必要)すると、翻訳されたページを確認できます。\",\"このページの翻訳\",\"このページの他の言語版は、aien-translate 自身が `scripts/translate_readme.py` を使って作成しました。これらは機械翻訳であり、英語版がオリジナルです。\""
36}