afe/translation-tool-bundle
最新稳定版本:0.1.0
Composer 安装命令:
composer require afe/translation-tool-bundle
包简介
Check for duplicated translations code, unused translations codes, ...
README 文档
README
This bundle provide a set of tools to :
- Find unused translations code
- Find duplicated translations code
Installation :
composer require afe/translation-tool-bundle:dev-master
// AppKernel.php
public function registerBundles()
{
...
$bundles = array(
...
new Afe\TranslationToolBundle\AfeTranslationToolBundle(),
...
);
...
}
Configuration :
# config.yml
afe_translation_tool:
# translation files configuration
translation_files_dir_path: "%kernel.root_dir%/.." # translation files root directory
translation_files_locale: fr # locale of translations files to process
translation_files_format: yml # translation files format to process (only yml is currently supported)
excluded_translation_file_mask: ["dtc_*"] # excluded translations files from process
excluded_translation_directories: ["vendor"] # exclude translation files of this directory
# processed directory configuration
src_dir_path: "%kernel.root_dir%/.." # src root directory
format_to_look_into: ["twig", "html", "php", "js"] # look for unused translation in those given files
excluded_file_mask: ["fr.json", "fr.js"] # file to exclude from the process
excluded_directories: ["node_modules", "vendor", "data", "compiled", "bootstrap", "assets"] # file to exclude from the process
Usage :
# display duplicated translations code
php app/console afe:translation:check:codes
# display unused translations code
php app/console afe:translation:unused:codes
统计信息
- 总下载量: 115
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-06