| 开发者 | errorwebagency |
|---|---|
| 更新时间 | 2026年9月17日 23:21 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL v2 or later |
| 版权网址: | 版权信息 |
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
entry_X) and strict JSON envelope validation to guarantee 1:1 translation mapping without drift or alignment offset.%s, %d, %1$s, %%), variable templates ({var}, {{var}}), HTML tags, attributes (href, src), and HTML entities to prevent code corruption in translations.msgctxt): Preserves gettext context disambiguation across the entire parsing and translation pipeline.nplurals) defined for the target locale. Partial plural forms are safely detected and completed..mo files via WordPress POMO classes..po and .mo files before performing automated AI translations.ewa-ai-string-assistant-for-loco-translate folder to your /wp-content/plugins/ directory, or install the ZIP file via Plugins → Add New → Upload Plugin.You can find the plugin settings by navigating to Settings → EWA AI String Assistant in the WordPress administrator sidebar menu. A direct Settings link is also available on the Plugins screen (plugins.php) right under the plugin name. When editing any .po file in Loco Translate (Loco Translate → Plugins or Loco Translate → Themes), the AI translation controls and status badges appear automatically directly above the Gettext translation table.
Yes. EWA AI String Assistant for Loco Translate is an add-on that specifically extends Loco Translate. Loco Translate must be installed and active.
On WordPress 7.0+ with the native WordPress AI Client mode active, no plugin-level API key is required — credentials and connectors are managed centrally by WordPress Core (Settings → Connectors). In Direct Connection mode, an API key is required for OpenRouter or commercial OpenAI endpoints, but local Ollama instances require no API keys.
No. No data is ever sent automatically or in the background. Data is sent to the configured AI provider only when an administrator explicitly initiates an action, such as testing the connection or translating strings.
No. By default, the plugin only translates untranslated strings. Existing translated strings in your PO file are preserved intact.
The plugin parses the PO file header for plural rules (Plural-Forms: nplurals=...) and sends both singular and plural source strings to the AI. The AI generates all required plural variations, which are validated against the target language's plural count before being written to the file.
The plugin includes exponential backoff retry logic for transient errors (such as network hiccups or rate limits). If a permanent error occurs (e.g. 401 Invalid Key or 404 Model Not Found), the job halts cleanly and provides an actionable error message. Failed items are never falsely flagged as fuzzy.
Translations are written atomically to the .po file on your server using WP_Filesystem and standard locking mechanisms. The plugin then automatically compiles the binary .mo file using WordPress POMO classes, making the translations immediately available to WordPress.
Yes. The plugin is licensed under GPL v2 or later and can be used on any number of personal or commercial websites without restrictions.
The site administrator is solely responsible for creating and maintaining backups of translation files prior to using the plugin, and for reviewing generated translations for contextual correctness. The developers and Error Web Agency (EWA) assume no liability for machine translation errors, unintended file overwrites, data loss, or third-party API costs.
load_plugin_textdomain() usage and rely on WordPress just-in-time translation loading.WP_AI_Client_Prompt_Builder::__call().ewa-ai-string-assistant-for-loco-translate.plugins.php and settings screen) with dismissal capability in strict compliance with Guideline 11.ewaas_ (ewaas_* AJAX actions, ewaas-admin / ewaas-loco script and style handles, nonces, and helper functions). Removed all legacy ewa_ runtime identifiers.ewa_settings to canonical ewaas_settings with schema tracking (ewaas_schema_version).wp_add_privacy_policy_content() disclosing header usage attribution.wp_ai_client_prompt) and retained direct provider adapter to preserve WordPress 6.0+ support, OpenRouter, local Ollama, and administrator-defined endpoint workflows.init action hook.msgctxt context support and JSON-encoded deduplication keys across the entire pipeline.entry_X) and strict JSON envelope validation.Translation_Validator class for strict tokenization and validation of printf formats, variable templates, HTML tags/attributes, and HTML entities.nplurals and Strategy B partial plural regeneration.ewaas_job_{job_id} transients with idempotency request protection.WP_Error classification with early abort on permanent API errors (401, 403, 404).WP_Filesystem.ewa_settings.