1.10.2 • Published 3 years ago
wp-pot v1.10.2
wp-pot
Information
| Package | wp-pot |
|---|---|
| Description | Generate pot files for WordPress plugins and themes. |
Like my work and want to say thanks?
Install
npm install --save-dev wp-potExample usage
PHP File Parsing
const wpPot = require('wp-pot');
wpPot({
destFile: 'file.pot',
domain: 'domain',
package: 'Example project',
src: 'src/*.php'
});JS File Parsing (only js, no jsx for now)
wpPot({
parser: 'js',
parserOptions: {
ecmaVersion: 6,
},
src: 'test/fixtures/edge-cases.js'
});Options
All options is optional
bugReportDescription: Header with URL for reporting translation bugs. Type:stringDefault: undefinedcommentKeywordDescription: Keyword to trigger translator comment. Type:stringDefault:translators:copyrightTextDescription: Copyright text Type:function|stringDefault: A function that takesoptionsobject as a argument and return the default copyright text.domainDescription: Domain to retrieve the translated text. All textdomains is included if undefined. Type:stringDefault: undefineddestFileDescription: Filename for template file. Type:stringDefault:domain.potortranslations.potif domain is undefined.headersDescription: Object containing all default headers. Set to false to not generate the default extra headers for Poedit. Type:object|boolDefault: Headers used by Poedit.gettextFunctionsDescription: Gettext functions used for finding translations. Type:objectDefault: WordPress translation functions.includePOTCreationDateDescription: Auto-populate thePOT-Creation-Dateheader. Type:boolDefault: truelastTranslatorDescription: Name and email address of the last translator (ex:John Doe <me@example.com>). Type:stringDefault: undefinedmetadataFileDescription: Path to file containing plugin/theme metadata header relative torelativeToType:stringDefault: undefinednoFilePathsDescription: Do not print out file references in pot file. Type:boolDefault: falsepackageDescription: Package name. Type:stringDefault:domainorunnamed projectif domain is undefined.parserDescription: PHP or JS parser Type:stringDefault:phpparserOptionsDescription: Options for the JS parser Espree. See here. Type:objectDefault:{ comment: true, loc: true }relativeToDescription: Path to folder that file comments should be relative to. Type:stringDefault:destFilelocation or current working directory ifdestFileis undefined.srcDescription: Glob or globs to match files Type:string|arrayDefault:**/*.phpglobOptsDescription: node-glob options object to be passed through. Type:ObjectDefault:{}teamDescription: Name and email address of the translation team (ex:Team <team@example.com>). Type:stringDefault: undefinedwriteFileDescription: Write pot-file to disk. The function always returns the contents as well. Type:booleanDefault:trueignoreTemplateNameHeaderDescription: Do not extract/* Template Name: String */headers to POT file. Type:booleanDefault:false
Related
- php-parser - NodeJS PHP Parser used in this project
- gulp-wp-pot - Run wp-pot via gulp
- wp-pot-cli - Run wp-pot via cli command
License
MIT © Rasmus Bengtsson
1.10.2
3 years ago
1.10.1
4 years ago
1.10.0
4 years ago
2.0.0-0
4 years ago
2.0.0
4 years ago
1.9.9
4 years ago
1.9.8
5 years ago
1.9.7
5 years ago
1.9.6
5 years ago
1.9.4
5 years ago
1.9.3
5 years ago
1.9.2
6 years ago
1.9.1
6 years ago
1.9.0
6 years ago
1.8.0
6 years ago
1.7.3
6 years ago
1.7.2
6 years ago
1.7.1
7 years ago
1.7.0
7 years ago
1.6.6
7 years ago
1.6.5
7 years ago
1.6.4
7 years ago
1.6.3
7 years ago
1.6.2
7 years ago
1.6.1
8 years ago
1.6.0
8 years ago
1.6.0-2
8 years ago
1.6.0-1
8 years ago
1.6.0-0
8 years ago
1.5.1
8 years ago
1.5.0
8 years ago
1.4.0
8 years ago
1.3.5
8 years ago
1.3.4
8 years ago
1.3.3
8 years ago
1.3.2
8 years ago
1.3.1
8 years ago
1.3.0
8 years ago
1.2.0
8 years ago
1.1.5
9 years ago
1.1.4
9 years ago
1.1.3
9 years ago
1.1.2
9 years ago
1.1.1
9 years ago
1.1.0
9 years ago
1.0.0
9 years ago
0.0.2
9 years ago
0.0.1
9 years ago
