File tree 3 files changed +34
-2
lines changed
3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
All notable changes to this project will be documented in this file.
4
4
5
- The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
5
+ The format is based on [ Keep a Changelog] ( http://keepachangelog.com/ )
6
6
and this project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
7
7
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
+
8
15
## 1.0.0 - 2019-11-05
9
16
First 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 19
19
},
20
20
"require" : {
21
21
"php" : " ^7.2" ,
22
- "gettext/gettext" : " ^5.0.0 " ,
22
+ "gettext/gettext" : " dev-feature/functions-handlers-trait " ,
23
23
"mck89/peast" : " ^1.9"
24
24
},
25
25
"require-dev" : {
Original file line number Diff line number Diff line change 10
10
*/
11
11
class JsScanner extends CodeScanner
12
12
{
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
+
13
36
public function getFunctionsScanner (): FunctionsScannerInterface
14
37
{
15
38
return new JsFunctionsScanner (array_keys ($ this ->functions ));
You can’t perform that action at this time.
0 commit comments