Skip to content

Commit

Permalink
Merge pull request #162 from wp-cli/update-readme-220
Browse files Browse the repository at this point in the history
Update README.md file
  • Loading branch information
schlessera authored Apr 25, 2019
2 parents 63f5bc0 + 1c4aded commit 0eaf4cb
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ if the source directory is detected as either a plugin or theme.
[--include=<paths>]
Comma-separated list of files and paths that should be used for string extraction.
If provided, only these files and folders will be taken into account for string extraction.
For example, `--include="src,my-file.php` will ignore anything besides `my-file.php` and files in the `src` directory.
Simple glob patterns can be used, i.e. `--include=foo-*.php` includes any PHP file with the `foo-` prefix.
Leading and trailing slashes are ignored, i.e. `/my/directory/` is the same as `my/directory`.
For example, `--include="src,my-file.php` will ignore anything besides `my-file.php` and files in the `src`
directory. Simple glob patterns can be used, i.e. `--include=foo-*.php` includes any PHP file with the `foo-`
prefix. Leading and trailing slashes are ignored, i.e. `/my/directory/` is the same as `my/directory`.

[--exclude=<paths>]
Comma-separated list of files and paths that should be skipped for string extraction.
For example, `--exclude=".github,myfile.php` would ignore any strings found within `myfile.php` or the `.github` folder.
Simple glob patterns can be used, i.e. `--exclude=foo-*.php` excludes any PHP file with the `foo-` prefix.
Leading and trailing slashes are ignored, i.e. `/my/directory/` is the same as `my/directory`.
The following files and folders are always excluded: node_modules, .git, .svn, .CVS, .hg, vendor, *.min.js.
For example, `--exclude=".github,myfile.php` would ignore any strings found within `myfile.php` or the `.github`
folder. Simple glob patterns can be used, i.e. `--exclude=foo-*.php` excludes any PHP file with the `foo-`
prefix. Leading and trailing slashes are ignored, i.e. `/my/directory/` is the same as `my/directory`. The
following files and folders are always excluded: node_modules, .git, .svn, .CVS, .hg, vendor, *.min.js.

[--headers=<headers>]
Array in JSON format of custom headers which will be added to the POT file. Defaults to empty array.
Expand All @@ -87,23 +87,25 @@ if the source directory is detected as either a plugin or theme.
Skips JavaScript string extraction. Useful when this is done in another build step, e.g. through Babel.

[--skip-audit]
Skips string audit where it tries to find possible mistakes in translatable strings. Useful when running in an automated environment.
Skips string audit where it tries to find possible mistakes in translatable strings. Useful when running in an
automated environment.

[--file-comment=<file-comment>]
String that should be added as a comment to the top of the resulting POT file.
By default, a copyright comment is added for WordPress plugins and themes in the following manner:

```
Copyright (C) 2018 Example Plugin Author
This file is distributed under the same license as the Example Plugin package.
```
```
Copyright (C) 2018 Example Plugin Author
This file is distributed under the same license as the Example Plugin package.
```

If a plugin or theme specifies a license in their main plugin file or stylesheet, the comment looks like this:
If a plugin or theme specifies a license in their main plugin file or stylesheet, the comment looks like
this:

```
Copyright (C) 2018 Example Plugin Author
This file is distributed under the GPLv2.
```
```
Copyright (C) 2018 Example Plugin Author
This file is distributed under the GPLv2.
```

[--package-name=<name>]
Name to use for package name in the resulting POT file's `Project-Id-Version` header.
Expand All @@ -115,7 +117,8 @@ if the source directory is detected as either a plugin or theme.
$ 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



Expand Down

0 comments on commit 0eaf4cb

Please sign in to comment.