{"id":20140234,"url":"https://github.com/10quality/gettext-wp-scanner","last_synced_at":"2026-03-05T20:24:23.415Z","repository":{"id":65697108,"uuid":"597253459","full_name":"10quality/gettext-wp-scanner","owner":"10quality","description":"WordPress scanner for gettext.","archived":false,"fork":false,"pushed_at":"2023-02-05T05:52:38.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-22T01:59:49.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/10quality.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-02-04T01:14:20.000Z","updated_at":"2023-12-31T10:51:01.000Z","dependencies_parsed_at":"2023-02-18T22:00:49.383Z","dependency_job_id":null,"html_url":"https://github.com/10quality/gettext-wp-scanner","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/10quality/gettext-wp-scanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fgettext-wp-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fgettext-wp-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fgettext-wp-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fgettext-wp-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/10quality","download_url":"https://codeload.github.com/10quality/gettext-wp-scanner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fgettext-wp-scanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080738,"owners_count":27282294,"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","status":"online","status_checked_at":"2025-11-26T02:00:06.075Z","response_time":193,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-13T21:49:50.257Z","updated_at":"2026-03-05T20:24:23.405Z","avatar_url":"https://github.com/10quality.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress scanner for Gettext\n\n![Packagist Version](https://img.shields.io/packagist/v/10quality/gettext-wp-scanner)\n![GitHub Workflow Status (with branch)](https://img.shields.io/github/actions/workflow/status/10quality/gettext-wp-scanner/php.yml)\n![GitHub](https://img.shields.io/github/license/10quality/gettext-wp-scanner)\n\nWordPress code scanner to use with [gettext/gettext](https://github.com/php-gettext/Gettext).\n\nThe scanner is a PHP based same as the **gettext** package.\n\n## Installation\n\n```bash\ncomposer require 10quality/gettext-wp-scanner\n```\n\n## PHP usage example\n\n```php\nuse Gettext\\Translations;\nuse Gettext\\Generator\\PoGenerator;\nuse TenQuality\\Gettext\\Scanner\\WPPhpScanner;\n\n// Create a new scanner, adding the plugin / theme domain we want to get:\n$phpScanner = new WPPhpScanner(\n    Translations::create('my-domain')\n);\n\n// Scan PHP files\nforeach (glob('*.php') as $file) {\n    $phpScanner-\u003escanFile($file);\n}\n\n//Save the translations in .po files\n$generator = new PoGenerator();\n\nforeach ($phpScanner-\u003egetTranslations() as $domain =\u003e $translations) {\n    $generator-\u003egenerateFile($translations, \"locales/{$domain}.po\");\n}\n```\n\n## JavaScript usage example\n\n```php\nuse Gettext\\Translations;\nuse Gettext\\Generator\\PoGenerator;\nuse TenQuality\\Gettext\\Scanner\\WPJsScanner;\n\n// Create a new scanner, adding the plugin / theme domain we want to get:\n$phpScanner = new WPJsScanner(\n    Translations::create('my-domain')\n);\n\n// Scan PHP files\nforeach (glob('*.js') as $file) {\n    $phpScanner-\u003escanFile($file);\n}\n\n//Save the translations in .po files\n$generator = new PoGenerator();\n\nforeach ($phpScanner-\u003egetTranslations() as $domain =\u003e $translations) {\n    $generator-\u003egenerateFile($translations, \"locales/{$domain}.po\");\n}\n```\n\n## Coverage\n\n**Languages**\n\n- [x] PHP\n- [X] JavaScript\n\n**PHP functions**\n\n- [x] `__()`\n- [x] `_e()`\n- [x] `_n()`\n- [x] `_n_noop()`\n- [x] `_x()`\n- [x] `_nx()`\n- [x] `_nx_noop()`\n- [x] `esc_attr__()`\n- [x] `esc_attr_e()`\n- [x] `esc_attr_x()`\n- [x] `esc_html__()`\n- [x] `esc_html_e()`\n- [x] `esc_html_x()`\n\n**JavaScript functions**\n\n- [x] `__()`\n- [x] `_x()`\n- [x] `_n()`\n- [x] `_nx()`\n\n## Requirements\n\n* [gettext/gettext](https://github.com/php-gettext/Gettext)\n* PHP \u003e= 7.2.\n\n## License\n\nThe MIT License (MIT). Please see `LICENSE` File for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10quality%2Fgettext-wp-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F10quality%2Fgettext-wp-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10quality%2Fgettext-wp-scanner/lists"}