Commit Graph

61 Commits

Author SHA1 Message Date
Kim Biesbjerg
ecf629118a Run prettier on code 2020-03-25 11:47:44 +01:00
Kim Biesbjerg
33d8c26a28 extract strings when TranslateService is accessed directly via constructor parameter. Closes #50 and #106 2020-03-22 13:33:40 +01:00
Kim Biesbjerg
b07d929484 Add more tests 2020-03-22 11:13:16 +01:00
Kim Biesbjerg
a0f2b69f36 Add test. Closes #150 2020-03-22 10:45:52 +01:00
Kim Biesbjerg
13f46a524f Add test for ignoring calculated values. Closes #128 2020-03-22 10:43:08 +01:00
Kim Biesbjerg
6ed962fa6e Remove line breaks and tabs from extracted keys in templates. Closes #144, #167 2020-03-22 10:23:45 +01:00
Jens Habegger
a17ad9c373
Parse Pipes with Angular Compiler AST, enable ternary operator parsing (#159)
(feature) Use AST-based approach to translate pipe parsing. Also enables parsing translate pipes from any position in a pipe chain. Fixes #111, Fixes #154. (Thanks @TekSiDoT)
2020-03-08 09:54:44 +01:00
Kim Biesbjerg
56a5ab31bf (feature) add StringAsDefaultValue. Closes #40 2020-03-07 09:21:01 +01:00
Kim Biesbjerg
608c4e8e22 cleanup 2019-09-19 15:22:39 +02:00
Kim Biesbjerg
306622b9a0 (chore) run prettier 2019-09-18 14:16:47 +02:00
Kim Biesbjerg
97e8937709 (feat) add argument --null-as-default-value to use null as default value for extracted translations 2019-09-16 17:52:41 +02:00
Kim Biesbjerg
eb7f3f603e (test) (thanks, @adrienverge) 2019-09-16 16:58:21 +02:00
Kim Biesbjerg
4fe3c43624 - (chore) update packages
- (refactor) use tsquery for querying AST
- (feat) autodetect usage of marker function and remove --marker cli argument
- (bugfix) extract strings when TranslateService is declared directly as a class parameter. Closes https://github.com/biesbjerg/ngx-translate-extract/issues/83
- (bugfix) handle split strings: marker('hello ' + 'world') is now extracted as a single string: 'hello world'
2019-09-16 16:40:37 +02:00
Kim Biesbjerg
24ebd8f428 (bugfix) extract strings encapsulated with backticks. Closes #139 2019-08-26 12:29:52 +02:00
Kim Biesbjerg
a5b8f6e6c6 (bugfix) order of keys was not preserved when using namespaced-json format. Closes #131 2019-08-02 13:34:18 +02:00
Kim Biesbjerg
71cc6e6883 fix tests 2019-07-17 13:00:29 +02:00
Kim Biesbjerg
f9b3c63c4c added tests 2019-07-08 14:36:44 +02:00
Kim Biesbjerg
9a8abb3248 refactor(directive parser) remove cheerio in favor of angular's own compiler 2019-06-18 15:54:58 +02:00
Kim Biesbjerg
e0178b5a97 (bugfix) fix unmatched selector error when template didnt contain any html 2019-06-13 12:32:18 +02:00
Kim Biesbjerg
3e43fde1cc (test) fix tests 2019-06-13 12:17:04 +02:00
Kim Biesbjerg
8493015e15 (test) closes #68 2019-06-13 12:03:33 +02:00
Kim Biesbjerg
deb38eb7c3 (test) add test 2019-06-13 11:59:36 +02:00
Kim Biesbjerg
36928e253d (test) add test. closes #104 2019-06-13 11:44:30 +02:00
Kim Biesbjerg
4fd7efa2dc (refactor) simplify extraction of string literals 2019-06-13 11:23:37 +02:00
Kim Biesbjerg
53eb4d1202 (refactor) get rid of AbstractTemplateParser 2019-06-12 11:50:23 +02:00
Kim Biesbjerg
102286a209 - (feat) add concept of post processors
- (feat) add 'key as default value' post processor (closes #109)
- (chore) move clean functionality to a post processor
- (chore) move sort functionality to a post processor
- (refactor) get rid of leading underscore on protected properties/methods
2019-06-11 23:06:47 +02:00
Dominik Herbst
4892ea5146 Configured cheerio to work with non-HTML standard elements to fix issues with custom component tags. (#79) 2017-11-07 15:13:01 +01:00
Kim Biesbjerg
b2ae17697d Replace all occurences of escaped quotes. 2017-07-05 15:43:54 +02:00
Kim Biesbjerg
5259da8fe3 Add support for TranslateService's stream method. Closes #60 2017-07-05 15:18:41 +02:00
Kim Biesbjerg
4ee7258a31 Fix potential bug when extracting strings from file containing multiple classes 2017-05-10 14:10:13 +02:00
Kim Biesbjerg
d416c6b9fd Add support for extracting strings from multiple classes per file. Closes #46 2017-05-09 20:08:44 +02:00
Kim Biesbjerg
3b9561916b Fix crash when constructor parameter has no type. Closes #38 2017-05-05 11:31:30 +02:00
cvaliere
262a89206d fix parser regexp (#31)
- fix template parser regexp (Closes #15)
2017-04-06 08:50:23 +02:00
Kim Biesbjerg
daaebede6f Add support for marker functions, to be able to extract strings not directly passed to TranslateService. Closes #10 2017-03-30 14:37:30 +02:00
Kim Biesbjerg
9a2108e9a9 Add cli option to customize compiler indentation. Closes #22 2017-03-29 14:20:01 +02:00
Kim Biesbjerg
ff1c91010e Fix namespaced-json compiler not preserving numeric values. Fixes #28 2017-03-29 12:52:14 +02:00
Kim Biesbjerg
72739f2e9a Rename Test class for ServiceParser 2017-03-20 15:32:49 +01:00
Kim Biesbjerg
3facc0c287 - Added typings for packages where typings existed
- Remove regexp ServiceParser and make AstServiceParser the default. #23
- Replaced CLI parser to add support for multiple input/output paths (supports file expansion, glob patterns and multiple values/parameters) #7
2017-03-20 15:29:41 +01:00
Kim Biesbjerg
1c3915ff43 Add experimental AstServiceParser 2017-01-28 15:22:08 +01:00
Kim Biesbjerg
303fb1b6de Fix bug where keys were being extracted when not accessing TranslationService property 2017-01-28 15:06:05 +01:00
Kim Biesbjerg
04429bdb44 Add test 2017-01-16 07:13:18 +01:00
Kim Biesbjerg
fcd37fd000 Fix bug in PipeParser 2017-01-13 09:34:34 +01:00
Kim Biesbjerg
7822916e28 Add NamespacedJsonCompiler 2017-01-13 09:02:01 +01:00
Gustav Gahm
c18b7dc9c7 Add CLI option to enable alphabetical sorting of extracted keys 2017-01-13 06:05:52 +01:00
Kim Biesbjerg
e0f909fb4f Fix tests 2016-12-23 05:23:33 +01:00
Kim Biesbjerg
9d87ff368c Fix Pipe regex and add test 2016-12-20 16:42:05 +01:00
Kim Biesbjerg
fbbfa04a34 Use non-greedy regular expression 2016-12-20 16:18:40 +01:00
Kim Biesbjerg
8093370e94 Add tests and allow more liberal spacing with get/instant calls 2016-12-13 15:17:03 +01:00
Kim Biesbjerg
43df1f0fb8 Fix bug in DirectiveParser: should not extract translate pipe in html tag 2016-12-10 04:14:13 +01:00
Kim Biesbjerg
c35036d4c8 Update test 2016-12-10 02:05:25 +01:00