Skip to content

Commit 720a10b

Browse files
committed
update inherit locale example
1 parent d0a7f3c commit 720a10b

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

e2e/scope/inherit-locale.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
text: 'こんにちは、世界!'
1212
})
1313
await expect(page).toMatchElement('#app div.child p', {
14-
text: 'こんにちは!'
14+
text: 'やあ!'
1515
})
1616
await expect(page).toMatchElement('#app label[for=checkbox]', {
1717
text: 'root から locale を継承する'
@@ -22,7 +22,7 @@
2222
// root
2323
await expect(page).toSelect('#app select', 'en')
2424
await expect(page).toMatchElement('#app p', { text: 'hello world!' })
25-
await expect(page).toMatchElement('#app div.child p', { text: 'Hi !' })
25+
await expect(page).toMatchElement('#app div.child p', { text: 'Hi there!' })
2626
await expect(page).toMatchElement('#app label[for=checkbox]', {
2727
text: 'Inherit locale from root'
2828
})
@@ -31,7 +31,7 @@
3131
await expect(page).toSelect('#app div.child select', 'ja')
3232
await expect(page).toMatchElement('#app p', { text: 'hello world!' })
3333
await expect(page).toMatchElement('#app div.child p', {
34-
text: 'こんにちは!'
34+
text: 'やあ!'
3535
})
3636
await expect(page).toMatchElement('#app label[for=checkbox]', {
3737
text: 'root から locale を継承する'
@@ -43,7 +43,7 @@
4343
await expect(page).toSelect('#app select', 'en')
4444
await expect(page).toMatchElement('#app p', { text: 'hello world!' })
4545
await expect(page).toMatchElement('#app div.child p', {
46-
text: 'こんにちは!'
46+
text: 'やあ!'
4747
})
4848
await expect(page).toMatchElement('#app label[for=checkbox]', {
4949
text: 'root から locale を継承する'
@@ -54,7 +54,7 @@
5454
await expect(page).toSelect('#app select', 'ja')
5555
await expect(page).toSelect('#app select', 'en')
5656
await expect(page).toMatchElement('#app p', { text: 'hello world!' })
57-
await expect(page).toMatchElement('#app div.child p', { text: 'Hi !' })
57+
await expect(page).toMatchElement('#app div.child p', { text: 'Hi there!' })
5858
await expect(page).toMatchElement('#app label[for=checkbox]', {
5959
text: 'Inherit locale from root'
6060
})

examples/composable/scope/inherit-locale.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,22 @@ <h1>Child</h1>
4242
setup() {
4343
return useI18n({
4444
locale: 'en',
45-
inheritLocale: true, // default `true`!
45+
inheritLocale: true, // default `false`!
4646
messages: {
4747
en: {
4848
message: {
4949
language: 'Language',
5050
inherit: 'Inherit locale from root',
51-
hello: 'hello world!',
52-
hi: 'Hi !'
51+
hello: 'hello earch!',
52+
hi: 'Hi there!'
5353
}
5454
},
5555
ja: {
5656
message: {
5757
language: '言語',
5858
inherit: 'root から locale を継承する',
59-
hello: 'こんにちは、世界!',
60-
hi: 'こんにちは!'
59+
hello: 'こんにちは、地球!',
60+
hi: 'やあ!'
6161
}
6262
}
6363
}

examples/legacy/scope/inherit-locale.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ <h1>Child</h1>
4141
`,
4242
i18n: {
4343
locale: 'en',
44-
sync: true, // default 'true' !
44+
sync: true, // default 'false' !
4545
messages: {
4646
en: {
4747
message: {
4848
language: 'Language',
4949
inherit: 'Inherit locale from root',
50-
hello: 'hello world!',
51-
hi: 'Hi !'
50+
hello: 'hello earth!',
51+
hi: 'Hi there!'
5252
}
5353
},
5454
ja: {
5555
message: {
5656
language: '言語',
5757
inherit: 'root から locale を継承する',
58-
hello: 'こんにちは、世界!',
59-
hi: 'こんにちは!'
58+
hello: 'こんにちは、地球!',
59+
hi: 'やあ!'
6060
}
6161
}
6262
}

0 commit comments

Comments
 (0)