PHPackages                             tuhin18003/fix-translators-comments - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. tuhin18003/fix-translators-comments

ActiveLibrary[Localization &amp; i18n](/categories/localization)

tuhin18003/fix-translators-comments
===================================

A PHP package to automatically add translators' comments in WordPress localization code using ChatGPT.

v1.1.0(1y ago)027MITPHPPHP ^7.4 || ^8.0CI passing

Since Oct 2Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/tuhin18003/fix-translators-comments-WordPerss)[ Packagist](https://packagist.org/packages/tuhin18003/fix-translators-comments)[ RSS](/packages/tuhin18003-fix-translators-comments/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

Fix Translators Comments
========================

[](#fix-translators-comments)

This package automatically adds translators' comments to your WordPress localization strings using ChatGPT.

Installation
------------

[](#installation)

Run the following command to install via Composer:

```
composer require tuhin18003/fix-translators-comments
```

Usage
-----

[](#usage)

Once the package is installed, you can run the command to fix translators' comments in your WordPress localization files.

Command
-------

[](#command)

You can run the command using Composer as follows:

```
composer run-script fix-translators-comments --openApiKey= --directory=
```

Parameters
----------

[](#parameters)

- openApiKey: Your OpenAI API key to authenticate requests.
- directory: The path to the directory containing the files you want to process.

Example Usages
--------------

[](#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:

[![result sample](https://camo.githubusercontent.com/5fa436dffbab706dc86907095bd39f5554204001ba6d9ff36357b90f5c8d1b9d/687474703a2f2f7374617469632e636f6465736f6c7a2e6e65742f6769746875622f6669782d7472616e736c61746f72732d636f6d6d656e74732f6669782d7472616e736c61746f72732d636f6d6d656e74732e706e67)](https://camo.githubusercontent.com/5fa436dffbab706dc86907095bd39f5554204001ba6d9ff36357b90f5c8d1b9d/687474703a2f2f7374617469632e636f6465736f6c7a2e6e65742f6769746875622f6669782d7472616e736c61746f72732d636f6d6d656e74732f6669782d7472616e736c61746f72732d636f6d6d656e74732e706e67)

Sample Comment added on file:

[![comment sample](https://camo.githubusercontent.com/e6d799c87c1e4fa3e05cff999ddf1322847f2f85d2bdd1f29a0fa782f46539fb/687474703a2f2f7374617469632e636f6465736f6c7a2e6e65742f6769746875622f6669782d7472616e736c61746f72732d636f6d6d656e74732f73616d706c652d636f6d6d656e742e706e67)](https://camo.githubusercontent.com/e6d799c87c1e4fa3e05cff999ddf1322847f2f85d2bdd1f29a0fa782f46539fb/687474703a2f2f7374617469632e636f6465736f6c7a2e6e65742f6769746875622f6669782d7472616e736c61746f72732d636f6d6d656e74732f73616d706c652d636f6d6d656e742e706e67)

### Credentials

[](#credentials)

- *Created by - [M.Tuhin](https://codesolz.net/)*

[ ![codesolz.net](https://camo.githubusercontent.com/7e4b3b5e13e6afbfb17600e7b5501bce5c00a985a595c2896d1f287774c8a783/68747470733a2f2f636f6465736f6c7a2e6e65742f696d616765732f6272616e642d6c6f676f2f6c6f676f2e706e67)](https://codesolz.net)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance46

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~271 days

Total

2

Last Release

314d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d3ca97c3d8c9f5c5e46763ff130c96b5b5deafc3d2c41ce78d19ad50fda3b9c?d=identicon)[tuhin18003](/maintainers/tuhin18003)

---

Top Contributors

[![tuhin18003](https://avatars.githubusercontent.com/u/3587495?v=4)](https://github.com/tuhin18003 "tuhin18003 (13 commits)")

### Embed Badge

![Health badge](/badges/tuhin18003-fix-translators-comments/health.svg)

```
[![Health](https://phpackages.com/badges/tuhin18003-fix-translators-comments/health.svg)](https://phpackages.com/packages/tuhin18003-fix-translators-comments)
```

###  Alternatives

[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[vemcogroup/laravel-translation

Translation package for Laravel to scan for localisations and up/download to poeditor

135304.0k2](/packages/vemcogroup-laravel-translation)[kargnas/laravel-ai-translator

AI-powered translation tool for Laravel language files

24838.8k1](/packages/kargnas-laravel-ai-translator)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)[acclaro/translations

Easily launch and manage multilingual Craft websites without having to copy/paste content or manually track updates.

1229.5k](/packages/acclaro-translations)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
