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
Localization messages are divided into files. I'm trying to set up a plugin to take the filename as the parent of the messages in the file. For example, we have files common.json validation.json etc.
In app we use key common.messageKey and validation.messageKey.
But as far as I understand, there is no setting for this in plugin.
Your take on the correct solution to problem.
localeDir: {pattern: '...',localePattern: /^.+\/(?<locale>[A-Za-z]+)\/.+\.(json5?|ya?ml)$/,localeKey: 'path',useFilenameAsGroupKey: true// For example}
Additional context
A very strange situation when I pass localePattern as a regular expression, for some reason it is not applied and the default regular expression is used, if i pass a string, then everything is OK
The text was updated successfully, but these errors were encountered:
Has there been any further action on this? This bug makes this rule a non-starter for us as we use it exactly as outlined above.
The existence for 'path' localeKey indicates that this arrangement of i18n files is supported - and the vue-i18n plugin supports this too. So it's strange that it's not a use-case that this rule supports.
its-lee
pushed a commit
to its-lee/eslint-plugin-vue-i18n-ex
that referenced
this issue
Jan 27, 2023
Tell us about your environment
The problem you want to solve.
Localization messages are divided into files. I'm trying to set up a plugin to take the filename as the parent of the messages in the file. For example, we have files
common.json validation.json
etc.In app we use key
common.messageKey
andvalidation.messageKey
.But as far as I understand, there is no setting for this in plugin.
Your take on the correct solution to problem.
Additional context
A very strange situation when I pass
localePattern
as a regular expression, for some reason it is not applied and the default regular expression is used, if i pass a string, then everything is OKThe text was updated successfully, but these errors were encountered: