You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use @intlify/message-compiler and supports vue-i18n v9 message format (#145)
* Use `@intlify/message-compiler` and supports vue-i18n v9 format
* update
* Add `messageSyntaxVersion` to setting.
If you specify `'^9.0.0'`, only `@intlify/message-compiler` will parse the message.
* fix getMessageSyntaxVersions
* fix getMessageSyntaxVersions
* update
Copy file name to clipboardExpand all lines: docs/started.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ module.export = {
38
38
},
39
39
settings: {
40
40
'vue-i18n': {
41
-
localeDir:'./path/to/locales/*.{json,json5,yaml,yml}'// extension is glob formatting!
41
+
localeDir:'./path/to/locales/*.{json,json5,yaml,yml}',// extension is glob formatting!
42
42
// or
43
43
// localeDir: {
44
44
// pattern: './path/to/locales/*.{json,json5,yaml,yml}', // extension is glob formatting!
@@ -55,6 +55,10 @@ module.export = {
55
55
// localeKey: 'file' // or 'key'
56
56
// },
57
57
// ]
58
+
59
+
// Specify the version of `vue-i18n` you are using.
60
+
// If not specified, the message will be parsed twice.
61
+
messageSyntaxVersion:'^9.0.0'
58
62
}
59
63
}
60
64
}
@@ -72,6 +76,7 @@ See [the rule list](../rules/)
72
76
-`'file'` ... Determine the locale name from the filename. The resource file should only contain messages for that locale. Use this option if you use `vue-cli-plugin-i18n`. This option is also used when String option is specified.
73
77
-`'key'` ... Determine the locale name from the root key name of the file contents. The value of that key should only contain messages for that locale. Used when the resource file is in the format given to the `messages` option of the `VueI18n` constructor option.
74
78
- Array option ... An array of String option and Object option. Useful if you have multiple locale directories.
79
+
-`messageSyntaxVersion` (Optional) ... Specify the version of `vue-i18n` you are using. If not specified, the message will be parsed twice.
0 commit comments