File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file.
44
5- The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
5+ The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
66and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
77
8+ ## [ 1.1.0] - Unreleased
9+ ### Removed
10+ - Function ` _ ` in the list of default functions to scan
11+
12+ ### Fixed
13+ - Support for ` gettext/gettext v5.5.0 `
14+
815## 1.0.0 - 2019-11-05
916First version
17+
18+ [ 1.1.0 ] : https://github.com/php-gettext/JS-Scanner/compare/v1.0.0...HEAD
Original file line number Diff line number Diff line change 1919 },
2020 "require" : {
2121 "php" : " ^7.2" ,
22- "gettext/gettext" : " ^5.0.0 " ,
22+ "gettext/gettext" : " dev-feature/functions-handlers-trait " ,
2323 "mck89/peast" : " ^1.9"
2424 },
2525 "require-dev" : {
Original file line number Diff line number Diff line change 1010 */
1111class JsScanner extends CodeScanner
1212{
13+ use FunctionsHandlersTrait;
14+
15+ protected $ functions = [
16+ 'gettext ' => 'gettext ' ,
17+ '__ ' => 'gettext ' ,
18+ 'ngettext ' => 'ngettext ' ,
19+ 'n__ ' => 'ngettext ' ,
20+ 'pgettext ' => 'pgettext ' ,
21+ 'p__ ' => 'pgettext ' ,
22+ 'dgettext ' => 'dgettext ' ,
23+ 'd__ ' => 'dgettext ' ,
24+ 'dngettext ' => 'dngettext ' ,
25+ 'dn__ ' => 'dngettext ' ,
26+ 'dpgettext ' => 'dpgettext ' ,
27+ 'dp__ ' => 'dpgettext ' ,
28+ 'npgettext ' => 'npgettext ' ,
29+ 'np__ ' => 'npgettext ' ,
30+ 'dnpgettext ' => 'dnpgettext ' ,
31+ 'dnp__ ' => 'dnpgettext ' ,
32+ 'noop ' => 'gettext ' ,
33+ 'noop__ ' => 'gettext ' ,
34+ ];
35+
1336 public function getFunctionsScanner (): FunctionsScannerInterface
1437 {
1538 return new JsFunctionsScanner (array_keys ($ this ->functions ));
You can’t perform that action at this time.
0 commit comments