=== shipglobal ===
Contributors: shipglobal
Tags: translation, wpml, polylang, multilingual, localization
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.2.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Translate WordPress content with shipglobal and save it in WPML or Polylang.

== Description ==

Select posts, pages, classic menus and dynamic theme or plugin strings in Tools → shipglobal. Preview the work and estimated price, then start a run. New post and page translations start as drafts by default. The “Translate with shipglobal” action in the Posts and Pages lists opens an estimate for that item when the target language is known. Review drafts and proposed updates under Awaiting review. Updates to published translations show a comparison and require approval. For new posts with immediate publication enabled, quality checks or missing translations keep the result in draft.

You can preview the price for a post or page before connecting an account. Confirm that the selected content may be sent for this free estimate. Translation needs a shipglobal subscription and a team token. The Single plan on Stripe includes your first WordPress connection when you create a website token for its WordPress site address in your team account. Other team tokens use a seat. The Shipglobal model key requires an approved team spending limit. You can add your own model API key. Enable automatic runs for published posts and pages, choose target languages, and enter an estimate limit for automatic runs using the shipglobal key. The team cap applies on the engine.

== Installation ==

1. Activate WPML or Polylang and configure the source and target languages.
2. Under Plugins → Add Plugin → Upload Plugin, select the shipglobal ZIP. Install and activate it.
3. Open Tools → shipglobal. Choose a post or page and the target language, then request a free estimate.
4. To translate, connect a website or team token from your [shipglobal account](https://www.shipglobal.dev/en/account/team). Review the estimate and start the translation.

== Command line ==

Use WP-CLI on the WordPress server. Run `wp help shipglobal` to list commands. Set `--user` to a WordPress user with the appropriate capability.

`wp --user=admin shipglobal plan --posts=42,43 --to=en,fr --format=json`

`wp --user=admin shipglobal translate --posts=42,43 --to=en,fr --approve=PLAN_APPROVAL --wait --format=json`

Read `approval` from the plan output. For scripts using the shipglobal key, `--max-eur=0.50` can approve a fresh estimate up to that amount. The estimate is distinct from the team spending cap. WP-CLI aliases and `--ssh` work with a remote WordPress installation. To connect, pipe a team token from your secret store into `wp --user=admin shipglobal connect --consent`. The command reads the token from standard input.

Use `wp --user=admin shipglobal inbox --format=json` for the review queue. For an update to a live post, `shipglobal review RUN TARGET` shows the comparison and `shipglobal approve RUN TARGET` applies it. For a new draft, review and publish in the WordPress editor.

Other commands include `connection`, `list`, `status`, `cancel`, `resume` and `watch`.

== External services ==

The plugin sends the selected source and target content and model options to https://api.shipglobal.dev for previews and translation. It sends the team token to https://www.shipglobal.dev to exchange it for a session and reads team usage and cap from the account service. The optional model key is sent with plans, new jobs and requests to resume a job. The engine deletes job files 24 hours after the job ends and removes project files after 30 days of inactivity. See the [terms](https://www.shipglobal.dev/en/terms) and [privacy policy](https://www.shipglobal.dev/en/privacy).

== Changelog ==

= 0.2.4 =
* Shows estimated extra usage and the amount covered by monthly translation credit.

= 0.2.3 =
* Preview content before connecting an account. Keep the selection when connecting a website.

= 0.2.2 =
* Connect the included website with its own site address. Show how to use a personal model key when team usage is locked.

= 0.2.0 =
* Start from the post list, review the estimate and open the translated draft.
* Review changes to published translations before approving them in WordPress or WP-CLI.
* Show quality notes and retain new translations with findings as drafts.

= 0.1.0 =
* Initial plugin for WPML and Polylang.
* Add WordPress dashboard and WP-CLI workflows.
