Skip to content

Commit bcc4423

Browse files
authored
change vue-i18n and core es module for bundler (#247)
* change vue-i18n and core es module for bundler * update e2e * update warning message
1 parent 5228b0a commit bcc4423

File tree

20 files changed

+70
-41
lines changed

20 files changed

+70
-41
lines changed

docs/essentials/fallback.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ Output:
5252
By default, falling back to `fallbackLocale` generates two console warnings:
5353

5454
```
55-
[vue-i18n] Not found 'hello' key in 'ja' locale messages.
56-
[vue-i18n] Fall back to translate 'hello' key with 'en' locale.
55+
[intlify] Not found 'hello' key in 'ja' locale messages.
56+
[intlify] Fall back to translate 'hello' key with 'en' locale.
5757
```
5858

5959
The first warning message is printed the key, due to given to the translation function `$t` is not in the `ja` locale messages and the second warning message that comes out when you fall back to resolve localized messages from `en` locale messages. These warning messages are output to support debugging using Vue I18n.

docs/essentials/local.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ As in the example above, if the component doesn’t have the locale message, it
8686
And also, as explained the [here](fallback#explicit-fallback-with-one-locale), note that, by default, falling back to global scope generates two warnings in the console:
8787

8888
```
89-
[vue-i18n] Not found 'message.greeting' key in 'ja' locale messages.
90-
[vue-i18n] Fall back to translate 'message.greeting' with root locale.
89+
[intlify] Not found 'message.greeting' key in 'ja' locale messages.
90+
[intlify] Fall back to translate 'message.greeting' with root locale.
9191
```
9292

9393
If you want to localize using the component locale, you can do that with `sync: false` and `locale` in the `i18n` component option.

e2e/fallback/basic.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ const { setupWarningConsole } = require('../helper') // eslint-disable-line
1313
test('warning', () => {
1414
// missing warning
1515
expect(warnings[0]).toEqual(
16-
`[vue-i18n] Not found 'message.hello' key in 'ja' locale messages.`
16+
`[intlify] Not found 'message.hello' key in 'ja' locale messages.`
1717
)
1818
// fallback warning
1919
expect(warnings[1]).toEqual(
20-
`[vue-i18n] Fall back to translate 'message.hello' key with 'en' locale.`
20+
`[intlify] Fall back to translate 'message.hello' key with 'en' locale.`
2121
)
2222
})
2323

e2e/fallback/default-format.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ const { setupWarningConsole } = require('../helper') // eslint-disable-line
1212

1313
test('warning', () => {
1414
expect(warnings).toEqual([
15-
`[vue-i18n] Not found 'messages.hello' key in 'ja' locale messages.`,
16-
`[vue-i18n] Fall back to translate 'messages.hello' key with 'en' locale.`,
17-
`[vue-i18n] Not found 'messages.hello' key in 'en' locale messages.`,
18-
`[vue-i18n] Not found 'messages.hello' key in 'ja' locale messages.`,
19-
`[vue-i18n] Fall back to translate 'messages.hello' key with 'en' locale.`,
20-
`[vue-i18n] Not found 'messages.hello' key in 'en' locale messages.`,
21-
`[vue-i18n] Not found 'good morning, {name}!' key in 'ja' locale messages.`,
22-
`[vue-i18n] Fall back to translate 'good morning, {name}!' key with 'en' locale.`,
23-
`[vue-i18n] Not found 'good morning, {name}!' key in 'en' locale messages.`
15+
`[intlify] Not found 'messages.hello' key in 'ja' locale messages.`,
16+
`[intlify] Fall back to translate 'messages.hello' key with 'en' locale.`,
17+
`[intlify] Not found 'messages.hello' key in 'en' locale messages.`,
18+
`[intlify] Not found 'messages.hello' key in 'ja' locale messages.`,
19+
`[intlify] Fall back to translate 'messages.hello' key with 'en' locale.`,
20+
`[intlify] Not found 'messages.hello' key in 'en' locale messages.`,
21+
`[intlify] Not found 'good morning, {name}!' key in 'ja' locale messages.`,
22+
`[intlify] Fall back to translate 'good morning, {name}!' key with 'en' locale.`,
23+
`[intlify] Not found 'good morning, {name}!' key in 'en' locale messages.`
2424
])
2525
})
2626

e2e/fallback/format.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { setupWarningConsole } = require('../helper') // eslint-disable-line
1313
test('warning', () => {
1414
// missing warning only
1515
expect(warnings[0]).toEqual(
16-
`[vue-i18n] Not found 'hello, {name}!' key in 'ja' locale messages.`
16+
`[intlify] Not found 'hello, {name}!' key in 'ja' locale messages.`
1717
)
1818
})
1919

e2e/fallback/option.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { setupWarningConsole } = require('../helper') // eslint-disable-line
1313
test('warning', () => {
1414
// missing warning only!
1515
expect(warnings[0]).toEqual(
16-
`[vue-i18n] Not found 'message.hello' key in 'ja' locale messages.`
16+
`[intlify] Not found 'message.hello' key in 'ja' locale messages.`
1717
)
1818
})
1919

e2e/fallback/suppress.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { setupWarningConsole } = require('../helper') // eslint-disable-line
1313
test('warning', () => {
1414
// missing warning only!
1515
expect(warnings[0]).toEqual(
16-
`[vue-i18n] Not found 'message.hello' key in 'ja' locale messages.`
16+
`[intlify] Not found 'message.hello' key in 'ja' locale messages.`
1717
)
1818
})
1919

e2e/missing/handler.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const { setupWarningConsole } = require('../helper') // eslint-disable-line
1515
expect(warnings[0]).toEqual(`detect 'message.hello' key missing in 'ja'`)
1616
// fallback warning
1717
expect(warnings[1]).toEqual(
18-
`[vue-i18n] Fall back to translate 'message.hello' key with 'en' locale.`
18+
`[intlify] Fall back to translate 'message.hello' key with 'en' locale.`
1919
)
2020
})
2121

e2e/missing/option.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { setupWarningConsole } = require('../helper') // eslint-disable-line
1313
test('warning', () => {
1414
// fallback warning only
1515
expect(warnings[0]).toEqual(
16-
`[vue-i18n] Fall back to translate 'message.hello' key with 'en' locale.`
16+
`[intlify] Fall back to translate 'message.hello' key with 'en' locale.`
1717
)
1818
})
1919

e2e/missing/suppress.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const { setupWarningConsole } = require('../helper') // eslint-disable-line
1313
test('warning', () => {
1414
// fallback warning only
1515
expect(warnings[0]).toEqual(
16-
`[vue-i18n] Fall back to translate 'message.hello' key with 'en' locale.`
16+
`[intlify] Fall back to translate 'message.hello' key with 'en' locale.`
1717
)
1818
})
1919

0 commit comments

Comments
 (0)