WordPress plugin intelligence profile

Automatic Variants for GlotPress

Plugin for GlotPress to manage automatically converted variants.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 5.8
Current version1.0.0
WordPress coverageTested up to WordPress 5.8
Minimum stackWP 5.3 · PHP 7.2
Directory statusactive
Last directory update10 Aug 20224y ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Automatic Variants for GlotPress version 1.0.0 as active, updated 4y ago and tested up to WordPress 5.8.

Overview

About this plugin

This plugin for GlotPress customizes the default behavior of a set of chosen pairs of Locales (root/variant), allowing you to automatically convert the approved/current strings in the root to its variant.

It keeps the root translations automatically converted and synced with its variant translations within your GlotPress install.

The only translations added to the variant translation set are those which are different from the root translation.

The strings that don’t need any conversion remain untranslated on the variant, falling back to the root Locale.

org.

Features

  • Filter gp_automatic_variants_list to add your variant to the array of automatically converted variants.
  • Filter gp_automatic_variants_convert_{variant_locale} to process the conversion of strings of the automatic variant.
  • Check for GlotPress minimum requirements.
  • Check if the added Locales are variants supported the installed GlotPress.
  • Convert current root translations and add to the variant translation set.
  • Delete variant unused translations instead of keeping as rejected, fuzzy, old.
  • Delete current variant translation if a new root translation (same original_id ) is added and doesn’t need conversion.

Install GlotPress

-

0-alpha minimum version.

-

Install and activate this plugin from your plugins page.

Configure Automatic Variants for GlotPress

-

Set the variants you want to be automatically converted with the filter gp_automatic_variants_list:

/** * Add my automatically converted variants. */ function my_automatic_variants( $locales ) { $additional_locales = array( 'ca-valencia', 'pt-ao90', 'ca-valencia', 'en-gb', 'de-at', 'de-ch', ); return array_merge( $locales, $additional_locales ); }

add_filter( 'gp_automatic_variants_list', 'my_automatic_variants' );

-

Add your Locale actual conversion process with the filter gp_automatic_variants_convert_{variant_locale}:

Example for the variant ‘pt-ao90’:

/** * Actual conversion of the string. */ function convert_translation( $translation ) { return do_something( $translation ); }

add_filter( 'gp_automatic_variants_convert_pt-ao90', 'convert_translation' );

Usage

-

For every translation project, add both root and variant translation sets as usual.

-

Translate only on the root Locale and see the conversions automatically propagate to the variant.

Requirements

  • GlotPress 3.0.0-alpha with Variants support.
WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • glotpress
  • localization
  • translation
  • variants
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 5.8

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 5.8.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to5.8
Minimum requirementsWordPress 5.3 · PHP 7.2
Update activity10 Aug 20224y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.