Skip to content
forked from wp-pot/wp-pot

Generate pot file for WordPress plugins and themes

License

Notifications You must be signed in to change notification settings

frozzare/wp-pot

 
 

Repository files navigation

wp-pot

Information

npm version Build Status Dependency Status Scrutinizer Code Quality Code Coverage

Package wp-pot
Description Generate pot files for WordPress plugins and themes.

Install

$ npm install --save-dev wp-pot

Example usage

const wpPot = require('wp-pot');

wpPot({
  destFile: 'file.pot',
  domain: 'domain',
  package: 'Example project',
  src: 'src/*.php'
});

Options

All options is optional

  • bugReport
    Description: Header with URL for reporting translation bugs
    Type: string
    Default: undefined
  • commentKeyword
    Description: Keyword to trigger translator comment.
    Type: string
    Default: translators:
  • domain
    Description: Domain to retrieve the translated text. All textdomains is included if undefined.
    Type: string
    Default: undefined
  • destFile
    Description: Filename for template file
    Type: string
    Default: domain.pot or translations.pot if domain is undefined
  • headers
    Description: Object containing extra POT-file headers. Set to false to not generate the default extra headers for Poedit.
    Type: object|bool
    Default: Headers used by Poedit
  • gettextFunctions
    Description: Gettext functions used for finding translations.
    Type: object
    Default: WordPress translation functions
  • lastTranslator
    Description: Name and email address of the last translator (ex: John Doe <[email protected]>)
    Type: string
    Default: undefined
  • package
    Description: Package name
    Type: string
    Default: domain or unnamed project if domain is undefined
  • relativeTo
    Description: Path to folder that file comments should be relative to
    Type: string
    Default: destFile location or current working directory if destFile is undefined
  • src
    Description: Glob or globs to match files (see Globbing Patterns)
    Type: string|array
    Default: **/*.php
  • team
    Description: Name and email address of the translation team (ex: Team <[email protected]> )
    Type: string
    Default: undefined
  • writeFile
    Description: Write pot-file to disk. The function always returns the contents as well.
    Type: boolean
    Default: true

Related

License

MIT © Rasmus Bengtsson

About

Generate pot file for WordPress plugins and themes

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%