{"id":19647645,"url":"https://github.com/wp-pot/wp-pot","last_synced_at":"2025-04-28T15:32:12.403Z","repository":{"id":13964503,"uuid":"75532964","full_name":"wp-pot/wp-pot","owner":"wp-pot","description":"Generate pot file for WordPress plugins and themes","archived":true,"fork":false,"pushed_at":"2024-11-07T14:53:53.000Z","size":1494,"stargazers_count":77,"open_issues_count":15,"forks_count":15,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-25T06:57:00.241Z","etag":null,"topics":["hacktoberfest","poedit","pot","translator","wordpress","wp-pot"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/wp-pot","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wp-pot.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-04T11:20:34.000Z","updated_at":"2024-11-07T14:57:07.000Z","dependencies_parsed_at":"2024-03-27T16:07:58.358Z","dependency_job_id":"8e58ae1c-5e95-4ec2-bdf4-692f2062ce2e","html_url":"https://github.com/wp-pot/wp-pot","commit_stats":{"total_commits":442,"total_committers":22,"mean_commits":20.09090909090909,"dds":0.7918552036199095,"last_synced_commit":"98faef281f1ef698916648d800c93a9c101d07e2"},"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-pot%2Fwp-pot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-pot%2Fwp-pot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-pot%2Fwp-pot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wp-pot%2Fwp-pot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wp-pot","download_url":"https://codeload.github.com/wp-pot/wp-pot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338757,"owners_count":21573605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","poedit","pot","translator","wordpress","wp-pot"],"created_at":"2024-11-11T14:44:46.493Z","updated_at":"2025-04-28T15:32:07.362Z","avatar_url":"https://github.com/wp-pot.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/rasmus"],"categories":[],"sub_categories":[],"readme":"# wp-pot\n\n## Information\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/wp-pot/wp-pot/Node%20CI/master)](https://github.com/wp-pot/wp-pot/actions) [![npm version](https://badge.fury.io/js/wp-pot.svg)](https://www.npmjs.com/package/wp-pot) [![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/wp-pot/wp-pot.svg)](https://isitmaintained.com/project/wp-pot/wp-pot \"Average time to resolve an issue\") [![Percentage of issues still open](https://isitmaintained.com/badge/open/wp-pot/wp-pot.svg)](https://isitmaintained.com/project/wp-pot/wp-pot \"Percentage of issues still open\")\n\n| Package     | wp-pot                                               |\n| ----------- | ---------------------------------------------------- |\n| Description | Generate pot files for WordPress plugins and themes. |\n\n## Like my work and want to say thanks?\n\nDo it here:  \n[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/rasmus)\n\n## Install\n\n```sh\nnpm install --save-dev wp-pot\n```\n\n## Example usage\n\n### PHP File Parsing\n\n```js\nconst wpPot = require('wp-pot');\n\nwpPot({\n  destFile: 'file.pot',\n  domain: 'domain',\n  package: 'Example project',\n  src: 'src/*.php'\n});\n```\n\n### JS File Parsing (only js, no jsx for now)\n\n```js\nwpPot({\n  parser: 'js',\n  parserOptions: {\n    ecmaVersion: 6,\n  },\n  src: 'test/fixtures/edge-cases.js'\n});\n```\n\n## Options\n\n*All options is optional*\n\n- `bugReport`\n  Description: Header with URL for reporting translation bugs.\n  Type: `string`\n  Default: undefined\n- `commentKeyword`\n  Description: Keyword to trigger translator comment.\n  Type: `string`\n  Default: `translators:`\n- `copyrightText`\n  Description: Copyright text\n  Type: `function|string`\n  Default: A function that takes `options` object as a argument and return the default copyright text.\n- `domain`\n  Description: Domain to retrieve the translated text. All textdomains is included if undefined.\n  Type: `string`\n  Default: undefined\n- `destFile`\n  Description: Filename for template file.\n  Type: `string`\n  Default: `domain.pot` or `translations.pot` if domain is undefined.\n- `headers`\n  Description: Object containing all default headers. Set to false to not generate the default extra headers for Poedit.\n  Type: `object|bool`\n  Default: Headers used by Poedit.\n- `gettextFunctions`\n  Description: Gettext functions used for finding translations.\n  Type: `object`\n  Default: WordPress translation functions.\n- `includePOTCreationDate`\n  Description: Auto-populate the `POT-Creation-Date` header.\n  Type: `bool`\n  Default: true\n- `lastTranslator`\n  Description: Name and email address of the last translator (ex: `John Doe \u003cme@example.com\u003e`).\n  Type: `string`\n  Default: undefined\n- `metadataFile`\n  Description: Path to file containing plugin/theme metadata header relative to `relativeTo`\n  Type: `string`\n  Default: undefined\n- `noFilePaths`\n  Description: Do not print out file references in pot file.\n  Type: `bool`\n  Default: false\n- `package`\n  Description: Package name.\n  Type: `string`\n  Default: `domain` or `unnamed project` if domain is undefined.\n- `parser`\n  Description: PHP or JS parser\n  Type: `string`\n  Default: `php`\n- `parserOptions`\n  Description: Options for the JS parser Espree. See [here](https://github.com/eslint/espree#options).\n  Type: `object`\n  Default: `{ comment: true, loc: true }`\n- `relativeTo`\n  Description: Path to folder that file comments should be relative to.\n  Type: `string`\n  Default: `destFile` location or current working directory if `destFile` is undefined.\n- `src`\n  Description: Glob or globs to match files\n  Type: `string|array`\n  Default: `**/*.php`\n- `globOpts`\n  Description: [node-glob options](https://github.com/isaacs/node-glob#options) object to be passed through.\n  Type: `Object`\n  Default: `{}`\n- `team`\n  Description: Name and email address of the translation team (ex: `Team \u003cteam@example.com\u003e`).\n  Type: `string`\n  Default: undefined\n- `writeFile`\n  Description: Write pot-file to disk. The function always returns the contents as well.\n  Type: `boolean`\n  Default: `true`\n- `ignoreTemplateNameHeader`\n  Description: Do not extract `/* Template Name: String */` headers to POT file.\n  Type: `boolean`\n  Default: `false`\n\n## Related\n\n- [php-parser](https://github.com/glayzzle/php-parser) - NodeJS PHP Parser used in this project\n- [gulp-wp-pot](https://github.com/wp-pot/gulp-wp-pot) - Run wp-pot via gulp\n- [wp-pot-cli](https://github.com/wp-pot/wp-pot-cli) - Run wp-pot via cli command\n\n## License\n\nMIT © [Rasmus Bengtsson](https://github.com/rasmusbe)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-pot%2Fwp-pot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwp-pot%2Fwp-pot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwp-pot%2Fwp-pot/lists"}