Skip to content

Commit

Permalink
Merge pull request #390 from ernilambar/382-add-make-pot-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Feb 29, 2024
2 parents 7538d68 + c3f9628 commit b722556
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,14 @@ if the source directory is detected as either a plugin or theme.

**EXAMPLES**

# Create a POT file for the WordPress plugin/theme in the current directory
# Create a POT file for the WordPress plugin/theme in the current directory.
$ wp i18n make-pot . languages/my-plugin.pot

# Create a POT file for the continents and cities list in WordPress core.
$ wp i18n make-pot . continents-and-cities.pot --include="wp-admin/includes/continents-cities.php"
--ignore-domain
$ wp i18n make-pot . continents-and-cities.pot --include="wp-admin/includes/continents-cities.php" --ignore-domain

# Create a POT file for the WordPress theme in the current directory with custom headers.
$ wp i18n make-pot . languages/my-theme.pot --headers='{"Report-Msgid-Bugs-To":"https://github.com/theme-author/my-theme/","POT-Creation-Date":""}'



Expand Down
8 changes: 5 additions & 3 deletions src/MakePotCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,14 @@ class MakePotCommand extends WP_CLI_Command {
*
* ## EXAMPLES
*
* # Create a POT file for the WordPress plugin/theme in the current directory
* # Create a POT file for the WordPress plugin/theme in the current directory.
* $ wp i18n make-pot . languages/my-plugin.pot
*
* # Create a POT file for the continents and cities list in WordPress core.
* $ wp i18n make-pot . continents-and-cities.pot --include="wp-admin/includes/continents-cities.php"
* --ignore-domain
* $ wp i18n make-pot . continents-and-cities.pot --include="wp-admin/includes/continents-cities.php" --ignore-domain
*
* # Create a POT file for the WordPress theme in the current directory with custom headers.
* $ wp i18n make-pot . languages/my-theme.pot --headers='{"Report-Msgid-Bugs-To":"https://github.com/theme-author/my-theme/","POT-Creation-Date":""}'
*
* @when before_wp_load
*
Expand Down

0 comments on commit b722556

Please sign in to comment.