Download the PHP package itmar/add_lazy_pot_file without Composer

On this page you can find all versions of the php package itmar/add_lazy_pot_file. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package add_lazy_pot_file

wp-cli/add_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: Support

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

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

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:

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

Install dependencies.

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

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


All versions of add_lazy_pot_file with dependencies

PHP Build Version
Package Version
Requires wp-cli/wp-cli Version ^2.8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package itmar/add_lazy_pot_file contains the following files

Loading the files please wait ...