-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow extract to work with i18n._ calls not created from macro (#…
…1309) Co-authored-by: Mitchell Hill <mitchell.hill@capitalontap.com>
- Loading branch information
1 parent
c863322
commit 90be171
Showing
4 changed files
with
154 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/babel-plugin-extract-messages/test/fixtures/js-without-macros-or-comments.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const msg = i18n._('Message') | ||
|
||
const withDescription = i18n._('Description', {}, { comment: "description"}); | ||
|
||
const withMultilineComment = i18n._('Multiline', {}, { comment: "this is " + "2 lines long" }); | ||
|
||
const withId = i18n._('ID', {}, { message: 'Message with id' }); | ||
|
||
const withValues = i18n._('Values {param}', { param: param }); | ||
|
||
const withContext = i18n._('Some id', {},{ context: 'Context1'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters