tuhin18003/fix-translators-comments
Composer 安装命令:
composer require tuhin18003/fix-translators-comments
包简介
A PHP package to automatically add translators' comments in WordPress localization code using ChatGPT.
README 文档
README
This package automatically adds translators' comments to your WordPress localization strings using ChatGPT.
Installation
Run the following command to install via Composer:
composer require tuhin18003/fix-translators-comments
Usage
Once the package is installed, you can run the command to fix translators' comments in your WordPress localization files.
Command
You can run the command using Composer as follows:
composer run-script fix-translators-comments --openApiKey=<YOUR_API_KEY> --directory=<DIRECTORY_PATH>
Parameters
- openApiKey: Your OpenAI API key to authenticate requests.
- directory: The path to the directory containing the files you want to process.
Example Usages
1. Using a specific API key and directory:
If your OpenAI API key is exampleApiKey and you want to process files in the /test directory, the command will look like this:
composer run-script fix-translators-comments --openApiKey=exampleApiKey --directory=/test
2. Processing files in the current directory:
If you want to process files in the current directory, you can simply run:
composer run-script fix-translators-comments --openApiKey=exampleApiKey --directory=.
3. Checking the usage:
If you need to check the command usage and parameters, you can use:
composer run-script fix-translators-comments
4. In your project's composer.json - scripts
If you want to process files in the /test directory, the command will look like this:
"scripts": { "fixTranslatorsComments": "php ./vendor/tuhin18003/fix-translators-comments/src/FixTranslatorsCommand.php --openApiKey=exampleApiKey --directory=./test" }
you want to process a single file, the command will look like this:
"scripts": { "fixTranslatorsComments": "php ./vendor/tuhin18003/fix-translators-comments/src/FixTranslatorsCommand.php --openApiKey=exampleApiKey --directory=./test/filename.php" }
Then on the terminal run:
composer run fixTranslatorsComments
Result Summary:
Sample Comment added on file:
Credentials
- Created by - M.Tuhin
tuhin18003/fix-translators-comments 适用场景与选型建议
tuhin18003/fix-translators-comments 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 29 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 10 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 tuhin18003/fix-translators-comments 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 tuhin18003/fix-translators-comments 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-02