← All releases

PerfLocale 1.0.7.5

- Less code on every page, XLIFF imports as background jobs, safer Strings saves and database upgrades that retry on their own

  • Performance: visitor pages, Elementor page views, the login page, AJAX requests and admin screens load less PHP code; code for admin screens, imports, sitemaps, writes and background jobs loads only when it is used, and a disabled add-on is not loaded.
  • Performance: the language switcher's script and stylesheet are minified; the full files load with SCRIPT_DEBUG.
  • Performance: perflocale_get_permalink() in a loop reads the posts and slugs of the whole query at once instead of one post at a time.
  • Machine translation: External Agency can send several texts in one request (Batch Requests, off by default); the request and answer contract is in the docs.
  • Machine translation: a new External Agency address must start with https://, or be an http:// address on a host added with the perflocale/mt/trusted_hosts filter (a local or Docker endpoint); a stored http:// address keeps working and the settings screen shows a warning. A settings import never sets an http:// agency address for a host that is not on that list.
  • Machine translation: text that is only whitespace is never sent to a provider.
  • Machine translation: resuming a stopped bulk run keeps a translation someone edited in the meantime and reports it.
  • Machine translation: a failed provider call names the item and its length, for example "block text 3 of 12 (1,234 characters)"; the provider's own error text goes only to the PHP error log, with WP_DEBUG_LOG on.
  • Machine translation: a short title or excerpt in Chinese, Japanese or Korean is saved with a warning instead of being refused, and a length warning is kept beside a page builder warning.
  • Machine translation and bulk jobs: a translation a stopped job was creating is completed or removed when the job continues, and that recovery never deletes or overwrites a person's edit.
  • XLIFF import: a translation a stopped import was creating is completed when the import continues; a draft it left before linking it is kept and listed in the import's messages, never deleted, and a translation someone edited since is left as it is.
  • XLIFF import: an import through the REST API runs as a background job in short slices instead of being refused above 60 translation units, and continues after an interruption. POST /xliff/import answers 202 with the job.
  • XLIFF import: the uploaded file is kept privately until the import ends; a failed import keeps its file so Retry works, and deleting the job deletes the file. A site keeps at most 20 files and 128 MB waiting for import at a time.
  • Strings screen: a save writes only the cells you changed. Your edit wins over machine translation: a machine translation written since you opened the page is replaced. A cell that someone else or a PO import changed after the page was opened is kept, and an edit of it is reported instead of written.
  • Strings: a translation a person saves while machine translation runs keeps its manual label.
  • Strings: a .po export writes each plural string as a gettext plural entry with every form the language has, so exporting and importing a file keeps all plural forms.
  • Database upgrades: a step that cannot finish is retried on its own, is shown in a notice with a Retry now button and in the new Site Health test "PerfLocale database upgrade", and never stops the site from loading. The schema version is recorded only when every table, column and index is in place.
  • WP-CLI: new wp perflocale jobs run <job_id> runs one background job in the WP-CLI process, without a web request's time limit.
  • WP-CLI: wp perflocale health-check reports string links that have no translation; it now runs ten checks.
  • WP-CLI: wp perflocale db-migrate prints each failed upgrade step and exits non-zero, and wp perflocale addon settings set says why a value was not saved.
  • WooCommerce: changing the store's base currency fetches the exchange rates for it in the next background run.
  • WooCommerce: Store API answers in a visitor's cookie language are never stored by shared caches, on every supported WordPress version.
  • Uploads folders: the protective .htaccess in PerfLocale's uploads folders works on Apache 2.2 and on Apache 2.4 with or without mod_access_compat; an upgrade replaces an old one safely and retries until it succeeds.
  • Settings: a settings save that stores nothing names the cause (another save running, the database refusing the option, a filter that kept the stored values, or an add-on's size limit), on the settings screens and in WP-CLI.
  • Export & Import: settings that could not be saved because another settings save was running are no longer counted as imported.
  • Polylang import: a failed read of the string translations and a string translation that cannot be saved are reported, and default-language posts and terms that no longer exist are counted.
  • TranslatePress import: write failures are reported.
  • SEO: hreflang tags print once per page.
  • A disabled language never appears as a public link.
  • perflocale_home_url() without a language uses the current language in every URL mode.
  • A date without a time zone is read in the site's time zone.
  • REST API: creating a draft or pending post with a slug no longer fails with an error.
  • Language switcher: each link's lang and hreflang attributes carry the language's BCP 47 tag from its locale, as the page's hreflang tags do.
  • Developers: template tags and helper methods take a language slug, locale or BCP 47 tag, and the format and date helpers take a language.
  • Developers: switcher() and [perflocale_switcher] take include, exclude and untranslated_link; new flag_emoji(); translations() can return published translations only.
  • Developers: language switcher events carry detail.pointer.
  • Developers: a template tag given an unknown or inactive language returns the unconverted URL and raises a _doing_it_wrong notice (visible with WP_DEBUG); perflocale_if_language() called before plugins_loaded returns false.
  • Developers: a filter callback that returns the wrong type on perflocale/string/translate, the language switcher and the format filters is ignored and reported with _doing_it_wrong.
  • Developers: perflocale/updated can run again after an update task failed, so listeners must be idempotent; perflocale/mt/trusted_hosts also lists the hosts that may serve the External Agency address over http://.
  • Developers: new filters perflocale/mt/agency_batch_max_texts, perflocale/mt/agency_batch_max_chars and perflocale/import/xliff_staging_quota.
  • Security hardening.