|
Download wp-calypso/packages/i18n-calypso-cli/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 824 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/i18n-calypso-cli/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/i18n-calypso-cli/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/i18n-calypso-cli/README.md
824 Bytes
i18n-calypso CLI
Scans your JavaScript sources/build files and generates a POT file or a PHP translation file which can be understood by the GlotPress plugin.
Installation
yarn add i18n-calypso-cli
Using the CLI
yarn global add i18n-calypso-clii18n-calypso -i <input_file> -o <output_file> -f <format:POT|PHP>
From your code
const i18nCalypso = require( 'i18n-calypso-cli' );
i18nCalypso( {
inputPaths, // <paths to your js files to scan>,
output, // <path to your destination>
format, // <format of the output: POT, PHP or JSON>
projectName, // <Meta information about the project which can be used for autogenerated headers>
} );
See more examples of usage in test/index.js
License
GlotPress.js is licensed under GNU General Public License v2 (or later).