sertxudeveloper/laravel-translations-checker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sertxudeveloper/laravel-translations-checker

最新稳定版本:v1.0.1

Composer 安装命令:

composer require sertxudeveloper/laravel-translations-checker

包简介

Check Laravel translation files for missing keys, files, and empty values. Integrates with CI/CD pipelines.

README 文档

README

Translations Checker

Laravel Translations Checker

Codecov Test coverage

Check Laravel translation files for missing translations. Based on the package LarsWiegers/laravel-translations-checker.

This package scans your Laravel translation files and reports:

  • Missing translation files across languages
  • Translation keys that exist in one language but not others
  • Empty or blank translation values

Requirements

This package requires PHP 8.2+ and Laravel 11.0+.

Installation

You can install the package via composer:

composer require sertxudeveloper/laravel-translations-checker

Usage

Run the check command to scan your translation files:

php artisan translations:check

By default, it checks the lang directory in your application. You can specify a different directory:

php artisan translations:check --directory=resources/lang

The command returns exit code 1 if any issues are found, making it suitable for CI/CD pipelines.

Example output

Missing translations:
- The language es (resources/lang/es) is missing the file (auth.php)
- es.validation.required

Empty translations:
- en.messages.welcome (empty value)

Using the Service

You can also use the underlying service in your own code:

use SertxuDeveloper\TranslationsChecker\Services\TranslationCheckerService;

$checker = app(TranslationCheckerService::class);
$result = $checker->check(resource_path('lang'));

$result['missingFiles'];        // Files missing in some languages
$result['missingTranslations']; // Keys missing in some languages
$result['emptyTranslations'];   // Keys with empty values

Testing

This package contains tests. Run them using:

composer test

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.



Copyright © 2026 Sertxu Developer

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固