PHPackages                             itmar/add\_lazy\_pot\_file - 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. itmar/add\_lazy\_pot\_file

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

itmar/add\_lazy\_pot\_file
==========================

This is a command to add information corresponding to lazy loading to the POT file for functioning the translation function provided by WordPress.

v1.0.0(2y ago)03MITPHP

Since Apr 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/itmaroon/add_lazy_pot_file)[ Packagist](https://packagist.org/packages/itmar/add_lazy_pot_file)[ RSS](/packages/itmar-add-lazy-pot-file/feed)WikiDiscussions master Synced 1mo ago

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

wp-cli/add\_source\_path
========================

[](#wp-cliadd_source_path)

Provides a function that adds the path information of the calling file of lazy loading to the translation template file (POT file) corresponding to the translation function.

Quick links: [Using](#using) | [Installing](#installing) | [Notes](#notes) | [Support](#support)

When to use
-----------

[](#when-to-use)

When using a module that is not always used, delaying loading it until it is time to use it is called lazy loading, and React provides a function called `React.lazy`. When you use this, the transpiled js file is divided into 1) a file that is loaded with a delay, and 2) a file that calls it. When the part using the translation function is stored in ①, `wp i18n make-pot`, the WP-CLI command for creating a POT file, outputs only the path information of ① to the POT file, and the path of ② No information is output. ② If you create a Javascript translation file based on a POT file that does not have file path information, you will not be able to render the translated result. Therefore, the path information in ② must be recorded in the POT file. This WP-CLI command provides the ability to add ② file path information to the file generated with `wp i18n make-pot`.

Using
-----

[](#using)

```
wp add_source_path [text domain]

```

Among the plugins installed in WordPress, select the js file that uses the `React.lazy` function from the build folder of the plugin that has the text domain information \[text domain\] as the plugin information, and select the js file that uses the `React.lazy` function. Based on the lazy loading information read from , write the path information of the selected js file to the POT file and overwrite it.

Installing
----------

[](#installing)

This package is provided as a Composer project, so install it using the Composer installation procedure.

1. Clone GitHub repository: Navigate to the folder where WordPress is installed, open a command prompt or terminal, and clone the repository using Git commands as follows:

```
git clone https://github.com/itmaroon/add_lazy_pot_file.git

```

2. Installing Composer dependencies Change to the directory of the cloned repository.

```
cd ./add_lazy_pot_file

```

Install dependencies.

```
composer install

```

Notes
-----

[](#notes)

1. This WP-CLI command assumes support for the translation system of the plugin that provides the Gutenberg block component.
2. `Text Domain:` must be set in the plugin information (comment at the beginning of the PHP file that is the entry point of the plugin).
3. A POT file must be created in advance using `wp i18n make-pot`. This file name is \[text domain\].pot and must be located in one of the folders within the plugin's root folder.

Support
-------

[](#support)

If you have any questions, please contact us at the following email address.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

763d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3e40f932943bb0f71cf938d02ccaed312c797bc2b09b81fd2c47f1a8d49ef0f?d=identicon)[itmaroon2024](/maintainers/itmaroon2024)

---

Top Contributors

[![itmaroon](https://avatars.githubusercontent.com/u/15277545?v=4)](https://github.com/itmaroon "itmaroon (7 commits)")

### Embed Badge

![Health badge](/badges/itmar-add-lazy-pot-file/health.svg)

```
[![Health](https://phpackages.com/badges/itmar-add-lazy-pot-file/health.svg)](https://phpackages.com/packages/itmar-add-lazy-pot-file)
```

###  Alternatives

[symfony/translation

Provides tools to internationalize your application

6.6k836.5M2.1k](/packages/symfony-translation)[nesbot/carbon

An API extension for DateTime that supports 281 different languages.

169661.4M4.8k](/packages/nesbot-carbon)[joedixon/laravel-translation

A tool for managing all of your Laravel translations

717911.4k11](/packages/joedixon-laravel-translation)[illuminate/translation

The Illuminate Translation package.

6936.4M495](/packages/illuminate-translation)[wp-cli/entity-command

Manage WordPress comments, menus, options, posts, sites, terms, and users.

1048.8M55](/packages/wp-cli-entity-command)[lajax/yii2-translate-manager

Translation management extension for Yii 2

227578.8k13](/packages/lajax-yii2-translate-manager)

PHPackages © 2026

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