This repository was archived by the owner on Dec 31, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 44 * https://github.com/Matt-Esch/string-template/index.js
55 */
66
7- const RE_NARGS = / ( % | ) \{ ( [ 0 - 9 a - z A - Z ] + ) \} / g
7+ const RE_NARGS = / ( % | ) \{ ( [ 0 - 9 a - z A - Z _ ] + ) \} / g
88
99
1010/**
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ export default {
1010 } ,
1111 'hello world' : 'Hello World' ,
1212 'Hello {0}' : 'Hello {0}' ,
13- 'continue-with-new-account' : 'continue with new account'
13+ 'continue-with-new-account' : 'continue with new account' ,
14+ underscore : '{hello_msg} world'
1415 } ,
1516 ja : {
1617 message : {
Original file line number Diff line number Diff line change @@ -5,14 +5,20 @@ import locales from './fixture/locales'
55
66describe ( 'issues' , ( ) => {
77 let vm
8+ beforeEach ( ( ) => {
9+ vm = new Vue ( )
10+ } )
11+
812
913 describe ( '#24' , ( ) => {
10- beforeEach ( ( ) => {
11- vm = new Vue ( )
14+ it ( 'should be translated' , ( ) => {
15+ assert ( vm . $t ( 'continue-with-new-account' ) === locales [ Vue . config . lang ] [ 'continue-with-new-account' ] )
1216 } )
17+ } )
1318
19+ describe ( '#35' , ( ) => {
1420 it ( 'should be translated' , ( ) => {
15- assert ( vm . $t ( 'continue-with-new-account' ) === locales [ Vue . config . lang ] [ 'continue-with-new-account' ] )
21+ assert ( vm . $t ( 'underscore' , { hello_msg : 'hello' } ) === 'hello world' )
1622 } )
1723 } )
1824} )
You can’t perform that action at this time.
0 commit comments