2017 © Pedro Peláez
 

library clarkson-wp-cli-twig-translations

Smart WP-CLI command to cache the Twig templates so they can be read by PoEdit

image

level-level/clarkson-wp-cli-twig-translations

Smart WP-CLI command to cache the Twig templates so they can be read by PoEdit

  • Wednesday, April 11, 2018
  • by level-level
  • Repository
  • 5 Watchers
  • 0 Stars
  • 175 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 127 % Grown

The README.md

Clarkson WP-CLI Twig Translation commando

⚠️ Abandoned

This package is abandoned due to incompatibility with Twig version 3.12+. You may use timber/wp-i18n-twig instead., (*1)

Replacement instructions

  1. composer remove level-level/clarkson-wp-cli-twig-translations
  2. composer require timber/wp-i18n-twig
  3. If in your composer.json file you have commands set up to run this package, remove every line that starts with wp clarkson-twig-translations
  4. If in your composer.json file you have commands set up to run the WP-CLIwp i18n make-pot command, change the wp prefix to ./vendor/wp-cli/wp-cli/bin/wp
  5. composer update --lock

What

Parses all Twig files in your current themes templates directory to .php files., (*2)

How

  1. Install package via composer require level-level/clarkson-wp-cli-twig-translations., (*3)

  2. Run wp clarkson-twig-translations prepare-files which dumps rendered .php files in a dist directory in your current active theme., (*4)

  3. Make sure your PoEdit .pot or .po file configuration loads this dist folder when it updates from source like "X-Poedit-SearchPath-1: dist/rendered-templates\n", (*5)

Why

Free PoEdit doesn't scans Twig files. If you do want PoEdit to do this, buy the Pro version., (*6)

Filters

  • clarkson_twig_translations_cache_path alters the location where to parse to.
  • clarkson_twig_translations_templates_path alters the location where the templates are located in.

The Versions

11/04 2018

dev-master

9999999-dev

Smart WP-CLI command to cache the Twig templates so they can be read by PoEdit

  Sources   Download

GPL 2.0 GPL-2.0-only

The Requires

 

14/07 2017

0.1.0

0.1.0.0

Smart WP-CLI command to cache the Twig templates so they can be read by PoEdit

  Sources   Download

GPL 2.0

The Requires