[WordPress] 外掛分享: EWA AI String Assistant for Loco Translate

首頁外掛目錄 › EWA AI String Assistant for Loco Translate
WordPress 外掛 EWA AI String Assistant for Loco Translate 的封面圖片
全新外掛
安裝啟用
尚無評分
剛更新
最後更新
問題解決
WordPress 6.0+ PHP 7.4+ v1.8.4 上架:2026-09-16

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.8.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「EWA AI String Assistant for Loco Translate」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

EWA AI String Assistant for Loco Translate integrates state-of-the-art AI translation directly into the Loco Translate editor for WordPress plugins and themes.
On WordPress 7.0+, it seamlessly leverages the official, native WordPress AI Client (wp_ai_client_prompt) and connectors configured centrally in WordPress Core, requiring zero plugin-level API keys. For WordPress 6.x or specialized setups, it provides an Advanced Direct Connection mode supporting OpenRouter (Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek, Meta Llama), locally hosted or remote Ollama instances, or any custom OpenAI-compatible API endpoint.
Key Features

Native WordPress AI Client Support (WordPress 7.0+): Seamlessly uses the AI provider and credentials configured centrally in WordPress Core (Settings → Connectors) with zero plugin-level API keys required.
Advanced Direct Connection Mode: Full support for OpenRouter, local or remote self-hosted Ollama instances, and custom OpenAI-compatible endpoints with idempotent settings retention.
Direct Loco Translate Integration: Adds an “🤖 AI Translate” action panel to the Loco Translate PO file editor toolbar.
Deterministic ID-Based AI Protocol: Uses stable entry IDs (entry_X) and strict JSON envelope validation to guarantee 1:1 translation mapping without drift or alignment offset.
Strict Token & Placeholder Validation: Validates printf specifiers (%s, %d, %1$s, %%), variable templates ({var}, {{var}}), HTML tags, attributes (href, src), and HTML entities to prevent code corruption in translations.
Full Context Support (msgctxt): Preserves gettext context disambiguation across the entire parsing and translation pipeline.
Native Plural Forms: Automatically requests and maps the exact number of plural forms (nplurals) defined for the target locale. Partial plural forms are safely detected and completed.
Smart Filtering & Cost Optimization: Automatically skips non-translatable strings (numbers, URLs, pure placeholders, HTML tags) in memory without making redundant API requests.
Atomic File Saving & Compilation: Writes PO files atomically using temporary files and filesystem locks, preserving file permissions and automatically compiling binary .mo files via WordPress POMO classes.
Real-Time Progress & Analytics: Monitor batch progress, elapsed time, strings translated, and token usage in real time.
Direct & Transparent Communication: In WordPress AI Client mode, requests are routed by WordPress Core through the configured connector. In Direct mode, requests are sent from your server to the configured endpoint without any Error Web Agency-operated intermediary or proxy server. Services such as OpenRouter may route requests onward to their own model providers under their terms and privacy policies.
100% Free & Open Source: No paywalls, no trial limits, no feature restrictions.

Important Disclaimer & Recommendations

Loco Translate Disclaimer: Loco Translate is an independent project by Tim Whitlock. This plugin is an independent third-party add-on and is not affiliated with, sponsored, or endorsed by Loco Translate or its authors.
Backup First: Always create a complete backup of your .po and .mo files before performing automated AI translations.
Review Translations: AI-generated translations are automated suggestions. Site owners are advised to review translated strings for context, grammar, and tone before deploying them on public or production sites.
API Usage & Costs: If using paid third-party APIs (such as OpenRouter or commercial providers), monitor your usage and set spending limits on your provider dashboard. Developers are not responsible for third-party billing charges.

External Services
This plugin can connect to external AI services when an administrator configures a provider and explicitly initiates an operation that requires that provider, such as translating strings, running an explicit Direct Connection test, or loading Direct Connection models. The WordPress AI Client availability check is local and does not send translation content to an AI provider.
Translation content is sent only to the provider selected and configured by the administrator (or configured centrally in WordPress Core Connectors). No data is ever transmitted automatically or in the background.
1. WordPress AI Client (WordPress 7.0+)
When the site is running WordPress 7.0 or higher and WordPress AI Client mode is active (default for new installations), translation requests are delegated to the official WordPress AI Client API (wp_ai_client_prompt()). WordPress AI Client is a routing interface; the actual external service is the AI provider configured by the administrator under Settings → Connectors.

Purpose: Translating Gettext PO strings using the central AI provider configured in WordPress Core (Settings → Connectors).
Data Transmitted: Source strings, plural variations, Gettext context (msgctxt), target language name, translation instructions, and optional model preferences.
Routing & Authentication: WordPress Core and the configured connector handle provider authentication and transport routing. This plugin does not access WordPress AI Client provider credentials. Previously saved Advanced Direct Connection credentials may remain stored in this plugin’s settings so an administrator can switch back later, but those credentials are not used while WordPress AI Client mode is active.
When Data is Transmitted: Translation content is transmitted only after an administrator explicitly starts an AI translation or another operation that performs generation. The “Check AI Availability” action performs a local capability/configuration check and does not transmit translation content to an AI provider.
Service Policies: Refer to the privacy policy and terms of service of the specific AI provider configured in your WordPress Settings → Connectors screen.

2. OpenRouter (Direct Connection Mode)
When OpenRouter is configured, HTTP requests required for AI translation are sent to the OpenRouter API.

Purpose: Translating Gettext PO strings using cloud-hosted LLM models (e.g. Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek, Meta Llama) and querying the list of available models.
Data Transmitted:

Source strings and plural variations to be translated
Translation context (msgctxt) and target language name
System translation prompt and instructions
Selected model identifier and temperature settings
Administrator-configured API key (transmitted via standard HTTP Authorization Bearer header)
Site URL (HTTP-Referer header) and Site Title (X-Title header) as requested by OpenRouter API conventions for usage attribution

Downstream Model Provider Routing: OpenRouter operates as an AI API gateway and aggregator. When using OpenRouter, your translation prompts, source strings, and context are routed by OpenRouter to the specific AI model provider (such as Anthropic, OpenAI, Google, Meta, or Mistral) selected in your settings. Each upstream model provider processes data in accordance with their respective data and privacy policies as described in the OpenRouter Privacy Policy.
When Data is Transmitted: Exclusively when an authenticated administrator clicks “AI Translate” in the Loco Translate editor, “Test Connection”, or “Load Models” on the settings screen.
Provider: OpenRouter, Inc.
Service Website: https://openrouter.ai/
Terms of Service: https://openrouter.ai/terms
Privacy Policy: https://openrouter.ai/privacy

3. Ollama (Direct Connection Mode)
When Ollama is selected, HTTP requests are sent to the endpoint specified by the administrator (defaulting to http://localhost:11434).

Purpose: Translating strings using self-hosted open-source language models.
Data Transmitted: Source strings, plural forms, Gettext context, target language, system prompt, and model options.
Local vs Remote Hosting:

When using a locally hosted Ollama instance (http://localhost:11434), all data processing occurs entirely within the local server environment. No data is transmitted to any third-party cloud service.
If the administrator enters a remote Ollama server URL (e.g. on a private LAN or VPS), data is transmitted to that specific host configured by the administrator.

When Data is Transmitted: Only upon explicit administrator action (running a translation batch, testing connection, or loading models).
Provider: Self-hosted application by Ollama.
Service Website: https://ollama.com/
Terms of Service: https://ollama.com/terms
Privacy Policy: https://ollama.com/privacy

4. OpenAI API (Direct Connection Mode)
OpenAI API is an optional external service. It is used only when an administrator explicitly selects the OpenAI preset (https://api.openai.com/v1) or configures an OpenAI endpoint and provides an OpenAI API key.

Purpose: Translating Gettext PO strings using official OpenAI models (such as GPT-4o, GPT-4o-mini) and querying the list of available OpenAI models.
Data Transmitted: Source strings, plural variations, Gettext context (msgctxt), target language name, system translation prompt and instructions, selected model identifier, and temperature settings. The administrator’s OpenAI API key is transmitted via standard HTTP Authorization Bearer header for direct authentication with OpenAI servers.
When Data is Transmitted: Exclusively upon explicit administrator action (clicking “AI Translate” in Loco Translate, “Test Connection”, or “Load Models” in the settings screen). No background requests, periodic polling, or automatic data collection occur.
Direct Communication: All requests are dispatched directly from your WordPress server to OpenAI’s official API servers. Error Web Agency does not operate any intermediary proxy servers and never intercepts, logs, or stores your API keys or translation data.
Provider: OpenAI, Inc. / OpenAI Ireland Ltd.
Service Website: https://openai.com/
Services Agreement: https://openai.com/policies/services-agreement/
Service Terms: https://openai.com/policies/service-terms/
Privacy Policy: https://openai.com/policies/privacy-policy/
Enterprise Privacy & Data Handling: https://openai.com/enterprise-privacy/

5. Custom OpenAI-Compatible Endpoints (Direct Connection Mode)
When a custom endpoint is configured, requests are sent directly from your WordPress server to the endpoint URL specified by the administrator.

Purpose: Allowing site administrators to connect to an administrator-configured OpenAI-compatible API service (e.g. self-hosted local proxies, corporate gateways, or other compliant AI providers).
Data Transmitted: Source strings, plural forms, Gettext context (msgctxt), target language, system prompt parameters, model identifier, and configured API credentials.
When Data is Transmitted: Only when an administrator explicitly initiates a translation batch, tests the connection, or queries the model list.
Provider & Privacy Policy: Because the endpoint is configured by the site administrator, no uniform third-party policy applies. Administrators are responsible for reviewing the terms of service, privacy policy, and data handling practices of their selected endpoint provider. Error Web Agency has no access to or control over custom endpoints.

Terms of Use & Disclaimer
This plugin is provided on an “AS IS” and “AS AVAILABLE” basis, without warranties of any kind, whether express, implied, or statutory, including without limitation warranties of merchantability, fitness for a particular purpose, and non-infringement.
Under no circumstances shall Error Web Agency (EWA), its developers, or contributors be held liable for any direct, indirect, incidental, special, consequential, or punitive damages, including but not limited to:
* Loss of data, corrupted translation files, or overwritten .po/.mo files.
* Inaccuracies, errors, offensive content, or hallucinations produced by third-party artificial intelligence models.
* Billing charges, subscription fees, or rate-limit overages incurred with third-party API providers (e.g. OpenRouter, OpenAI, or other providers).
* Business interruption, lost profits, or reputational harm arising out of the use or inability to use this plugin.
By installing and using this plugin, you explicitly acknowledge and agree that:
1. You are solely responsible for creating and maintaining independent backup copies of all translation files prior to running translations.
2. You will independently review and verify all machine-generated translations before using them in a live or production environment.
3. You control your own third-party API credentials, parameters, and spending limits.
Credits
Developed by Error Web Agency.
Lead Developer: K2D.
Development Repository: https://github.com/error-agency/ewa-ai-string-assistant-for-loco-translate
This plugin integrates with Loco Translate, which is an independent project by Tim Whitlock and is not developed, affiliated with, or endorsed by Error Web Agency.

延伸相關外掛

文章
Filter
Mastodon