Skip to content

v1.0.0

Latest

Choose a tag to compare

@github-actions github-actions released this 10 Nov 00:28
a118af0

Install and setup: installation guide.

What's in 1.0.0

First stable release. Every plugin release is now tested end to end against the live Supertext API (.github/workflows/e2e.yml).

Removed

  • Support for Node.js 20 (end of life since 30 April 2026). The plugin now needs Node.js 22 or newer (engines); CI tests Node 22, 24 and 26.

Security

  • The development setup and the demo force the fixed versions of dompurify (3.4.17, XSS fixes; pinned by Payload's code editor) and happy-dom (21.0.4, used by Lexical's headless editor) with npm overrides; the demo also takes the fixed fast-uri. No change to the plugin itself.

Added

  • Support for Node.js 24 and 26, tested in CI next to Node 20 and 22. Tested with Payload 3.92 (the demo runs 3.92.1 with Next.js 16.4.3). Payload 3.92 itself needs Node.js 22.23.4 or newer; the plugin still runs on Node 20 with older Payload 3 versions.

  • Translation review per locale (Supertext → Supertext settings → Translation review under each locale, off by default): translations into a locale with it ticked go through Supertext's review service (Supertext Localization Review), where customers and Supertext linguists correct them on the website with a Chrome extension; corrections come back into Payload with the next translation, and texts translated before keep their (reviewed) wording. Same API key, billing, languages and messages; other locales keep going directly to Supertext. New options reviewUrl (default SUPERTEXT_REVIEW_URL, else Supertext's review service; '' turns review off everywhere) and review (per-locale override, the checkbox is then read-only). All four interface languages. SQL databases: create a migration after updating (npx payload migrate:create supertext_translation_review): the Supertext settings global gets one boolean column per locale (languages_l_<locale>_review, default off).

  • Requests to Supertext name the plugin's version in the User-Agent (Payload-Supertext-Translation/<version>).

  • Export for translation (XLIFF 1.2 or HTML) and import of translated files; Supertext SDK 0.5.0. In the Translate control, Export for translation downloads the document's texts for the chosen languages as an XLIFF file (for translation tools) or an HTML file (one language, e.g. for Supertext's web app); Import translation reads the translated file back and saves it like a Supertext translation (as a draft where drafts are on), with a summary of imported, skipped (source changed since the export; optional), untranslated, invalid and missing texts. No API key needed; uploads up to 10 MB, never stored. New endpoints POST /api/supertext/export and /api/supertext/import.

  • Supertext settings (admin sidebar → Supertext → Supertext settings): one combo box per Payload locale (source locale included) with Supertext's languages as Name (code), preselected with Supertext's suggestion, plus a formal/informal select where the chosen language offers one. Stored in a new global supertext-settings; only Supertext's codes can be saved. New option settingsAccess (default: access, else any logged-in user) decides who may change it. SQL databases: create a migration after updating (npx payload migrate:create supertext_settings), and again whenever you add or remove a locale.

  • The Supertext panel shows where each locale's code comes from (automatic, chosen in the settings, or the languageMap option) and links to the settings.

  • Support: the Supertext support form is linked in the README, the user guide and GitHub's "New issue" page.

  • Docs: demo movie in the README (docs/images/demo.gif, recorded from the demo against the stand-in with npm run movie in test/docs; the MP4 version, not committed, is narrated with the Piper voice “alba”).

  • Docs: install and configuration movie (npm run movie:install in test/docs): npm install, the plugin in payload.config.ts, the import map and migration, SUPERTEXT_API_KEY, the key check on the Supertext panel, the language mapping in Supertext settings and the Translate button; narrated MP4, not committed.

Changed

  • Development: the plugin is type-checked and built with TypeScript 7 (from 5.9). The demo moved from cross-env 7 to 10 and needs Node.js 22.23.4 or newer, or 24.22.1 or newer, like Payload 3.93.

  • Tested with Payload 3.93 (the demo moved from Payload 3.92.1 to 3.93.0 and from Next.js 16.4.3 to 16.4.5; development dependencies on 3.93.0).

  • Default languages (bundled Supertext SDK 0.4.0, commit 6aaad33): a locale nobody mapped now uses Supertext's obvious default instead of failing: de → de-DE, en → en-US, fr → fr-FR, it → it-IT, pt → pt-PT, zh → zh-Hans, zh-TW → zh-Hant, sr → sr-Latn, es-ES → es. Only locales without mapping and default (en-IE, de-LI, gsw, …) are still marked no Supertext language yet and fail with has no Supertext language yet; that message now points to Supertext → Supertext settings.

  • The languageMap and politeness options are now optional overrides of the settings screen (they win per locale; such a combo box is read-only). Existing configurations keep working unchanged.

  • Version reports, the API key check result and the reachability ping now use Supertext Plugin Health 0.1.0 (bundled in src/vendor/supertext-plugin-health); Supertext SDK updated to 0.3.0. No change for sites: settings and stored state stay as they are.

  • Languages: no more guessed codes (bundled Supertext SDK 0.2.0, commit c66cb4d). Supertext accepts only the codes of its language list: de-CH, en-US, pt-BR, but bare es, nl, sl, and zh-Hans, sr-Latn. A Payload locale that is such a code (apart from case and _/-) is used as it is; every other locale needs an entry in languageMap (e.g. { en: 'en-US', de: 'de-CH', fr: 'fr-FR' }). The default regions (de → de-DE, es → es-ES, zh → zh-CN, …) are gone: several were rejected by Supertext. Check your locales after updating: an unmapped locale is marked no Supertext language yet in the Translate menu, Not mapped on the new Supertext panel, and a translation into it fails with The language … has no Supertext language yet (nothing is sent). For a mapped locale used as the source, the mapped code's language is sent.

  • A formal or informal tone (politeness) for a target without one (English, Swiss German, Romansh, Albanian, Serbian) now fails with Supertext offers no formal or informal tone for this language instead of being sent; the Supertext panel warns about it.

  • After updating, run npx payload generate:importmap: the plugin adds a second client component (payload-supertext-translation/client#SupertextStatus).

Added

  • Supertext panel on the admin dashboard (for users who may translate; dashboardPanel: false hides it): plugin and SDK version, the latest API key check with its time and Check again, every locale with the Supertext code and tone it is sent with, and whether version information is sent.
  • Automatic API key check (Supertext's cost-free features call) when the plugin first runs with a new key, on Check again and when Supertext rejects the key during a translation; messages in English, German, French and Italian with the links to create an account and generate a key.
  • Send version information to Supertext (option versionReports, on by default; SUPERTEXT_VERSION_REPORTS=0 turns it off): after an update and when the key check changes, the plugin sends the site URL, the plugin, Payload, Node.js and SDK versions, whether a key is set, the key check result and the ping URL to the Supertext Commando Center. No content, no API key, no personal data. The state is kept in Payload's key-value store (payload.kv); no migration needed.
  • Public ping endpoint GET /api/supertext/ping (answers only while version information is sent), so Supertext can see that the site is reachable.
  • Messages for the new Supertext errors unsupported_language and unsupported_feature in all four languages.

Changed

  • The connection to Supertext now uses the shared Supertext SDK (TypeScript SDK 0.1.0), compiled into the plugin, so nothing else needs installing. Translation works as before; an unsupported language pair now has its own message (Supertext does not support this language pair) in all four languages, and the file at Supertext is also deleted after errors. An unknown language (e.g. xx-YY) is now reported as an unsupported language pair too, not as "resource not found" (Supertext answers it with HTTP 404).

Added

  • French and Italian interface (and German where it was missing): the Translate control, its messages and the endpoints' errors follow the user's Payload admin language (English, German, French, Italian; other languages show English). Strings are merged into i18n.translations under the supertext namespace and can be overridden there. The demo offers all four admin languages.

Changed

  • The Authentication failure message now links to Supertext account signup and API key generation.

Fixed

  • One language map for both directions (bundled Supertext SDK 0.2.1, commit eeba8fa): a mapped locale is sent as a source in its source form ({ de: 'de-CH' } translates from de), so English as the source no longer fails with an { en: 'en-US' } mapping.

  • Bare locales such as de were sent as bare targets, which Supertext rejected with INVALID_LANGUAGE_PAIR. (An interim fix gave them a default region; that is replaced by the language mapping above.) Regional codes are matched regardless of case and _/- (de_ch → de-CH).