-
-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from i18next/trans-no-key
Add handling of Trans component without key (#58)
- Loading branch information
Showing
7 changed files
with
149 additions
and
32 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "i18next-scanner", | ||
"version": "2.1.5", | ||
"version": "2.2.0", | ||
"description": "Scan your code, extract translation keys/values, and merge them into i18n resource files.", | ||
"homepage": "https://github.com/i18next/i18next-scanner", | ||
"author": "Cheton Wu <[email protected]>", | ||
|
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
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 |
---|---|---|
@@ -1,12 +1,17 @@ | ||
const mycomp = () => ( | ||
<Trans i18nKey="key1">Key 1 default</Trans> | ||
<Trans i18nKey="key2"> | ||
Key 2 | ||
default value | ||
</Trans> | ||
<div> | ||
<Trans i18nKey="key1">Key 1 default</Trans> | ||
<Trans i18nKey="key2"> | ||
Key 2 | ||
default value | ||
</Trans> | ||
|
||
<Trans i18nKey="key3">This is a <strong>test</strong></Trans> | ||
<Trans i18nKey="key4" count={count}>You have {{count}} apples</Trans> | ||
<Trans i18nKey="key5">You have <a>one <i>very</i> bad</a> apple</Trans> | ||
<Trans i18nKey="key6">This is a <strong>{{test}}</strong></Trans> | ||
) | ||
<Trans i18nKey="key3">This is a <strong>test</strong></Trans> | ||
<Trans i18nKey="key4" count={count}>You have {{count}} apples</Trans> | ||
<Trans i18nKey="key5">You have <a>one <i>very</i> bad</a> apple</Trans> | ||
<Trans i18nKey="key6">This is a <strong>{{test}}</strong></Trans> | ||
<Trans>key7 default</Trans> | ||
<Trans count={1}>key8 default {{count}}</Trans> | ||
<Trans>We can use Trans without i18nKey="..." as well!</Trans> | ||
</div> | ||
) |
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