承接 incenteev/translation-checker-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

incenteev/translation-checker-bundle

Composer 安装命令:

composer require --dev incenteev/translation-checker-bundle

包简介

CLI tools to check translations in a Symfony project

README 文档

README

This bundle provides you a few CLI commands to check your translations. These commands are designed to be usable easily in CI jobs

CI Latest Stable Version Latest Unstable Version Scrutinizer Code Quality

Installation

Installation is a quick (I promise!) 2 step process:

  1. Download IncenteevTranslationCheckerBundle
  2. Enable the Bundle

Step 1: Install IncenteevTranslationCheckerBundle with composer

Run the following composer require command:

composer require incenteev/translation-checker-bundle

Step 2: Enable the bundle

Note: If you use Flex, you have nothing to do at this step, as Flex does it for you.

Finally, enable the bundle in the kernel:

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Incenteev\TranslationCheckerBundle\IncenteevTranslationCheckerBundle(),
    );
}

Warning: This bundle requires that the translator is enabled in FrameworkBundle.

Usage

The bundle provides a few CLI commands. To list them all, run:

bin/console list incenteev:translation

All commands display a summary only by default. Run then in verbose mode to get a detailed report.

Finding missing translations

The incenteev:translation:find-missing command extracts necessary translations from our app source code, and then compare this list to the translation available for the tested locale. It will exit with a failure exit code if any missing translation is detected.

Warning: Translation extraction will not find all translations used by our app. So while a failure exit code means there is an issue, a success exit code does not guarantee that all translations are available. The recommended usage is to use this command for your reference locale only, and then test other locales by comparing them against the reference instead.

Comparing translations to a reference locale

The incenteev:translation:compare command compares available translations from 2 different locales and will exit with a failure exit code if catalogues are not in sync.

Note: this command may not work well for country variants of a locale (fr_FR). Use it for main locales.

Configuration

To use the commands comparing the catalogue to the extracted translations, you need to configure the bundles in which the templates should be parsed for translations. By default, only templates in templates (and app/Resources/views on Symfony 4 and older) are registered in the extractor. You can register bundles that will be processed too.

# app/config/config.yml
incenteev_translation_checker:
    extraction:
        bundles:
            - TwigBundle
            - AcmeDemoBundle

The bundle also supports extracting translations from JS files, for projects using willdurand/js-translation-bundle:

# app/config/config.yml
incenteev_translation_checker:
    extraction:
        js:
            # Paths in which JS files should be checked for translations.
            # Path could be either for files, or for directories in which JS files should be looked for.
            # This configuration is required to enable this feature.
            paths:
                - '%kernel.project_dir%/web/js'
                - '%kernel.project_dir%/web/other.js'
            # The default domain used in your JS translations. Should match the js-translation-bundle configuration
            # Defaults to 'messages'
            default_domain: js

incenteev/translation-checker-bundle 适用场景与选型建议

incenteev/translation-checker-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 596.57k 次下载、GitHub Stars 达 36, 最近一次更新时间为 2013 年 06 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「translation」 「testing」 「translation check」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 incenteev/translation-checker-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 incenteev/translation-checker-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 incenteev/translation-checker-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 596.57k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 36
  • 点击次数: 38
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 36
  • Watchers: 3
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-06-26