Skip to content
This repository was archived by the owner on Jul 4, 2021. It is now read-only.

feat: add default lang and scope on plugin configuration for i18n custom block #108

Closed
userquin opened this issue Jun 28, 2021 · 1 comment · Fixed by #109
Closed

feat: add default lang and scope on plugin configuration for i18n custom block #108

userquin opened this issue Jun 28, 2021 · 1 comment · Fixed by #109
Labels
Status: Proposal Request for comments

Comments

@userquin
Copy link
Member

userquin commented Jun 28, 2021

Is your feature request related to a problem?

It is not a problem, it is a new feature.

Describe the solution you'd like

When using i18n custom block resources inside the sfc components, it is a pain writing global and lang attributes: provide a way on plugin configuration to specify default scope and lang.

When using i18n with src external resource, it is also a pain to add global scope.

With these options added to plugin configuration, we have to write less code on each sfc component.

Also, the plugin should override default ones if provided on i18n custom block.

This feature shoundn't be present when using src attribute of i18n custom block: only scope.

You can see an example for lang on vite-plugin-pages repo for route lang attribute (route is also a custom block similar to i18n).

Describe alternatives you've considered

I have no consider alternatives, should be on this plugin.

Additional context

No more context required.

@userquin userquin added the Status: Proposal Request for comments label Jun 28, 2021
@userquin
Copy link
Member Author

userquin commented Jun 28, 2021

I'm open to make a PR... I'm working on a PR... PR done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: Proposal Request for comments
Projects
None yet
1 participant