level-level/clarkson-wp-cli-twig-translations
最新稳定版本:v1.0.6
Composer 安装命令:
composer require level-level/clarkson-wp-cli-twig-translations
包简介
Smart WP-CLI command to cache the Twig templates so they can be read by PoEdit
README 文档
README
⚠️ Abandoned
This package is abandoned due to incompatibility with Twig version 3.12+.
You may use timber/wp-i18n-twig instead.
Replacement instructions
composer remove level-level/clarkson-wp-cli-twig-translationscomposer require timber/wp-i18n-twig- 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 - If in your composer.json file you have commands set up to run the WP-CLI
wp i18n make-potcommand, change thewpprefix to./vendor/wp-cli/wp-cli/bin/wp composer update --lock
What
Parses all Twig files in your current themes templates directory to .php files.
How
-
Install package via
composer require level-level/clarkson-wp-cli-twig-translations. -
Run
wp clarkson-twig-translations prepare-fileswhich dumps rendered.phpfiles in adistdirectory in your current active theme. -
Make sure your PoEdit
.potor.pofile configuration loads thisdistfolder when it updates from source like"X-Poedit-SearchPath-1: dist/rendered-templates\n"
Why
Free PoEdit doesn't scans Twig files. If you do want PoEdit to do this, buy the Pro version.
Filters
clarkson_twig_translations_cache_pathalters the location where to parse to.clarkson_twig_translations_templates_pathalters the location where thetemplatesare located in.
统计信息
- 总下载量: 152.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-only
- 更新时间: 2017-09-25