Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support localePattern option for locale structured with directory #270

Merged
merged 3 commits into from
Nov 18, 2021

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented Nov 18, 2021

No description provided.

@kazupon kazupon added the Type: Feature Includes new features label Nov 18, 2021
* You need to use the locale capture as a named capture `?<locale>`, so it’s be able to capture from the path of the locale resources.
* If you omit it, it will be captured from the resource path with the same regular expression pattern as `vue-cli-plugin-i18n`.
*/
localePattern?: RegExp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regular expressions cannot be serialized to JSON, so users can only use .eslintrc.js style configurations. Could you change it to accept string | RegExp?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, Indeed 😅
we have to support cases in other formats but .eslintrc.js, such as .eslintrc.yaml.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a mistake the status.

@kazupon
Copy link
Member Author

kazupon commented Nov 18, 2021

I've just fixed it!

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ota-meshi ota-meshi merged commit adbe0fe into master Nov 18, 2021
@ota-meshi ota-meshi deleted the feat/named-capture-for-locale-dir-settings branch November 18, 2021 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Includes new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants