-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d14ffc
commit 6486b93
Showing
5 changed files
with
86 additions
and
41 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
51 changes: 51 additions & 0 deletions
51
packages/kbn-i18n/src/angular/__snapshots__/directive.test.ts.snap
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,51 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`i18nDirective inserts correct translation html content 1`] = ` | ||
<div | ||
class="ng-scope ng-isolate-scope" | ||
i18n-default-message="Default message" | ||
i18n-id="id" | ||
> | ||
Default message | ||
</div> | ||
`; | ||
|
||
exports[`i18nDirective inserts correct translation html content with values 1`] = ` | ||
<div | ||
class="ng-scope ng-isolate-scope" | ||
i18n-default-message="Default message, {value}" | ||
i18n-id="id" | ||
i18n-values="{ value: '<div i18n-id=\\"id2\\" i18n-default-message=\\"<span>inner message</span>\\" />' }" | ||
> | ||
Default message, | ||
<div | ||
class="ng-scope ng-isolate-scope" | ||
i18n-default-message="<span>inner message</span>" | ||
i18n-id="id2" | ||
> | ||
<span | ||
class="ng-scope" | ||
> | ||
inner message | ||
</span> | ||
</div> | ||
</div> | ||
`; | ||
|
||
exports[`i18nDirective sanitizes defaultMessage 1`] = ` | ||
<div | ||
class="ng-scope ng-isolate-scope" | ||
i18n-default-message="Dangerous default message, {value}" | ||
i18n-id="id" | ||
i18n-values="{ value: '<div i18n-id=\\"id2\\" i18n-default-message=\\"<script></script>inner message\\" />' }" | ||
> | ||
Dangerous default message, | ||
<div | ||
class="ng-scope ng-isolate-scope" | ||
i18n-default-message="<script></script>inner message" | ||
i18n-id="id2" | ||
> | ||
inner message | ||
</div> | ||
</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
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